A child mesh. More...
#include <Mesh.hh>
Public Types | |
| enum | PrimitiveType {  POINTS, LINES, LINESTRIPS, TRIANGLES, TRIFANS, TRISTRIPS }  | 
| An enumeration of the geometric mesh primitives.  More... | |
Public Member Functions | |
| SubMesh () | |
| Constructor.  More... | |
| SubMesh (const SubMesh *_mesh) | |
| Copy Constructor.  More... | |
| virtual | ~SubMesh () | 
| Destructor.  More... | |
| void | AddIndex (unsigned int _i) | 
| Add an index to the mesh.  More... | |
| void | AddNodeAssignment (unsigned int _vertex, unsigned int _node, float _weight) | 
| Add a vertex - skeleton node assignment.  More... | |
| void | AddNormal (const ignition::math::Vector3d &_n) | 
| Add a normal to the mesh.  More... | |
| void | AddNormal (double _x, double _y, double _z) | 
| Add a normal to the mesh.  More... | |
| void | AddTexCoord (double _u, double _v) | 
| Add a texture coord to the mesh.  More... | |
| void | AddVertex (const ignition::math::Vector3d &_v) | 
| Add a vertex to the mesh.  More... | |
| void | AddVertex (double _x, double _y, double _z) | 
| Add a vertex to the mesh.  More... | |
| void | Center (const ignition::math::Vector3d &_center=ignition::math::Vector3d::Zero) | 
| Move the center of the submesh to the given coordinate.  More... | |
| void | CopyNormals (const std::vector< ignition::math::Vector3d > &_norms) | 
| Copy normals from a vector.  More... | |
| void | CopyVertices (const std::vector< ignition::math::Vector3d > &_verts) | 
| Copy vertices from a vector.  More... | |
| void | FillArrays (float **_vertArr, int **_indArr) const | 
| Put all the data into flat arrays.  More... | |
| void | GenSphericalTexCoord (const ignition::math::Vector3d &_center) | 
| Generate texture coordinates using spherical projection from center.  More... | |
| unsigned int | GetIndex (unsigned int _i) const | 
| Get an index.  More... | |
| unsigned int | GetIndexCount () const | 
| Return the number of indicies.  More... | |
| unsigned int | GetMaterialIndex () const | 
| Get the material index.  More... | |
| unsigned int | GetMaxIndex () const | 
| Get the highest index value.  More... | |
| std::string | GetName () const | 
| Get the name of this mesh.  More... | |
| NodeAssignment | GetNodeAssignment (unsigned int _i) const | 
| Get a vertex - skeleton node assignment.  More... | |
| unsigned int | GetNodeAssignmentsCount () const | 
| Return the number of vertex - skeleton node assignments.  More... | |
| unsigned int | GetNormalCount () const | 
| Return the number of normals.  More... | |
| PrimitiveType | GetPrimitiveType () const | 
| Get the primitive type.  More... | |
| unsigned int | GetTexCoordCount () const | 
| Return the number of texture coordinates.  More... | |
| unsigned int | GetVertexCount () const | 
| Return the number of vertices.  More... | |
| unsigned int | GetVertexIndex (const ignition::math::Vector3d &_v) const | 
| Get the index of the vertex.  More... | |
| bool | HasVertex (const ignition::math::Vector3d &_v) const | 
| Return true if this submesh has the vertex.  More... | |
| ignition::math::Vector3d | Max () const | 
| Get the maximum X, Y, Z values from all the vertices.  More... | |
| ignition::math::Vector3d | Min () const | 
| Get the minimum X, Y, Z values from all the vertices.  More... | |
| ignition::math::Vector3d | Normal (unsigned int _i) const | 
| Get a normal.  More... | |
| void | RecalculateNormals () | 
| Recalculate all the normals.  More... | |
| void | Scale (double _factor) | 
| Scale all vertices by _factor.  More... | |
| void | SetIndexCount (unsigned int _count) | 
| Resize the index array.  More... | |
| void | SetMaterialIndex (unsigned int _index) | 
| Set the material index.  More... | |
| void | SetName (const std::string &_n) | 
| Set the name of this mesh.  More... | |
| void | SetNormal (unsigned int _i, const ignition::math::Vector3d &_n) | 
| Set a normal.  More... | |
| void | SetNormalCount (unsigned int _count) | 
| Resize the normal array.  More... | |
| void | SetPrimitiveType (PrimitiveType _type) | 
| Set the primitive type.  More... | |
| void | SetScale (const ignition::math::Vector3d &_factor) | 
| Scale all vertices by the _factor vector.  More... | |
| void | SetTexCoord (unsigned int _i, const ignition::math::Vector2d &_t) | 
| Set a tex coord.  More... | |
| void | SetTexCoordCount (unsigned int _count) | 
| Resize the texture coordinate array.  More... | |
| void | SetVertex (unsigned int _i, const ignition::math::Vector3d &_v) | 
| Set a vertex.  More... | |
| void | SetVertexCount (unsigned int _count) | 
| Resize the vertex array.  More... | |
| ignition::math::Vector2d | TexCoord (unsigned int _i) const | 
| Get a tex coord.  More... | |
| void | Translate (const ignition::math::Vector3d &_vec) | 
| Move all vertices by _vec.  More... | |
| ignition::math::Vector3d | Vertex (unsigned int _i) const | 
| Get a vertex.  More... | |
A child mesh.
| enum PrimitiveType | 
| SubMesh | ( | ) | 
Constructor.
      
  | 
  virtual | 
