Artec 3D Scanning SDK  2.0
Public Member Functions | List of all members
artec::sdk::base::IMesh Class Referenceabstract

Indexed triangle mesh. More...

#include <artec/sdk/base/IMesh.h>

+ Inheritance diagram for artec::sdk::base::IMesh:

Public Member Functions

virtual bool isEmpty () const =0
 Check whether the mesh is empty. More...
 
- Public Member Functions inherited from artec::sdk::base::IRevision
virtual bool wasChanged (unsigned int rev) const =0
 Check whether the object was changed (true if changed) More...
 
virtual unsigned int incRevision ()=0
 Increment object's revision. More...
 
virtual unsigned int getRevision () const =0
 Get object's revision. More...
 
- Public Member Functions inherited from artec::sdk::base::IRef
virtual int addRef () const =0
 Increase object reference counter. More...
 
virtual int release () const =0
 Decrease object reference counter. More...
 

Data access functions

virtual IArrayPoint3FgetPoints () const =0
 Get points (vertices). More...
 
virtual void setPoints (IArrayPoint3F *points)=0
 Set points (vertices). More...
 
virtual IArrayIndexTripletgetTriangles () const =0
 Get triangles (triplets of vertex indices). More...
 
virtual void setTriangles (IArrayIndexTriplet *triangles)=0
 Set triangles (triplets of vertex indices). More...
 
virtual IArrayPoint3FgetPointsNormals () const =0
 Get vertex normals (smooth). More...
 
virtual void setPointsNormals (IArrayPoint3F *normals)=0
 Set vertex normals (smooth). More...
 
virtual IArrayPoint3FgetTrianglesNormals () const =0
 Get triangle normals (flat). More...
 
virtual void setTrianglesNormals (IArrayPoint3F *normals)=0
 Set triangle normals (flat). More...
 
virtual Triangle getTriangle (int i) const =0
 Return point coordinates for i-th triangle. More...
 

Calculated data functions

virtual unsigned int calculate (unsigned int requested_mode, unsigned int recreate_mode=CM_None)=0
 Create calculated data. More...
 
virtual unsigned int getCalculated ()=0
 Get calculated data flags. More...
 
virtual void clear (int requested_mode=CM_ClearEverything)=0
 Clear unneeded data from mesh. More...
 

Point transformation functions

virtual void transform (const Matrix4x4D &matrix)=0
 Apply full transformation (motion / rotation / scale). More...
 
virtual void translate (const Point3F &direction)=0
 Apply translation. More...
 
virtual void rotate (const Matrix4x4D &matrix)=0
 Apply rotation. More...
 
virtual void scale (float factor)=0
 Scale. More...
 
virtual void scale (float factor, const Point3F &center)=0
 Scale. More...
 

Calculated data access functions

virtual const IArrayPoint3FgetTrianglesCenters () const =0
 
virtual const IArrayPoint3FgetTrianglesAngles () const =0
 
virtual const IArrayFloatgetTrianglesAreas () const =0
 
virtual const IArrayPoint3FgetEdgeLengths () const =0
 

Calculated data existence verification

virtual bool hasNormals () const =0
 
virtual bool hasPointsNormals () const =0
 
virtual bool hasTrianglesNormals () const =0
 
virtual bool hasTrianglesCenters () const =0
 
virtual bool hasTrianglesAngles () const =0
 
virtual bool hasTrianglesAreas () const =0
 
virtual bool hasEdgeLengths () const =0
 

Internal functions

virtual void setInternalData (void *p)=0
 Set internal data (used for compatibility with existing code). Do not use this function. More...
 
virtual void * getInternalData () const =0
 Get internal data (used for compatibility with existing code). Do not use this function. More...
 

Detailed Description

Indexed triangle mesh.

Contains points (vertices) and triangles (triplets of vertex indices). It may contain flat (per-triangle) and smooth (per-vertex) normals, calculate various data (triangle areas, edge lengths, etc.) and store one's internal data.

Definition at line 32 of file IMesh.h.

Member Function Documentation

virtual unsigned int artec::sdk::base::IMesh::calculate ( unsigned int  requested_mode,
unsigned int  recreate_mode = CM_None 
)
pure virtual

Create calculated data.

Parameters
requested_modeRequest to calculate information
recreate_modeRequest to re-calculate information
Returns
Calculation result: the combination of the current flags.
Examples:
project-sample.cpp.
virtual void artec::sdk::base::IMesh::clear ( int  requested_mode = CM_ClearEverything)
pure virtual

Clear unneeded data from mesh.

Doing so won't clear any dependent data.

Parameters
requested_moderequest to clear information (modes can be combined)
virtual unsigned int artec::sdk::base::IMesh::getCalculated ( )
pure virtual

Get calculated data flags.

