15 #ifndef __IPSDKGEOMETRY_MESH3D_H__ 16 #define __IPSDKGEOMETRY_MESH3D_H__ 20 #pragma warning (push) 21 #pragma warning (disable : 4251) 23 #include <IPSDKGeometry/Entity/3d/BaseTypedGeometryEntity3d.h> 28 #include <IPSDKGeometry/Entity/3d/Triangle/Triangle3d.h> 30 #include <boost/tuple/tuple.hpp> 31 #include <IPSDKGeometry/Entity/3d/BoundingBox/BoundingBox3d.h> 32 #include <IPSDKGeometry/Transform/3d/BaseGeometryTransform3d.h> 94 inline void setMesh3dType(
const eMesh3dType& mesh3dType);
100 inline ipUInt64 getNbVertices()
const;
103 inline ipUInt64 getNbTriangles()
const;
109 inline const VertexColl& getVertexColl()
const;
116 inline const UInt64Vector& getVertexToHalfEdgeColl()
const;
124 inline const UInt64Vector& getTriangleToHalfEdgeColl()
const;
132 inline const TriVertexIxColl& getTriVertexIxColl()
const;
136 inline TriVertexIxColl& getTriVertexIxColl();
196 void copyFromMesh(
const Mesh3d<T>& meshIn);
238 template <
typename T>
242 return g_coordinateSystem3dType;
245 template <
typename T>
249 return g_entity3dType;
252 template <
typename T>
259 template <
typename T>
263 _mesh3dType = mesh3dType;
266 template <
typename T>
270 return _vertexColl.empty();
273 template <
typename T>
277 return static_cast<ipUInt64>(_vertexColl.size());
280 template <
typename T>
284 return static_cast<ipUInt64>(_triangleToHalfEdgeColl.size());
287 template <
typename T>
291 return static_cast<ipUInt64>(_halfEdgeColl.size() / 2);
294 template <
typename T>
301 template <
typename T>
308 template <
typename T>
312 return _vertexToHalfEdgeColl;
315 template <
typename T>
319 return _vertexToHalfEdgeColl;
322 template <
typename T>
326 return _triangleToHalfEdgeColl;
329 template <
typename T>
333 return _triangleToHalfEdgeColl;
336 template <
typename T>
338 IPSDK_FORCEINLINE
const TriVertexIxColl&
341 return _triVertexIxColl;
344 template <
typename T>
346 IPSDK_FORCEINLINE TriVertexIxColl&
349 return _triVertexIxColl;
379 template <
typename T>
383 return _halfEdgeColl;
386 template <
typename T>
390 return _halfEdgeColl;
393 template <
typename T>
397 return _vertexColl.begin();
400 template <
typename T>
404 return _vertexColl.end();
407 template <
typename T>
411 if (_boundingBox3d.get() ==
nullptr)
412 _boundingBox3d = computeBoundingBox();
414 return _boundingBox3d;
424 #pragma warning (pop) 426 #endif // __IPSDKGEOMETRY_MESH3D_H__ BoundingBox3dPtr _boundingBox3d
bounding box associated to mesh
Definition: Mesh3d.h:231
TriVertexIxColl _triVertexIxColl
collection of triangles represented by vertices indices
Definition: Mesh3d.h:228
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eCoordinateSystem3dType
Enumerate describing coordinate system 3d type.
Definition: GeometryEntity3dTypes.h:74
boost::shared_ptr< BoundingBox3d< DataType > > BoundingBox3dPtr
Bounding box 3d associated to entity.
Definition: Mesh3d.h:72
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
#define IPSDK_DECLARE_GEOMETRY_ENTITY_3D(libraryName, className)
Macro allowing to declare a geometry entity 3d.
Definition: GeometryEntity3dHdrMacros.h:131
eEntity3dType getEntity3dType() const
method allowing to retrieve entity 3d type
Definition: Mesh3d.h:247
Basic operators used for mesh 3d management.
const UInt64Vector & getTriangleToHalfEdgeColl() const
Definition: Mesh3d.h:324
VertexIterator beginVertex()
Definition: Mesh3d.h:395
std::vector< ipUInt64 > UInt64Vector
stl vector collections
Definition: BaseCollections.h:35
UInt64Vector _triangleToHalfEdgeColl
Definition: Mesh3d.h:222
const TriVertexIxColl & getTriVertexIxColl() const
Definition: Mesh3d.h:339
std::vector< Mesh3dHalfEdge > Mesh3dHalfEdgeColl
collection of half edges information associated to mesh 3d objects
Definition: Mesh3dTypes.h:116
BoundingBox3dPtr getBoundingBox()
access to the max z of the bounding box
Definition: Mesh3d.h:409
eCoordinateSystem3dType getCoordinateSystem3dType() const
method allowing to retrieve coordinate system 3d type
Definition: Mesh3d.h:240
Definition: Mesh3dTypes.h:52
VertexColl _vertexColl
collection of vertex associated to mesh
Definition: Mesh3d.h:214
bool isEmpty() const
method allowing to check whether mesh is empty
Definition: Mesh3d.h:268
const eMesh3dType & getMesh3dType() const
retrieve mesh 3d type
Definition: Mesh3d.h:254
UInt64Vector _vertexToHalfEdgeColl
Definition: Mesh3d.h:218
const UInt64Vector & getVertexToHalfEdgeColl() const
Definition: Mesh3d.h:310
Predefined types for mesh 3d management.
ipUInt64 getNbTriangles() const
retrieve number of triangles
Definition: Mesh3d.h:282
ipUInt64 getNbVertices() const
retrieve number of vertices
Definition: Mesh3d.h:275
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
std::vector< VertexType > VertexColl
collection of vertexes associated to polygon
Definition: Mesh3d.h:66
const VertexColl & getVertexColl() const
retrieve vertex collection
Definition: Mesh3d.h:296
3d triangle associated to cartesian 3d coordinates
Definition: Triangle3d.h:37
VertexIterator endVertex()
Definition: Mesh3d.h:402
ipUInt64 getNbEdges() const
retrieve number of edges
Definition: Mesh3d.h:289
T DataType
underlying data type associated to object
Definition: Mesh3d.h:60
const Mesh3dHalfEdgeColl & getHalfEdgeColl() const
retrieve half edge information collection
Definition: Mesh3d.h:381
Utility functions for mesh 3d management.
Point3dData< T > VertexType
vertex type associated to object
Definition: Mesh3d.h:63
eEntity3dType
Enumerate describing entity 3d type.
Definition: GeometryEntity3dTypes.h:38
Header files allowing to gather iterators and circulators framework for mesh 3d objects.
VertexColl::iterator VertexIterator
iterator allowing to modify verices coordinates
Definition: Mesh3d.h:69
eMesh3dType _mesh3dType
flag indicating whether mesh is exterior or interior
Definition: Mesh3d.h:211
Closed mesh associated to a triangulated boundary.
Definition: Mesh3d.h:43
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity3d.h:27
eMesh3dType
Enumerate describing mesh type.
Definition: Mesh3dTypes.h:35
Cartesian coordinate system.
Definition: GeometryEntity3dTypes.h:76
Mesh3dHalfEdgeColl _halfEdgeColl
collection of half edge information
Definition: Mesh3d.h:225
Lightweight structure used to store Point3d data.
Definition: GeometryEntity3dTypes.h:27
void setMesh3dType(const eMesh3dType &mesh3dType)
setup mesh 3d type
Definition: Mesh3d.h:261
boost::enable_if< typename boost::mpl::and_< typename boost::is_same< boost::mpl::int_< AttributeType::g_attributeType >, boost::mpl::int_< eAttributeType::eAT_DataItem > >::type, typename boost::is_same< boost::mpl::int_< LeafCollType::g_itemType >, boost::mpl::int_< eDataItemType::eDIT_LeafColl > >::type >::type, RulePtr >::type isEmpty(const boost::shared_ptr< AttributeType > &pAttribute)
functions allowing to check that a leaf collection is empty
Definition: LeafCollSizeRuleOperators.h:65
Mesh.
Definition: GeometryEntity3dTypes.h:56