Go to the documentation of this file.
17 #ifndef IGNITION_COMMON_SUBMESH_HH_
18 #define IGNITION_COMMON_SUBMESH_HH_
24 #include <gz/math/Vector3.hh>
25 #include <gz/math/Vector2.hh>
27 #include <ignition/utils/ImplPtr.hh>
29 #include <gz/common/config.hh>
31 #include <gz/common/graphics/Export.hh>
42 class IGNITION_COMMON_GRAPHICS_VISIBLE
SubMesh
86 public:
void SetPrimitiveType(PrimitiveType _type);
90 public: PrimitiveType SubMeshPrimitiveType()
const;
94 public:
void AddIndex(
const unsigned int _index);
104 public:
void AddVertex(
const double _x,
const double _y,
const double _z);
114 public:
void AddNormal(
const double _x,
const double _y,
const double _z);
123 public:
void AddTexCoord(
const double _u,
const double _v);
137 public:
void AddTexCoordBySet(
double _u,
double _v,
138 unsigned int _setIndex);
145 unsigned int _setIndex);
151 public:
void AddNodeAssignment(
const unsigned int _vertex,
152 const unsigned int _node,
153 const float _weight);
164 public:
void SetVertex(
const unsigned int _index,
177 public:
void SetNormal(
const unsigned int _index,
186 const unsigned int _index)
const;
197 unsigned int _setIndex)
const;
205 public:
void SetTexCoord(
const unsigned int _index,
212 public:
void SetTexCoordBySet(
unsigned int _index,
214 unsigned int _setIdex);
219 public:
int Index(
const unsigned int _index)
const;
224 public:
void SetIndex(
const unsigned int _index,
225 const unsigned int _i);
234 const unsigned int _index)
const;
246 public:
unsigned int VertexCount()
const;
250 public:
unsigned int NormalCount()
const;
254 public:
unsigned int IndexCount()
const;
263 public:
unsigned int TexCoordCount()
const;
269 public:
unsigned int TexCoordCountBySet(
unsigned int _setIndex)
const;
273 public:
unsigned int TexCoordSetCount()
const;
277 public:
unsigned int NodeAssignmentsCount()
const;
281 public:
unsigned int MaxIndex()
const;
286 public:
void SetMaterialIndex(
const unsigned int _index);
290 public:
unsigned int MaterialIndex()
const;
302 public:
bool HasVertex(
const unsigned int _index)
const;
309 public:
bool HasNormal(
const unsigned int _index)
const;
321 public:
bool HasTexCoord(
const unsigned int _index)
const;
329 public:
bool HasTexCoordBySet(
unsigned int _index,
unsigned int _setIndex)
337 public:
bool HasNodeAssignment(
const unsigned int _index)
const;
347 public:
void FillArrays(
double **_vertArr,
int **_indexndArr)
const;
350 public:
void RecalculateNormals();
355 public:
void GenSphericalTexCoord(
362 public:
void GenSphericalTexCoordBySet(
364 unsigned int _setIndex);
372 public:
void Scale(
const double &_factor);
395 public:
double Volume()
const;
398 IGN_UTILS_IMPL_PTR(dataPtr)
@ TRIFANS
Connected triangle in fan shape. 3 vertices for the first triangle and every vertex specified afterwa...
Definition: gz/common/SubMesh.hh:59
@ LINESTRIPS
Connected lines. 2 vertices for the first line and every vertex specified afterwards creates a new li...
Definition: gz/common/SubMesh.hh:53
Forward declarations for the common classes.
Vertex to node weighted assignement for skeleton animation visualization.
Definition: gz/common/SubMesh.hh:403
@ POINTS
Point. 1 vertex per point.
Definition: gz/common/SubMesh.hh:48
float weight
The weight (between 0 and 1). This determines how much the node (bone) affects the vertex in animatio...
Definition: gz/common/SubMesh.hh:416
@ TRIANGLES
Triangle type. 3 vertices per triangle.
Definition: gz/common/SubMesh.hh:55
static const Vector3 Zero
unsigned int nodeIndex
Node (or bone) index.
Definition: gz/common/SubMesh.hh:412
@ LINES
Line. 2 vertices per line.
Definition: gz/common/SubMesh.hh:50
PrimitiveType
An enumeration of the geometric mesh primitives.
Definition: gz/common/SubMesh.hh:45
unsigned int vertexIndex
Index of the vertex.
Definition: gz/common/SubMesh.hh:409
A child mesh.
Definition: gz/common/SubMesh.hh:42