Returns
Combination of the current flags .
virtual const IArrayPoint3F* artec::sdk::base::IMesh::getEdgeLengths ( ) const
pure virtual
Returns
Array of values.
virtual void* artec::sdk::base::IMesh::getInternalData ( ) const
pure virtual

Get internal data (used for compatibility with existing code). Do not use this function.

virtual IArrayPoint3F* artec::sdk::base::IMesh::getPoints ( ) const
pure virtual

Get points (vertices).

IArrayPoint3F is used to access individual points.

Returns
Pointer to the IArrayPoint3F array.
virtual IArrayPoint3F* artec::sdk::base::IMesh::getPointsNormals ( ) const
pure virtual

Get vertex normals (smooth).

IArrayPoint3F is used to access individual normals.

Returns
Pointer to the IArrayPoint3F array.
virtual Triangle artec::sdk::base::IMesh::getTriangle ( int  i) const
pure virtual

Return point coordinates for i-th triangle.

Parameters
iTriangle index
Returns
Triangle structure
virtual IArrayIndexTriplet* artec::sdk::base::IMesh::getTriangles ( ) const
pure virtual

Get triangles (triplets of vertex indices).

IArrayIndexTriplet is used to access individual triangles.

Returns
Pointer to the IArrayIndexTriplet array.
virtual const IArrayPoint3F* artec::sdk::base::IMesh::getTrianglesAngles ( ) const
pure virtual
Returns
Array of values.
virtual const IArrayFloat* artec::sdk::base::IMesh::getTrianglesAreas ( ) const
pure virtual
Returns
Array of values.
virtual const IArrayPoint3F* artec::sdk::base::IMesh::getTrianglesCenters ( ) const
pure virtual
Returns
Array of values.
virtual IArrayPoint3F* artec::sdk::base::IMesh::getTrianglesNormals ( ) const
pure virtual

Get triangle normals (flat).

IArrayPoint3F is used to access individual normals.

Returns
Pointer to the IArrayPoint3F array.
virtual bool artec::sdk::base::IMesh::hasEdgeLengths ( ) const
pure virtual
Returns
True if property is present.
virtual bool artec::sdk::base::IMesh::hasNormals ( ) const
pure virtual
Returns
True if property is present.
virtual bool artec::sdk::base::IMesh::hasPointsNormals ( ) const
pure virtual
Returns
True if property is present.
virtual bool artec::sdk::base::IMesh::hasTrianglesAngles ( ) const
pure virtual
Returns
True if property is present.
virtual bool artec::sdk::base::IMesh::hasTrianglesAreas ( ) const
pure virtual
Returns
True if property is present.
virtual bool artec::sdk::base::IMesh::hasTrianglesCenters ( ) const
pure virtual
Returns
True if property is present.
virtual bool artec::sdk::base::IMesh::hasTrianglesNormals ( ) const
pure virtual
Returns
True if property is present.
virtual bool artec::sdk::base::IMesh::isEmpty ( ) const
pure virtual

Check whether the mesh is empty.

virtual void artec::sdk::base::IMesh::rotate ( const Matrix4x4D matrix)
pure virtual

Apply rotation.

Parameters
matrixRotation matrix.
virtual void artec::sdk::base::IMesh::scale ( float  factor)
pure virtual

Scale.

Parameters
factorScale factor.
virtual void artec::sdk::base::IMesh::scale ( float  factor,
const Point3F center 
)
pure virtual

Scale.

Parameters
factorScale factor.
centerScaling center coordinates.
virtual void artec::sdk::base::IMesh::setInternalData ( void *  p)
pure virtual

Set internal data (used for compatibility with existing code). Do not use this function.

virtual void artec::sdk::base::IMesh::setPoints ( IArrayPoint3F points)
pure virtual

Set points (vertices).

Parameters
pointsPointer to the IArrayPoint3F array.
virtual void artec::sdk::base::IMesh::setPointsNormals ( IArrayPoint3F normals)
pure virtual

Set vertex normals (smooth).

Parameters
normalsPointer to the IArrayPoint3F array.
virtual void artec::sdk::base::IMesh::setTriangles ( IArrayIndexTriplet triangles)
pure virtual

Set triangles (triplets of vertex indices).

Parameters
trianglesPointer to the IArrayIndexTriplet array.
virtual void artec::sdk::base::IMesh::setTrianglesNormals ( IArrayPoint3F normals)
pure virtual

Set triangle normals (flat).

Parameters
normalsPointer to the IArrayPoint3F array.
virtual void artec::sdk::base::IMesh::transform ( const Matrix4x4D matrix)
pure virtual

Apply full transformation (motion / rotation / scale).

Parameters
matrixTransformation matrix.
virtual void artec::sdk::base::IMesh::translate ( const Point3F direction)
pure virtual

Apply translation.

Parameters
directionDirection vector.

The documentation for this class was generated from the following file: