#include <FCDGeometryMesh.h>
Inheritance diagram for FCDGeometryMesh:
Public Member Functions | |
FCDGeometryMesh (FCDocument *document, FCDGeometry *parent) | |
Contructor: do not use directly. | |
virtual | ~FCDGeometryMesh () |
Destructor. | |
bool | Link () |
[INTERNAL] Links a convex mesh to its source geometry (in convexHullOf). | |
FCDGeometry * | GetParent () |
Retrieve the parent of this geometric spline: the geometry entity. | |
const FCDGeometry * | GetParent () const |
See above. | |
size_t | GetFaceCount () const |
Retrieves the number of faces within the geometric mesh. | |
size_t | GetHoleCount () const |
Retrieves the number of holes within the faces of the geometric mesh. | |
size_t | GetFaceVertexCount () const |
Retrieves the total number of per-face vertices in the mesh. | |
bool | IsConvex () const |
Retrieves whether the mesh is defined as convex or not. | |
void | SetConvex (bool _isConvex) |
Sets whether the mesh should be defined as convex. | |
bool | GetConvexify () const |
Retrieves the attribute determining if the mesh needs to be made convex. | |
void | SetConvexify (bool _convexify) |
Raise a flag that the mesh needs to be made convex and the host application should take care of it. | |
const fm::string & | GetConvexHullOf () const |
Retrieves the name of the concave mesh we need to convexify. | |
FCDGeometryMesh * | FindConvexHullOfMesh () |
Retrieves the convex hull of this mesh. | |
const FCDGeometryMesh * | FindConvexHullOfMesh () const |
See above. | |
void | SetConvexHullOf (FCDGeometry *_geom) |
Sets the name of the geometry of which this mesh is the convex hull of. | |
void | SetConvexHullOf (const fm::string &id) |
[INTERNAL] Set the convec hull name directly. | |
const fm::string & | GetDaeId () const |
Retrieves the COLLADA id of the mesh. | |
size_t | GetPolygonsCount () const |
Retrieves the number of independent polygon groups. | |
FCDGeometryPolygons * | GetPolygons (size_t index) |
Retrieves a specific polygon group. | |
const FCDGeometryPolygons * | GetPolygons (size_t index) const |
See above. | |
FCDGeometryPolygons * | AddPolygons () |
Creates a new polygon group. | |
bool | IsTriangles () const |
Retrieves if the mesh consists of only triangles. | |
void | FindPolygonsByMaterial (const fstring &semantic, FCDGeometryPolygonsList &sets) |
Retrieves the polygons sets which use the given material semantic. | |
DEPRECATED (3.05A, GetVertexSourceCount and GetVertexSource(index)) void GetVertexSources() const | |
Retrieves the list of per-vertex data sources. | |
size_t | GetVertexSourceCount () const |
Retrieves the number of per-vertex data sources. | |
FCDGeometrySource * | GetVertexSource (size_t index) |
Retrieves a specific per-vertex data source. | |
const FCDGeometrySource * | GetVertexSource (size_t index) const |
See above. | |
FCDGeometrySource * | AddVertexSource (FUDaeGeometryInput::Semantic type=FUDaeGeometryInput::UNKNOWN) |
Creates a new per-vertex data source for this geometric mesh. | |
void | AddVertexSource (FCDGeometrySource *source) |
Sets a source as per-vertex data. | |
void | RemoveVertexSource (FCDGeometrySource *source) |
Transforms a source of per-vertex data into a source of per-vertex-face data. | |
bool | IsVertexSource (const FCDGeometrySource *source) const |
Retrieves whether a given geometry source is a per-vertex source of this mesh. | |
FCDGeometrySource * | FindSourceById (const fm::string &id) |
[INTERNAL] Retrieves the data source that matches the given COLLADA id. | |
const FCDGeometrySource * | FindSourceById (const fm::string &id) const |
See above. | |
FCDGeometrySource * | FindSourceByType (FUDaeGeometryInput::Semantic type) |
Retrieves the first data source that matches the given geometry data type. | |
const FCDGeometrySource * | FindSourceByType (FUDaeGeometryInput::Semantic type) const |
See above. | |
FCDGeometrySource * | FindSourceByName (const fstring &name) |
Retrieves the first data source that matches the given name. | |
const FCDGeometrySource * | FindSourceByName (const fstring &name) const |
See above. | |
void | FindSourcesByType (FUDaeGeometryInput::Semantic type, FCDGeometrySourceList &sources) |
Retrieves the list of data sources that matches the given geometry data type. | |
void | FindSourcesByType (FUDaeGeometryInput::Semantic type, FCDGeometrySourceConstList &sources) const |
See above. | |
FCDGeometrySource * | GetPositionSource () |
Retrieves the per-vertex data that specifically contains the vertex positions. | |
const FCDGeometrySource * | GetPositionSource () const |
See above. | |
DEPRECATED (3.05A, GetSourceCount and GetSource(index)) void GetSources() const | |
Retrieves the list of all data sources. | |
size_t | GetSourceCount () const |
Retrieves the number of data sources contained within this geometric mesh. | |
FCDGeometrySource * | GetSource (size_t index) |
Retrieves a specific data source. | |
const FCDGeometrySource * | GetSource (size_t index) const |
See above. | |
FCDGeometrySource * | AddSource (FUDaeGeometryInput::Semantic type=FUDaeGeometryInput::UNKNOWN) |
Creates a new data source for this geometric mesh. | |
FCDGeometryMesh * | Clone (FCDGeometryMesh *clone=NULL) const |
Copies the mesh into a clone. | |
void | Recalculate () |
[INTERNAL] Forces the recalculation of the hole count, vertex count, face-vertex counts and their offsets. |
A COLLADA geometric mesh is a list of vertices tied together in polygons. A set of per-vertex data is used to determine the vertices of the mesh. This data usually includes a single list: of vertex positions, but it may also contain per-vertex colors, per-vertex normals or per-vertex texture coordinates. The other data sources declare per-vertex-face data.
The faces of a mesh may be split across different groups, as they may have different materials assigned to them. The FCDGeometryPolygons objects contains one such group of faces.
|
Contructor: do not use directly. Use FCDGeometry::AddMesh instead.
|
|
Creates a new polygon group. Each polygon group is represented within a FCDGeometryPolygons object. The new polygon group will be assigned all the existing per-vertex data sources. No material will be assigned to the new polygon group.
|
|
Creates a new data source for this geometric mesh. The new data source will not be added to any of the existing polygon groups.
|
|
Sets a source as per-vertex data.
|
|
Creates a new per-vertex data source for this geometric mesh. The per-vertex data source will be added to both the per-vertex data source list and the data source list. The new per-vertex data source will automatically be added to all the existing polygon groups.
|
|
Copies the mesh into a clone. The clone may reside in another document.
|
|
Retrieves the list of all data sources. Some of the sources within this list are also present within the vertex data source list.
|
|
Retrieves the list of per-vertex data sources. There should usually be one per-vertex data source that contains positions. All the sources within this list are also present within the data source list.
|
|
Retrieves the convex hull of this mesh.
|
|
Retrieves the polygons sets which use the given material semantic. Useful when processing material instances.
|
|
[INTERNAL] Retrieves the data source that matches the given COLLADA id.
|
|
Retrieves the first data source that matches the given name.
|
|
Retrieves the first data source that matches the given geometry data type.
|
|
Retrieves the list of data sources that matches the given geometry data type.
|
|
Retrieves the name of the concave mesh we need to convexify.
|
|
Retrieves the attribute determining if the mesh needs to be made convex.
|
|
Retrieves the COLLADA id of the mesh. This is a shortcut to the parent geometry's COLLADA id.
|
|
Retrieves the number of faces within the geometric mesh.
|
|
Retrieves the total number of per-face vertices in the mesh. This function makes no assumption about the uniqueness of the per-face vertices.
|
|
Retrieves the number of holes within the faces of the geometric mesh. As one face may contain multiple holes, this value may be larger than the number of faces.
|
|
Retrieve the parent of this geometric spline: the geometry entity.
|
|
Retrieves a specific polygon group. Each polygon group is represented within a FCDGeometryPolygons object. An independent polygon group is usually created to assign a different material to different parts of the mesh or to assign partial texture coordinates and texture tangents to different parts of the mesh.
|
|
Retrieves the number of independent polygon groups. Each polygon group is represented within a FCDGeometryPolygons object. An independent polygon group is usually created to assign a different material to different parts of the mesh or to assign partial texture coordinates and texture tangents to different parts of the mesh.
|
|
Retrieves the per-vertex data that specifically contains the vertex positions. If there are more than one per-vertex data source that contains vertex positions, the first one is returned.
|
|
Retrieves a specific data source.
|
|
Retrieves the number of data sources contained within this geometric mesh.
|
|
Retrieves a specific per-vertex data source. All the per-vertex data sources are also included in the list of data sources.
|
|
Retrieves the number of per-vertex data sources. This number should always be lesser or equal to the number of data sources, as each per-vertex data source is also included within the list of data sources.
|
|
Retrieves whether the mesh is defined as convex or not.
|
|
Retrieves if the mesh consists of only triangles.
|
|
Retrieves whether a given geometry source is a per-vertex source of this mesh.
|
|
[INTERNAL] Links a convex mesh to its source geometry (in convexHullOf). The geometry's mesh is copied into the current one and convexified. This function is used at the end of the import of a document to verify that the geometry was found.
|
|
[INTERNAL] Forces the recalculation of the hole count, vertex count, face-vertex counts and their offsets. Since the counts and offsets are buffered at the geometric mesh object level, this function allows the polygon groups to force the recalculation of the buffered values, when they are modified. |
|
Transforms a source of per-vertex data into a source of per-vertex-face data. Note: the offsets of the inputs is not changed and no data is released.
|
|
Sets whether the mesh should be defined as convex.
|
|
[INTERNAL] Set the convec hull name directly.
|
|
Sets the name of the geometry of which this mesh is the convex hull of.
|
|
Raise a flag that the mesh needs to be made convex and the host application should take care of it. In the future, we could compute ourselves the convex hull of the mesh. A good algorithm could be the "Quickhull".
|