Destructor.
| void AddIndex | ( | unsigned int | _i | ) | 
Add an index to the mesh.
| [in] | _i | the new vertex index | 
| void AddNodeAssignment | ( | unsigned int | _vertex, | 
| unsigned int | _node, | ||
| float | _weight | ||
| ) | 
Add a vertex - skeleton node assignment.
| [in] | _vertex | the vertex index | 
| [in] | _node | the node index | 
| [in] | _weight | the weight (between 0 and 1) | 
| void AddNormal | ( | const ignition::math::Vector3d & | _n | ) | 
Add a normal to the mesh.
| [in] | _n | the normal | 
| void AddNormal | ( | double | _x, | 
| double | _y, | ||
| double | _z | ||
| ) | 
Add a normal to the mesh.
| [in] | _x | position along x | 
| [in] | _y | position along y | 
| [in] | _z | position along z | 
| void AddTexCoord | ( | double | _u, | 
| double | _v | ||
| ) | 
Add a texture coord to the mesh.
| [in] | _u | position along u | 
| [in] | _v | position along v | 
| void AddVertex | ( | const ignition::math::Vector3d & | _v | ) | 
Add a vertex to the mesh.
| [in] | _v | the new position | 
| void AddVertex | ( | double | _x, | 
| double | _y, | ||
| double | _z | ||
| ) | 
Add a vertex to the mesh.
| [in] | _x | position along x | 
| [in] | _y | position along y | 
| [in] | _z | position along z | 
| void Center | ( | const ignition::math::Vector3d & | _center = ignition::math::Vector3d::Zero | ) | 
Move the center of the submesh to the given coordinate.
This will move all the vertices.
| [in] | _center | Location of the mesh center. | 
| void CopyNormals | ( | const std::vector< ignition::math::Vector3d > & | _norms | ) | 
Copy normals from a vector.
| [in] | _norms | to copy from | 
| void CopyVertices | ( | const std::vector< ignition::math::Vector3d > & | _verts | ) | 
Copy vertices from a vector.
| [in] | _verts | the vertices to copy from | 
| void FillArrays | ( | float ** | _vertArr, | 
| int ** | _indArr | ||
| ) | const | 
Put all the data into flat arrays.
| [in] | _verArr | |
| [in] | _indArr | 
| void GenSphericalTexCoord | ( | const ignition::math::Vector3d & | _center | ) | 
Generate texture coordinates using spherical projection from center.
| [in] | _center | 
| unsigned int GetIndex | ( | unsigned int | _i | ) | const | 
Get an index.
| [in] | _i | 
| unsigned int GetIndexCount | ( | ) | const | 
Return the number of indicies.
| unsigned int GetMaterialIndex | ( | ) | const | 
Get the material index.
| unsigned int GetMaxIndex | ( | ) | const | 
Get the highest index value.
| std::string GetName | ( | ) | const | 
Get the name of this mesh.
| NodeAssignment GetNodeAssignment | ( | unsigned int | _i | ) | const | 
Get a vertex - skeleton node assignment.
| [in] | _i | the index of the assignment | 
| unsigned int GetNodeAssignmentsCount | ( | ) | const | 
Return the number of vertex - skeleton node assignments.
| unsigned int GetNormalCount | ( | ) | const | 
Return the number of normals.
| PrimitiveType GetPrimitiveType | ( | ) | const | 
Get the primitive type.
| unsigned int GetTexCoordCount | ( | ) | const | 
Return the number of texture coordinates.
| unsigned int GetVertexCount | ( | ) | const | 
Return the number of vertices.
| unsigned int GetVertexIndex | ( | const ignition::math::Vector3d & | _v | ) | const | 
Get the index of the vertex.
| [in] | _v | Vertex to check | 
| bool HasVertex | ( | const ignition::math::Vector3d & | _v | ) | const | 
Return true if this submesh has the vertex.
| [in] | _v | 
| ignition::math::Vector3d Max | ( | ) | const | 
Get the maximum X, Y, Z values from all the vertices.
| ignition::math::Vector3d Min | ( | ) | const | 
Get the minimum X, Y, Z values from all the vertices.
| ignition::math::Vector3d Normal | ( | unsigned int | _i | ) | const | 
Get a normal.
| [in] | _i | the normal index | 
| void RecalculateNormals | ( | ) | 
Recalculate all the normals.
| void Scale | ( | double | _factor | ) | 
Scale all vertices by _factor.
| [in] | _factor | Scaling factor | 
| void SetIndexCount | ( | unsigned int | _count | ) | 
Resize the index array.
| [in] | _count | the new size of the array | 
| void SetMaterialIndex | ( | unsigned int | _index | ) | 
Set the material index.
Relates to the parent mesh material list
| [in] | _index | 
| void SetName | ( | const std::string & | _n | ) | 
Set the name of this mesh.
| [in] | _n | the name to set | 
| void SetNormal | ( | unsigned int | _i, | 
| const ignition::math::Vector3d & | _n | ||
| ) | 
Set a normal.
| [in] | _i | the normal index | 
| [in] | _n | the normal direction | 
| void SetNormalCount | ( | unsigned int | _count | ) | 
Resize the normal array.
| [in] | _count | the new size of the array | 
| void SetPrimitiveType | ( | PrimitiveType | _type | ) | 
Set the primitive type.
| [in] | _type | the type | 
| void SetScale | ( | const ignition::math::Vector3d & | _factor | ) | 
Scale all vertices by the _factor vector.
| [in] | _factor | Scaling vector | 
| void SetTexCoord | ( | unsigned int | _i, | 
| const ignition::math::Vector2d & | _t | ||
| ) | 
Set a tex coord.
| [in] | _i | |
| [in] | _t | 
| void SetTexCoordCount | ( | unsigned int | _count | ) | 
Resize the texture coordinate array.
| [in] | _count | 
| void SetVertex | ( | unsigned int | _i, | 
| const ignition::math::Vector3d & | _v | ||
| ) | 
Set a vertex.
| [in] | _i | the index | 
| [in] | _v | the position | 
| void SetVertexCount | ( | unsigned int | _count | ) | 
Resize the vertex array.
| [in] | _count | the new size of the array | 
| ignition::math::Vector2d TexCoord | ( | unsigned int | _i | ) | const | 
Get a tex coord.
| [in] | _i | the texture index | 
| void Translate | ( | const ignition::math::Vector3d & | _vec | ) | 
Move all vertices by _vec.
| [in] | _vec | Amount to translate vertices. | 
| ignition::math::Vector3d Vertex | ( | unsigned int | _i | ) | const | 
Get a vertex.
| [in] | _i | the vertex index |