This is a high level face class. More...
Public Member Functions | |
Dtk_ErrorStatus | _Store (void *) |
int | add_mockup (const Dtk_tab< Dtk_tab< Dtk_UInt32 > > *inIndices) |
Add one mockup. More... | |
int | add_mockup (const Dtk_tab< Dtk_tab< Dtk_UInt32 > > *inIndices, const Dtk_tab< Dtk_pnt > *inVertices, const Dtk_tab< Dtk_dir > *inNormals=NULL, const Dtk_tab< Dtk_RGB > *inColors=NULL, const Dtk_tab< Dtk_Float32 > *inU=NULL, const Dtk_tab< Dtk_Float32 > *inV=NULL) |
Add one polygon and the corresponding vertices. More... | |
int | add_mockups (const Dtk_tab< Dtk_tab< Dtk_tab< Dtk_UInt32 > > > *inIndices, const Dtk_tab< Dtk_pnt > *inVertices, const Dtk_tab< Dtk_dir > *inNormals=NULL, const Dtk_tab< Dtk_RGB > *inColors=NULL, const Dtk_tab< Dtk_Float32 > *inU=NULL, const Dtk_tab< Dtk_Float32 > *inV=NULL) |
int | add_point (Dtk_UInt32 inpnt) |
int | add_points (const Dtk_tab< Dtk_UInt32 > *inIndices, const Dtk_tab< Dtk_pnt > *inVertices, const Dtk_tab< Dtk_dir > *inNormals=NULL, const Dtk_tab< Dtk_RGB > *inColors=NULL, const Dtk_tab< Dtk_Float32 > *inU=NULL, const Dtk_tab< Dtk_Float32 > *inV=NULL) |
int | add_points (const Dtk_tab< Dtk_UInt32 > *pnts) |
int | add_polygon (const Dtk_tab< Dtk_UInt32 > *inIndices) |
Add one polygon. More... | |
int | add_polygon (const Dtk_tab< Dtk_UInt32 > *inIndices, const Dtk_tab< Dtk_pnt > *inVertices, const Dtk_tab< Dtk_dir > *inNormals=NULL, const Dtk_tab< Dtk_RGB > *inColors=NULL, const Dtk_tab< Dtk_Float32 > *inU=NULL, const Dtk_tab< Dtk_Float32 > *inV=NULL) |
Add one polygon and the corresponding vertices. More... | |
int | add_polyline (const Dtk_tab< Dtk_UInt32 > *inIndices) |
Add one polyline. More... | |
int | add_polyline (const Dtk_tab< Dtk_UInt32 > *inIndices, const Dtk_tab< Dtk_pnt > *inVertices, const Dtk_tab< Dtk_dir > *inNormals=NULL, const Dtk_tab< Dtk_RGB > *inColors=NULL, const Dtk_tab< Dtk_Float32 > *inU=NULL, const Dtk_tab< Dtk_Float32 > *inV=NULL) |
Add one polyline and the corresponding vertices. More... | |
int | add_subinfo (Dtk_InfoPtr &ininf) |
int | add_triangle_fan (const Dtk_tab< Dtk_UInt32 > *inIndices) |
Add one triangle fan. More... | |
int | add_triangle_fan (const Dtk_tab< Dtk_UInt32 > *inIndices, const Dtk_tab< Dtk_pnt > *inVertices, const Dtk_tab< Dtk_dir > *inNormals=NULL, const Dtk_tab< Dtk_RGB > *inColors=NULL, const Dtk_tab< Dtk_Float32 > *inU=NULL, const Dtk_tab< Dtk_Float32 > *inV=NULL) |
Add one triangle fan and the corresponding vertices. More... | |
int | add_triangle_strip (const Dtk_tab< Dtk_UInt32 > *inIndices) |
Add one triangle strip. More... | |
int | add_triangle_strip (const Dtk_tab< Dtk_UInt32 > *inIndices, const Dtk_tab< Dtk_pnt > *inVertices, const Dtk_tab< Dtk_dir > *inNormals=NULL, const Dtk_tab< Dtk_RGB > *inColors=NULL, const Dtk_tab< Dtk_Float32 > *inU=NULL, const Dtk_tab< Dtk_Float32 > *inV=NULL) |
Add one triangle strip and the corresponding vertices. More... | |
int | add_triangles (const Dtk_tab< Dtk_UInt32 > *inIndices, const Dtk_tab< Dtk_pnt > *inVertices, const Dtk_tab< Dtk_dir > *inNormals=NULL, const Dtk_tab< Dtk_RGB > *inColors=NULL, const Dtk_tab< Dtk_Float32 > *inU=NULL, const Dtk_tab< Dtk_Float32 > *inV=NULL) |
Add one of multiple triangles and the corresponding vertices. More... | |
int | add_triangles (const Dtk_UInt32 *inIndices, Dtk_Size_t nb) |
int | add_triangles (Dtk_tab< Dtk_UInt32 > *inIndices) |
Add one of multiple triangles. More... | |
int | compute_bb (Dtk_pnt *min, Dtk_pnt *max) |
Compute the mesh Bounding Box. More... | |
int | compute_bb_center (Dtk_pnt *i) |
Compute the mesh Bounding Box. More... | |
int | compute_round_normals () |
Compute round normals from geometry. More... | |
Dtk_mesh_face (const Dtk_mesh_face &inMeshface, Dtk_mesh *inMesh, Dtk_UInt32 shift=0) | |
Copy Constructor. More... | |
Dtk_mesh_face (Dtk_mesh *inMesh) | |
Constructor. More... | |
Dtk_Int32 | DtkDynamicType (const Dtk_Int32 &inId) |
Retrieves the dynamic entity type. More... | |
virtual int | DtkDynamicType (const int &inId)=0 |
virtual void | dump (FILE *file=stdout) |
int | explode () |
Decompose all complex geometry (triangle strips, fan, polygons) into triangles, and append it into the internal triangle array. More... | |
int | explode (Dtk_bool ExplodeTristrips, Dtk_bool ExplodeTrifans, Dtk_bool ExplodePolygons, Dtk_bool ExplodeMockups) |
Decompose complex geometry (triangle strips, fan, polygons) according to specified parameters into triangles, and append it into the internal triangle array. More... | |
Dtk_RGB | get_face_color () |
Return the RGB face color. More... | |
int | get_face_icolor () |
Return the RGB face color (indice) More... | |
Dtk_string | get_face_name () |
Get a name for the face. More... | |
Dtk_dir | get_face_normal () |
Some interfaces need to keep a normal for a specific type of face. Use this to retrieve a global face normal. More... | |
DTK_MESH_TYPE_FACE | get_face_type () |
Return the current face type. More... | |
int | get_id () |
Return the face Id. More... | |
Dtk_mesh * | get_mesh () |
Dtk_mesh_circle_data | get_mesh_circle_data () |
Return the mesh_circle_data of the current face. If it doesn't exist, NULL is returned. More... | |
const Dtk_tab< Dtk_tab< Dtk_UInt32 > > * | get_mockup_indices (Dtk_Size_t inI) const |
Get inI-th mockup. More... | |
Dtk_dir | get_mockup_normal (Dtk_Size_t inI) const |
Dtk_Size_t | get_nb_facets () |
Compute all facets (triangles) holded by the class, including trianglestrips, fans, polygons. More... | |
Dtk_Size_t | get_nb_vertices (int inOnce=1) |
Compute the total number of vertices used in the face. More... | |
Dtk_Size_t | get_nbmockups () const |
Get the number of mockups kept in the class instance. More... | |
Dtk_Size_t | get_nbpoints () const |
Dtk_Size_t | get_nbpolygons () const |
Get the number of polygons kept in the class instance. More... | |
Dtk_Size_t | get_nbpolylines () const |
Get the number of polylines kept in the class instance. More... | |
Dtk_Size_t | get_nbsubinfos () const |
Dtk_Size_t | get_nbtriangle_fans () const |
Get the number of triangle fans kept in the class instance. More... | |
Dtk_Size_t | get_nbtriangle_strips () const |
Get the number of triangle strips kept in the class instance. More... | |
Dtk_Size_t | get_nbtriangles () const |
Get the number of simple triangles kept in the class instance. More... | |
Dtk_UInt32 | get_point_indice (Dtk_Size_t inI) const |
const Dtk_tab< Dtk_UInt32 > * | get_polygon_indices (Dtk_Size_t inI) const |
Get inI-th polygon. More... | |
Dtk_dir | get_polygon_normal (Dtk_Size_t inI) const |
const Dtk_tab< Dtk_UInt32 > * | get_polyline_indices (Dtk_Size_t inI) const |
Get inI-th polygon. More... | |
Dtk_InfoPtr & | get_subinfo (Dtk_Size_t inI) |
const Dtk_InfoPtr & | get_subinfo (Dtk_Size_t inI) const |
const Dtk_tab< Dtk_UInt32 > * | get_triangle_fan_indices (Dtk_Size_t inI) const |
Get inI-th triangle fan. More... | |
const Dtk_UInt32 * | get_triangle_indices (Dtk_Size_t inI) const |
Get pointer of triangle indices of i-th triangle. More... | |
Dtk_dir | get_triangle_normal (Dtk_Size_t inI) const |
Get the center normal of the inI-th triangle. More... | |
const Dtk_tab< Dtk_UInt32 > * | get_triangle_strip_indices (Dtk_Size_t inI) const |
Get inI-th triangle strip. More... | |
Dtk_pnt | get_triangle_vertex (Dtk_Size_t inI, Dtk_Size_t inV) const |
Get the V-th vertex of the inI-th triangle. More... | |
virtual Dtk_Size_t | GetSize () const |
Dtk_InfoPtr & | info () |
acces to class info of mesh_face More... | |
const Dtk_InfoPtr & | info () const |
acces to class info of mesh_face More... | |
int | makestrips () |
void | merge (Dtk_mesh_face *inMeshface) |
Merge a face into the current face. More... | |
void | reduce () |
Reduce memory cost of the Dtk_mesh, to call after adding all geometry. More... | |
void | reserve_polylines (Dtk_Size_t nb) |
int | reserve_triangle_strip (Dtk_Size_t nb) |
void | reverse_triangle (Dtk_Size_t inI) |
Reverse the i-th triangle of the set of triangle, so that the normal will be inversed. More... | |
void | set_face_color (const Dtk_RGB &inColor) |
Set a color to the face. Sometimes, one needs to set a color to a face, not the vertices. More... | |
void | set_face_icolor (int inColor) |
Set a color to the face (indexed). Sometimes, one needs to set a color to a face, not the vertices. More... | |
void | set_face_name (const Dtk_string &inName) |
Set a name for the face. More... | |
void | set_face_normal (const Dtk_dir &) |
Some interfaces need to keep a normal for a specific type of face. Use this to store a global face normal. More... | |
void | set_face_type (DTK_MESH_TYPE_FACE inType) |
Set a face type. More... | |
void | set_id (int inId) |
Set an Id to the face. More... | |
void | set_mesh_circle_data (const Dtk_mesh_circle_data &inCircle) |
Set a mesh_circle_data object to the face, in order to add circular datas (for cylinders) More... | |
~Dtk_mesh_face () | |
Destructor. More... | |
Static Public Member Functions | |
static Dtk_mesh_facePtr | Create (const Dtk_mesh_face &inToBeCopied) |
Copy constructor. More... | |
static Dtk_mesh_face * | DtkDynamicCast (Dtk_Object *s) |
Performs a dynamic cast - doesn't need RTTI -. More... | |
Protected Types | |
enum | { _typeID = DTK_TYPE_OBJECT } |
enum | { _typeID = DTK_TYPE_MESH_FACE } |
Protected Member Functions | |
void | _copy (const Dtk_Object &s) |
void | _init () |
void | _reset () |
Protected Attributes | |
Dtk_InfoPtr | _infos |
unsigned long | count_ |
Dtk_mesh * | mesh |
Dtk_tab< Dtk_tab< Dtk_tab< Dtk_UInt32 > > > | mockup |
Dtk_tab< Dtk_UInt32 > | points |
Dtk_tab< Dtk_tab< Dtk_UInt32 > > | polygons |
Dtk_tab< Dtk_tab< Dtk_UInt32 > > | polylines |
Dtk_tab< Dtk_InfoPtr > | subinfos |
Dtk_tab< Dtk_UInt32 > | triangles |
Dtk_tab< Dtk_tab< Dtk_UInt32 > > | trifans |
Dtk_tab< Dtk_tab< Dtk_UInt32 > > | tristrips |
Friends | |
class | Dtk_mesh |
class | Dtk_SmartPtr< Dtk_mesh_face > |
This is a high level face class.
This class gathers all the datas related to a triangulated mesh face.
Dtk_mesh_face::Dtk_mesh_face | ( | Dtk_mesh * | inMesh | ) |
Constructor.
inMesh | : the mesh which will contain the face |
Dtk_mesh_face::Dtk_mesh_face | ( | const Dtk_mesh_face & | inMeshface, |
Dtk_mesh * | inMesh, | ||
Dtk_UInt32 | shift = 0 |
||
) |
Copy Constructor.
Do not use param shift.
Dtk_mesh_face::~Dtk_mesh_face | ( | ) |
Destructor.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Dtk_ErrorStatus Dtk_mesh_face::_Store | ( | void * | ) |
int Dtk_mesh_face::add_mockup | ( | const Dtk_tab< Dtk_tab< Dtk_UInt32 > > * | inIndices | ) |
Add one mockup.
On this form, indices MUST match an existing vertex inside Dtk_Mesh class
[in] | inIndices | : Array of Array of indices (ie : Array of polygons). The first polygon is the outer limit of the mockups, the others are inner loops |
Note : Polygons MUST be convex
Note : Face is ALWAYS on the left of polygon. It means that for outer polygon, the sens is counterclockwise, for the other, sense is clockwise
int Dtk_mesh_face::add_mockup | ( | const Dtk_tab< Dtk_tab< Dtk_UInt32 > > * | inIndices, |
const Dtk_tab< Dtk_pnt > * | inVertices, | ||
const Dtk_tab< Dtk_dir > * | inNormals = NULL , |
||
const Dtk_tab< Dtk_RGB > * | inColors = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inU = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inV = NULL |
||
) |
Add one polygon and the corresponding vertices.
poygon MUST be convex
[in] | inIndices | : Array of Array of indices (ie : Array of polygons). The first polygon is the outer limit of the mockups, the others are inner loops |
Note : Polygons MUST be convex
Note : Face is ALWAYS on the left of polygon. It means that for outer polygon, the sens is counterclockwise, for the other, sense is clockwise
[in] | inVertices | : Array of vertices. They will be added into the mesh. inIndices values are indices of this table |
[in] | inNormals | : Array of normals (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inColors | : Array of RGBcolors (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inU | : Array of u params (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inV | : Array of v params (or NULL is not specified). If specified, size must be the same than inVertices. |
int Dtk_mesh_face::add_mockups | ( | const Dtk_tab< Dtk_tab< Dtk_tab< Dtk_UInt32 > > > * | inIndices, |
const Dtk_tab< Dtk_pnt > * | inVertices, | ||
const Dtk_tab< Dtk_dir > * | inNormals = NULL , |
||
const Dtk_tab< Dtk_RGB > * | inColors = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inU = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inV = NULL |
||
) |
int Dtk_mesh_face::add_point | ( | Dtk_UInt32 | inpnt | ) |
int Dtk_mesh_face::add_points | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices, |
const Dtk_tab< Dtk_pnt > * | inVertices, | ||
const Dtk_tab< Dtk_dir > * | inNormals = NULL , |
||
const Dtk_tab< Dtk_RGB > * | inColors = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inU = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inV = NULL |
||
) |
int Dtk_mesh_face::add_points | ( | const Dtk_tab< Dtk_UInt32 > * | pnts | ) |
int Dtk_mesh_face::add_polygon | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices | ) |
Add one polygon.
poygon MUST be convex
On this form, indices MUST match an existing vertex inside Dtk_Mesh class
[in] | inIndices | : Array of indices. Must be a at least 3. |
int Dtk_mesh_face::add_polygon | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices, |
const Dtk_tab< Dtk_pnt > * | inVertices, | ||
const Dtk_tab< Dtk_dir > * | inNormals = NULL , |
||
const Dtk_tab< Dtk_RGB > * | inColors = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inU = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inV = NULL |
||
) |
Add one polygon and the corresponding vertices.
poygon MUST be convex
[in] | inIndices | : Array of indices. Must be at least 3. |
[in] | inVertices | : Array of vertices. They will be added into the mesh. inIndices values are indices of this table |
[in] | inNormals | : Array of normals (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inColors | : Array of RGBcolors (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inU | : Array of u params (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inV | : Array of v params (or NULL is not specified). If specified, size must be the same than inVertices. |
int Dtk_mesh_face::add_polyline | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices | ) |
Add one polyline.
On this form, indices MUST match an existing vertex inside Dtk_Mesh class
[in] | inIndices | : Array of indices. Must be a at least 3. |
int Dtk_mesh_face::add_polyline | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices, |
const Dtk_tab< Dtk_pnt > * | inVertices, | ||
const Dtk_tab< Dtk_dir > * | inNormals = NULL , |
||
const Dtk_tab< Dtk_RGB > * | inColors = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inU = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inV = NULL |
||
) |
Add one polyline and the corresponding vertices.
[in] | inIndices | : Array of indices. Must be at least 2. |
[in] | inVertices | : Array of vertices. They will be added into the mesh. inIndices values are indices of this table |
[in] | inNormals | : Array of normals (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inColors | : Array of RGBcolors (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inU | : Array of u params (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inV | : Array of v params (or NULL is not specified). If specified, size must be the same than inVertices. |
int Dtk_mesh_face::add_subinfo | ( | Dtk_InfoPtr & | ininf | ) |
int Dtk_mesh_face::add_triangle_fan | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices | ) |
Add one triangle fan.
On this form, indices MUST match an existing vertex inside Dtk_Mesh class
[in] | inIndices | : Array of indices. Must be a at least 3. |
int Dtk_mesh_face::add_triangle_fan | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices, |
const Dtk_tab< Dtk_pnt > * | inVertices, | ||
const Dtk_tab< Dtk_dir > * | inNormals = NULL , |
||
const Dtk_tab< Dtk_RGB > * | inColors = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inU = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inV = NULL |
||
) |
Add one triangle fan and the corresponding vertices.
[in] | inIndices | : Array of indices. Must be at least 3. |
[in] | inVertices | : Array of vertices. They will be added into the mesh. inIndices values are indices of this table |
[in] | inNormals | : Array of normals (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inColors | : Array of RGBcolors (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inU | : Array of u params (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inV | : Array of v params (or NULL is not specified). If specified, size must be the same than inVertices. |
int Dtk_mesh_face::add_triangle_strip | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices | ) |
Add one triangle strip.
On this form, indices MUST match an existing vertex inside Dtk_Mesh class
[in] | inIndices | : Array of indices. Must be a at least 3. |
int Dtk_mesh_face::add_triangle_strip | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices, |
const Dtk_tab< Dtk_pnt > * | inVertices, | ||
const Dtk_tab< Dtk_dir > * | inNormals = NULL , |
||
const Dtk_tab< Dtk_RGB > * | inColors = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inU = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inV = NULL |
||
) |
Add one triangle strip and the corresponding vertices.
[in] | inIndices | : Array of indices. Must be at least 3. |
[in] | inVertices | : Array of vertices. They will be added into the mesh. inIndices values are indices of this table |
[in] | inNormals | : Array of normals (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inColors | : Array of RGBcolors (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inU | : Array of u params (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inV | : Array of v params (or NULL is not specified). If specified, size must be the same than inVertices. |
int Dtk_mesh_face::add_triangles | ( | const Dtk_tab< Dtk_UInt32 > * | inIndices, |
const Dtk_tab< Dtk_pnt > * | inVertices, | ||
const Dtk_tab< Dtk_dir > * | inNormals = NULL , |
||
const Dtk_tab< Dtk_RGB > * | inColors = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inU = NULL , |
||
const Dtk_tab< Dtk_Float32 > * | inV = NULL |
||
) |
Add one of multiple triangles and the corresponding vertices.
[in] | inIndices | : Array of indices. Must be a multiple of 3. This will add arraysize/3 triangles. |
[in] | inVertices | : Array of vertices. They will be added into the mesh. inIndices values are indices of this table |
[in] | inNormals | : Array of normals (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inColors | : Array of RGBcolors (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inU | : Array of u params (or NULL is not specified). If specified, size must be the same than inVertices. |
[in] | inV | : Array of v params (or NULL is not specified). If specified, size must be the same than inVertices. |
int Dtk_mesh_face::add_triangles | ( | const Dtk_UInt32 * | inIndices, |
Dtk_Size_t | nb | ||
) |
int Dtk_mesh_face::add_triangles | ( | Dtk_tab< Dtk_UInt32 > * | inIndices | ) |
Add one of multiple triangles.
On this form, indices MUST match an existing vertex inside Dtk_Mesh class
[in] | inIndices | : Array of indices. Must be a multiple of 3. This will add arraysize/3 triangles |
Compute the mesh Bounding Box.
[out] | min,max | : computed extrem points of the boundig box |
int Dtk_mesh_face::compute_bb_center | ( | Dtk_pnt * | i | ) |
Compute the mesh Bounding Box.
[out] | in | : computed center point of the boundig box |
int Dtk_mesh_face::compute_round_normals | ( | ) |
Compute round normals from geometry.
|
static |
Copy constructor.
inToBeCopied | Object to copy. |
|
static |
Performs a dynamic cast - doesn't need RTTI -.
Retrieves the dynamic entity type.
|
pure virtualinherited |
Implemented in Dtk_Shell, Dtk_Body, Dtk_Lump, Dtk_Volume, Dtk_Face, Dtk_Loop, Dtk_Coedge, Dtk_Edge, Dtk_Vertex, Dtk_TopologicalEntity, Dtk_MeshPolyline, Dtk_MeshSurface, Dtk_TransformedSurface, Dtk_FilletSurface, Dtk_OffsetSurface, Dtk_SphericalSurface, Dtk_ToroidalSurface, Dtk_ConicalSurface, Dtk_CylindricalSurface, Dtk_RuledSurface, Dtk_LinearExtrusionSurface, Dtk_StandardRevolutionSurface, Dtk_RevolutionSurface, Dtk_PlaneSurface, Dtk_NurbsSurface, Dtk_Surface, Dtk_Hyperbola, Dtk_Parabola, Dtk_Ellipse, Dtk_Conic, Dtk_Line, Dtk_Polyline, Dtk_NurbsCurve, Dtk_Curve, Dtk_Point, Dtk_Constraint, Dtk_ConstraintReference, Dtk_AxisSystem, Dtk_Preview, Dtk_Entity, Dtk_picture, Dtk_OverrideSet, Dtk_OverrideInfo, Dtk_MainDoc, Dtk_Component, Dtk_Node, Dtk_DocElement, Dtk_Log, and Dtk_Properties.
|
virtualinherited |
int Dtk_mesh_face::explode | ( | ) |
Decompose all complex geometry (triangle strips, fan, polygons) into triangles, and append it into the internal triangle array.
Note that mockup decomposition is not yet supported.
int Dtk_mesh_face::explode | ( | Dtk_bool | ExplodeTristrips, |
Dtk_bool | ExplodeTrifans, | ||
Dtk_bool | ExplodePolygons, | ||
Dtk_bool | ExplodeMockups | ||
) |
Decompose complex geometry (triangle strips, fan, polygons) according to specified parameters into triangles, and append it into the internal triangle array.
Note that mockup decomposition is not yet supported.
Dtk_RGB Dtk_mesh_face::get_face_color | ( | ) |
Return the RGB face color.
int Dtk_mesh_face::get_face_icolor | ( | ) |
Return the RGB face color (indice)
Dtk_string Dtk_mesh_face::get_face_name | ( | ) |
Get a name for the face.
Dtk_dir Dtk_mesh_face::get_face_normal | ( | ) |
Some interfaces need to keep a normal for a specific type of face. Use this to retrieve a global face normal.
DTK_MESH_TYPE_FACE Dtk_mesh_face::get_face_type | ( | ) |
Return the current face type.
int Dtk_mesh_face::get_id | ( | ) |
Return the face Id.
Dtk_mesh* Dtk_mesh_face::get_mesh | ( | ) |
Dtk_mesh_circle_data Dtk_mesh_face::get_mesh_circle_data | ( | ) |
Return the mesh_circle_data of the current face. If it doesn't exist, NULL is returned.
const Dtk_tab<Dtk_tab<Dtk_UInt32> >* Dtk_mesh_face::get_mockup_indices | ( | Dtk_Size_t | inI | ) | const |
Get inI-th mockup.
Dtk_dir Dtk_mesh_face::get_mockup_normal | ( | Dtk_Size_t | inI | ) | const |
Dtk_Size_t Dtk_mesh_face::get_nb_facets | ( | ) |
Compute all facets (triangles) holded by the class, including trianglestrips, fans, polygons.
Dtk_Size_t Dtk_mesh_face::get_nb_vertices | ( | int | inOnce = 1 | ) |
Compute the total number of vertices used in the face.
[in] | inOnce | (default = true) : Imagine a case we have 2 adjascent triangles, with 2 common vertices. If inOnce = true, return 4, if false, return 6. |
Dtk_Size_t Dtk_mesh_face::get_nbmockups | ( | ) | const |
Get the number of mockups kept in the class instance.
Dtk_Size_t Dtk_mesh_face::get_nbpoints | ( | ) | const |
Dtk_Size_t Dtk_mesh_face::get_nbpolygons | ( | ) | const |
Get the number of polygons kept in the class instance.
Dtk_Size_t Dtk_mesh_face::get_nbpolylines | ( | ) | const |
Get the number of polylines kept in the class instance.
Dtk_Size_t Dtk_mesh_face::get_nbsubinfos | ( | ) | const |
Dtk_Size_t Dtk_mesh_face::get_nbtriangle_fans | ( | ) | const |
Get the number of triangle fans kept in the class instance.
[in] | inI | : indice of the triangle fan to get. |
Dtk_Size_t Dtk_mesh_face::get_nbtriangle_strips | ( | ) | const |
Get the number of triangle strips kept in the class instance.
Dtk_Size_t Dtk_mesh_face::get_nbtriangles | ( | ) | const |
Get the number of simple triangles kept in the class instance.
Dtk_UInt32 Dtk_mesh_face::get_point_indice | ( | Dtk_Size_t | inI | ) | const |
const Dtk_tab<Dtk_UInt32>* Dtk_mesh_face::get_polygon_indices | ( | Dtk_Size_t | inI | ) | const |
Get inI-th polygon.
[in] | inI | : indice of the polygon to get. |
Dtk_dir Dtk_mesh_face::get_polygon_normal | ( | Dtk_Size_t | inI | ) | const |
const Dtk_tab<Dtk_UInt32>* Dtk_mesh_face::get_polyline_indices | ( | Dtk_Size_t | inI | ) | const |
Get inI-th polygon.
[in] | inI | : indice of the polygon to get. |
Dtk_InfoPtr& Dtk_mesh_face::get_subinfo | ( | Dtk_Size_t | inI | ) |
const Dtk_InfoPtr& Dtk_mesh_face::get_subinfo | ( | Dtk_Size_t | inI | ) | const |
const Dtk_tab<Dtk_UInt32>* Dtk_mesh_face::get_triangle_fan_indices | ( | Dtk_Size_t | inI | ) | const |
Get inI-th triangle fan.
const Dtk_UInt32* Dtk_mesh_face::get_triangle_indices | ( | Dtk_Size_t | inI | ) | const |
Get pointer of triangle indices of i-th triangle.
[in] | inI | : triangle to get (use get_nbtriangles to see how many triangles there is) |
Use the result as an array (check example below) Sample:
Dtk_dir Dtk_mesh_face::get_triangle_normal | ( | Dtk_Size_t | inI | ) | const |
Get the center normal of the inI-th triangle.
[in] | inI | : triangle to get (use get_nbtriangles to see how many triangles there is) |
const Dtk_tab<Dtk_UInt32>* Dtk_mesh_face::get_triangle_strip_indices | ( | Dtk_Size_t | inI | ) | const |
Get inI-th triangle strip.
[in] | inI | : indice of the triangle strip to get. |
Dtk_pnt Dtk_mesh_face::get_triangle_vertex | ( | Dtk_Size_t | inI, |
Dtk_Size_t | inV | ||
) | const |
Get the V-th vertex of the inI-th triangle.
[in] | inI | : triangle to get (use get_nbtriangles to see how many triangles there is) |
[in] | inV | : Vertex to get (0, 1 or 2) |
|
virtual |
Reimplemented from Dtk_Object.
Dtk_InfoPtr& Dtk_mesh_face::info | ( | ) |
acces to class info of mesh_face
const Dtk_InfoPtr& Dtk_mesh_face::info | ( | ) | const |
acces to class info of mesh_face
int Dtk_mesh_face::makestrips | ( | ) |
void Dtk_mesh_face::merge | ( | Dtk_mesh_face * | inMeshface | ) |
Merge a face into the current face.
[in] | inMeshface | : Mesh face to append to the current face. |
void Dtk_mesh_face::reduce | ( | ) |
void Dtk_mesh_face::reserve_polylines | ( | Dtk_Size_t | nb | ) |
int Dtk_mesh_face::reserve_triangle_strip | ( | Dtk_Size_t | nb | ) |
void Dtk_mesh_face::reverse_triangle | ( | Dtk_Size_t | inI | ) |
Reverse the i-th triangle of the set of triangle, so that the normal will be inversed.
[in] | inI | : triangle to reverse (use get_nbtriangles to see how many triangles there is) |
void Dtk_mesh_face::set_face_color | ( | const Dtk_RGB & | inColor | ) |
Set a color to the face. Sometimes, one needs to set a color to a face, not the vertices.
inColor | : RGB color |
void Dtk_mesh_face::set_face_icolor | ( | int | inColor | ) |
Set a color to the face (indexed). Sometimes, one needs to set a color to a face, not the vertices.
inColor | : indice of a RGB color |
void Dtk_mesh_face::set_face_name | ( | const Dtk_string & | inName | ) |
Set a name for the face.
inName | : Name to set. |
void Dtk_mesh_face::set_face_normal | ( | const Dtk_dir & | ) |
Some interfaces need to keep a normal for a specific type of face. Use this to store a global face normal.
void Dtk_mesh_face::set_face_type | ( | DTK_MESH_TYPE_FACE | inType | ) |
Set a face type.
inType | : face type. Can be DTK_MESH_CYLINDER, DTK_MESH_PLANE or DTK_MESH_OTHERSRF |
void Dtk_mesh_face::set_id | ( | int | inId | ) |
Set an Id to the face.
inId | : set an Id to the face |
void Dtk_mesh_face::set_mesh_circle_data | ( | const Dtk_mesh_circle_data & | inCircle | ) |
Set a mesh_circle_data object to the face, in order to add circular datas (for cylinders)
inCircle | A Dtk_mesh_circle_data object, filled. |
|
friend |
|
friend |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |