#include <FCDGeometryPolygons.h>
Inheritance diagram for FCDGeometryPolygons:
Public Types | |
enum | PrimitiveType { LINES, LINE_STRIPS, POLYGONS, TRIANGLE_FANS, TRIANGLE_STRIPS, POINTS } |
The types of primitives. More... | |
Public Member Functions | |
FCDGeometryPolygons (FCDocument *document, FCDGeometryMesh *parent) | |
Constructor: do not use directly. | |
virtual | ~FCDGeometryPolygons () |
Destructor. | |
FCDGeometryMesh * | GetParent () |
Retrieves the geometry that contains this polygons. | |
const FCDGeometryMesh * | GetParent () const |
See above. | |
FCDExtra * | GetExtra () |
Retrieves the extra information tree for this entity instance. | |
const FCDExtra * | GetExtra () const |
See above. | |
PrimitiveType | GetPrimitiveType () const |
Retrieves the primitive type for this polygons set. | |
void | SetPrimitiveType (PrimitiveType type) |
Sets the primitive type for this polygons set. | |
const uint32 * | GetFaceVertexCounts () const |
Retrieves the list of face-vertex counts. See above. | |
void | AddFaceVertexCount (uint32 count) |
Adds a new count to the face-vertex count list. | |
size_t | GetFaceVertexCountCount () const |
Retrieves the number of face-vertex counts within the polygon set. | |
void | SetFaceVertexCountCount (size_t count) |
Sets the number of face-vertex counts within the polygon set. | |
DEPRECATED (3.05, TestPolyType) bool IsTriangles() const | |
[DEPRECATED] Retrieves if the polygons is a list of polygons (returns false), or a list of triangles (returns true). | |
int32 | TestPolyType () const |
Tests if the polygon can be aproximated with a constant face count Returns: 3 if all faces are triangles, 4 if all faces are triangles, else -1. | |
size_t | GetHoleCount () const |
Retrieves the number of holes within the faces of the polygon set. | |
size_t | GetFaceCount () const |
Retrieves the number of faces within the polygon set. | |
size_t | GetFaceOffset () const |
Retrieves the number of faces which appear before this polygon set within the geometric mesh. | |
size_t | GetFaceVertexCount () const |
Retrieves the total number of face-vertex pairs within the polygon set. | |
size_t | GetFaceVertexCount (size_t index) const |
Retrieves the number of face-vertex pairs for a given face. | |
size_t | GetFaceVertexOffset () const |
Retrieves the total number of face-vertex pairs which appear before this polygon set within the geometric mesh. | |
size_t | GetHoleOffset () const |
Retrieves the number of holes which appear before this polygon set. | |
size_t | GetFaceVertexOffset (size_t index) const |
Retrieves the number of face-vertex pairs which appear before a given face within the polygon set. | |
void | SetFaceOffset (size_t offset) |
[INTERNAL] Sets the number of faces in previous polygon sets. | |
void | SetFaceVertexOffset (size_t offset) |
[INTERNAL] Sets the number of face-vertex pairs in previous polygon sets. | |
void | SetHoleOffset (size_t offset) |
[INTERNAL] Sets the number of holes in previous polygon sets. | |
virtual void | AddFace (uint32 degree) |
Creates a new face. | |
virtual void | RemoveFace (size_t index) |
Removes a face. | |
DEPRECATED (3.05A, GetInputCount and GetInput(index)) void GetInputs() | |
Retrieves the list of polygon set inputs. | |
size_t | GetInputCount () const |
Retrieves the number of polygon set inputs. | |
FCDGeometryPolygonsInput * | GetInput (size_t index) |
Retrieves a specific polygon set input. | |
const FCDGeometryPolygonsInput * | GetInput (size_t index) const |
See above. | |
FCDGeometryPolygonsInput * | AddInput (FCDGeometrySource *source, uint32 offset) |
Creates a new polygon set input. | |
size_t | GetHoleFaceCount () const |
Retrieves the number of hole entries within the face-vertex count list. | |
void | SetHoleFaceCount (size_t count) |
Sets the number of hole entries within the face-vertex count list. | |
bool | IsHoleFaceHole (size_t index) |
Checks whether a given face-vertex count entries represents a hole. | |
const uint32 * | GetHoleFaces () const |
Retrieves the list of entries within the face-vertex count list that are considered holes. See above. | |
void | AddHole (uint32 index) |
Adds a new hole identifier. | |
size_t | GetHoleCountBefore (size_t index) const |
Retrieves the number of holes within faces of the polygon set that appear before the given face index. | |
size_t | GetHoleCount (size_t index) const |
Retrieves the number of holes within a given face. | |
FCDGeometryPolygonsInput * | FindInput (FUDaeGeometryInput::Semantic semantic) |
Retrieves the first polygon set input found that has the given data type. | |
const FCDGeometryPolygonsInput * | FindInput (FUDaeGeometryInput::Semantic semantic) const |
See above. | |
FCDGeometryPolygonsInput * | FindInput (const FCDGeometrySource *source) |
Retrieves the polygon set input that points towards a given data source. | |
const FCDGeometryPolygonsInput * | FindInput (const FCDGeometrySource *source) const |
See above. | |
FCDGeometryPolygonsInput * | FindInput (const fm::string &sourceId) |
[INTERNAL] Retrieves the polygon set input that points towards a given data source. | |
void | FindInputs (FUDaeGeometryInput::Semantic semantic, FCDGeometryPolygonsInputList &inputs) |
Retrieves all the polygon set inputs that have the given data type. | |
void | FindInputs (FUDaeGeometryInput::Semantic semantic, FCDGeometryPolygonsInputConstList &inputs) const |
See above. | |
const fstring & | GetMaterialSemantic () const |
Retrieves the symbolic name for the material used on this polygon set. | |
void | SetMaterialSemantic (const fchar *semantic) |
Sets a symbolic name for the material used on this polygon set. | |
void | SetMaterialSemantic (const fstring &semantic) |
See above. | |
virtual void | Recalculate () |
[INTERNAL] Recalculates the buffered offset and count values for this polygon set. | |
virtual FCDGeometryPolygons * | Clone (FCDGeometryPolygons *clone, const FCDGeometrySourceCloneMap &cloneMap) const |
[INTERNAL] Creates a copy of this mesh. |
Each polygon set contains a list of inputs and the tessellation information to make polygons out of the data and indices of the input. FCollada supports triangle lists as well as polygon lists and lists of polygons with holes. This implies that each face has an undeterminate number of vertices. The tessellation information creates polygons, but may also creates holes within the polygons.
|
|
Constructor: do not use directly. Instead, use the FCDGeometryMesh::AddPolygons function to create new polygon sets.
|
|
Creates a new face. Enough indices to fill the face will be added to the polygon set inputs: you will want to overwrite those, as they will all be set to zero.
|
|
Adds a new count to the face-vertex count list. This function only modifies the face-vertex count list. To also add indices to the inputs for the new face, use the AddFace function.
|
|
Adds a new hole identifier. The face-vertex count entry should already exist and the identifier will be place in increasing order within the current list of entries within the face-vertex count list.
|
|
Creates a new polygon set input.
|
|
[INTERNAL] Creates a copy of this mesh. You should use the FCDGeometry::Clone function instead of this function.
|
|
Retrieves the list of polygon set inputs.
|
|
[DEPRECATED] Retrieves if the polygons is a list of polygons (returns false), or a list of triangles (returns true).
|
|
[INTERNAL] Retrieves the polygon set input that points towards a given data source.
|
|
Retrieves the polygon set input that points towards a given data source.
|
|
Retrieves the first polygon set input found that has the given data type.
|
|
Retrieves all the polygon set inputs that have the given data type.
|
|
Retrieves the extra information tree for this entity instance. The prefered way to save extra information in FCollada is at the entity level. Use this extra information tree to store any information you want exported and imported back.
|
|
Retrieves the number of faces within the polygon set.
|
|
Retrieves the number of faces which appear before this polygon set within the geometric mesh. This value is useful when traversing all the faces of a geometric mesh.
|
|
Retrieves the number of face-vertex pairs for a given face. This value includes face-vertex pairs that create the polygon and its holes.
|
|
Retrieves the total number of face-vertex pairs within the polygon set. This value is the total of all the values within the face-vertex count list. Do remember that the list of face-vertex pairs includes holes.
|
|
Retrieves the number of face-vertex counts within the polygon set. This value also represents the total the number of faces and holes within the polygon set.
|
|
Retrieves the list of face-vertex counts. See above. Each face within the polygon set has one or more entry within this list, depending on the number of holes within that face. Each face-vertex count indicates the number of ordered indices within the polygon set inputs that are used to generate a face or its holes. To find out if a face-vertex count represents a face or its holes, check the hole-faces list retrieved using the GetHoleFaces function. Indirectly, the face-vertex count indicates the degree of the polygon.
|
|
Retrieves the number of face-vertex pairs which appear before a given face within the polygon set. This value is useful when doing per-vertex mesh operations within the polygon set.
|
|
Retrieves the total number of face-vertex pairs which appear before this polygon set within the geometric mesh. This value is useful when traversing all the face-vertex pairs of a geometric mesh.
|
|
Retrieves the number of holes within a given face.
|
|
Retrieves the number of holes within the faces of the polygon set.
|
|
Retrieves the number of holes within faces of the polygon set that appear before the given face index. This value is useful when trying to access a specific face of a mesh, as holes and faces appear together within the face-vertex degree list.
|
|
Retrieves the number of hole entries within the face-vertex count list.
|
|
Retrieves the list of entries within the face-vertex count list that are considered holes. See above. COLLADA does not support holes within holes, so each entry within this list implies a hole within the previous face.
|
|
Retrieves the number of holes which appear before this polygon set. This value is useful when traversing all the face-vertex pairs of a geometric mesh. |
|
Retrieves a specific polygon set input.
|
|
Retrieves the number of polygon set inputs.
|
|
Retrieves the symbolic name for the material used on this polygon set. Match this symbolic name within a FCDGeometryInstance to get the correct material instance.
|
|
Retrieves the geometry that contains this polygons.
|
|
Retrieves the primitive type for this polygons set.
|
|
Checks whether a given face-vertex count entries represents a hole.
|
|
Removes a face.
|
|
[INTERNAL] Sets the number of faces in previous polygon sets. Used by the FCDGeometryMesh::Recalculate function.
|
|
Sets the number of face-vertex counts within the polygon set. Any additional face-vertex count will not be initialized and any removed face-vertex count will not remove the equivalent indices within the polygon set inputs.
|
|
[INTERNAL] Sets the number of face-vertex pairs in previous polygon sets. Used by the FCDGeometryMesh::Recalculate function.
|
|
Sets the number of hole entries within the face-vertex count list. Any additional hole entries will need to be initialized by the application. Reducing the number of hole entries without taking special care to remove these entries from the face-vertex count list will result in new, unwanted, faces.
|
|
[INTERNAL] Sets the number of holes in previous polygon sets. Used by the FCDGeometryMesh::Recalculate function.
|
|
Sets a symbolic name for the material used on this polygon set. This symbolic name will be matched in the FCDMaterialInstance contained within a FCDGeometryInstance to assign the correct material.
|
|
Sets the primitive type for this polygons set. Important note: no attempt is made at fixing up the indices. You should only do this operation of empty polygons set.
|