#include <exterior_mesh.h>
Nevrax France
Definition at line 56 of file exterior_mesh.h.
Public Member Functions | |
void | clear () |
void | serial (NLMISC::IStream &f) |
Serializes the mesh. | |
Constructors | |
CExteriorMesh () | |
Selectors | |
const NLMISC::CAABBox & | getBBox () const |
Get the bbox of the mesh. | |
const CEdge | getEdge (uint n) const |
Get the nth edge of the mesh. | |
const std::vector< CEdge > & | getEdges () const |
Get the set of edges that forms the whole mesh. | |
const CLink & | getLink (uint n) const |
Get a specific link. | |
CLink | getLinkFromEdge (uint edge) const |
Get the link on a specific edge. | |
const std::vector< CLink > & | getLinks () const |
Get the links. | |
const COrderedEdges & | getOrderedEdges (uint n) const |
Get the nth set of ordered edges. | |
const std::vector< COrderedEdges > & | getOrderedEdges () const |
Get the ordered edges. | |
Mutators/initialisation | |
void | setEdges (const std::vector< CEdge > &edges) |
Set the edges. | |
void | setLinks (const std::vector< CLink > &links) |
Set the links. | |
Protected Attributes | |
NLMISC::CAABBox | _BBox |
std::vector< CEdge > | _Edges |
std::vector< CLink > | _Links |
std::vector< COrderedEdges > | _OrderedEdges |
|
Definition at line 60 of file exterior_mesh.cpp.
00060 { } |
|
Definition at line 106 of file exterior_mesh.h. References _Links, _OrderedEdges, and NLMISC::contReset(). Referenced by NLPACS::CLocalRetriever::clear().
00107 { 00108 NLMISC::contReset(_Edges); 00109 NLMISC::contReset(_OrderedEdges); 00110 NLMISC::contReset(_Links); 00111 } |
|
Get the bbox of the mesh.
Definition at line 140 of file exterior_mesh.h.
00140 { return _BBox; } |
|
Get the nth edge of the mesh.
Definition at line 120 of file exterior_mesh.h. References uint. Referenced by NLPACS::computeRetriever(), NLPACS::CRetrieverInstance::linkEdgeQuad(), and NLPACS::CRetrieverInstance::testExteriorCollision().
00120 { return _Edges[n]; } |
|
Get the set of edges that forms the whole mesh.
Definition at line 117 of file exterior_mesh.h. Referenced by NLPACS::CEdgeQuad::build(), NLPACS::computeRetriever(), and NLPACS::linkExteriorToInterior().
00117 { return _Edges; } |
|
Get a specific link.
Definition at line 133 of file exterior_mesh.h. Referenced by NLPACS::CEdgeQuad::build(), NLPACS::CRetrieverInstance::linkEdgeQuad(), and NLPACS::CLocalRetriever::testCollision().
00133 { return _Links[n]; } |
|
Get the link on a specific edge.
Definition at line 136 of file exterior_mesh.h.
|
|
Get the links.
Definition at line 131 of file exterior_mesh.h. References _Links. Referenced by NLPACS::CLocalRetriever::testCollision().
00131 { return _Links; } |
|
Get the nth set of ordered edges.
Definition at line 127 of file exterior_mesh.h. References _OrderedEdges, and uint.
00127 { return _OrderedEdges[n]; } |
|
Get the ordered edges.
Definition at line 124 of file exterior_mesh.h. References _OrderedEdges.
00124 { return _OrderedEdges; } |
|
Serializes the mesh.
Definition at line 98 of file exterior_mesh.cpp. References _Links, _OrderedEdges, NLMISC::IStream::serial(), NLMISC::IStream::serialCont(), and NLMISC::IStream::serialVersion().
00099 { 00100 /* 00101 Version 0: 00102 - base version. 00103 */ 00104 (void)f.serialVersion(0); 00105 00106 f.serialCont(_Edges); 00107 f.serialCont(_OrderedEdges); 00108 f.serialCont(_Links); 00109 f.serial(_BBox); 00110 } |
|
Set the edges.
Definition at line 62 of file exterior_mesh.cpp. References _OrderedEdges, NLPACS::CExteriorMesh::COrderedEdges::End, NLPACS::CExteriorMesh::COrderedEdges::Forward, NLPACS::isStrictlyGreater(), NLPACS::isStrictlyLess(), NLPACS::CExteriorMesh::COrderedEdges::Start, and uint. Referenced by NLPACS::buildExteriorMesh(), and NLPACS::linkExteriorToInterior().
00063 { 00064 _Edges = edges; 00065 _OrderedEdges.clear(); 00066 00067 uint i; 00068 for (i=0; i+1<_Edges.size(); ) 00069 { 00070 _OrderedEdges.resize(_OrderedEdges.size()+1); 00071 COrderedEdges &edges = _OrderedEdges.back(); 00072 edges.Start = i; 00073 if (isStrictlyLess(_Edges[i].Start, _Edges[i+1].Start)) 00074 { 00075 edges.Forward = true; 00076 do 00077 { 00078 ++i; 00079 } 00080 while (i+1<_Edges.size() && _Edges[i].Link != -2 && isStrictlyLess(_Edges[i].Start, _Edges[i+1].Start)); 00081 } 00082 else 00083 { 00084 edges.Forward = false; 00085 do 00086 { 00087 ++i; 00088 } 00089 while (i+1<_Edges.size() && _Edges[i].Link != -2 && isStrictlyGreater(_Edges[i].Start, _Edges[i+1].Start)); 00090 } 00091 edges.End = i; 00092 00093 if (_Edges[i].Link == -2) 00094 ++i; 00095 } 00096 } |
|
Set the links.
Definition at line 152 of file exterior_mesh.h. References _Links. Referenced by NLPACS::linkExteriorToInterior().
00152 { _Links = links; } |
|
Definition at line 95 of file exterior_mesh.h. |
|
Definition at line 90 of file exterior_mesh.h. |
|
Definition at line 93 of file exterior_mesh.h. Referenced by clear(), getLink(), getLinkFromEdge(), getLinks(), serial(), and setLinks(). |
|
Definition at line 91 of file exterior_mesh.h. Referenced by clear(), getOrderedEdges(), serial(), and setEdges(). |