The MeshGeometry is used for triangle mesh geometry.
More...
#include <avogadro/rendering/meshgeometry.h>
|
| MeshGeometry (const MeshGeometry &other) |
|
MeshGeometry & | operator= (MeshGeometry) |
|
void | accept (Visitor &) AVO_OVERRIDE |
|
void | render (const Camera &camera) |
| Render the mesh geometry. More...
|
|
void | clear () |
|
size_t | vertexCount () const |
|
size_t | indexCount () const |
|
size_t | triangleCount () const |
|
Core::Array< PackedVertex > | vertices () |
|
Core::Array< unsigned int > | triangles () |
|
|
unsigned int | addVertices (const Core::Array< Vector3f > &vertices, const Core::Array< Vector3f > &normals, const Core::Array< Vector4ub > &colors) |
|
unsigned int | addVertices (const Core::Array< Vector3f > &vertices, const Core::Array< Vector3f > &normals, const Core::Array< Vector3ub > &colors) |
|
unsigned int | addVertices (const Core::Array< Vector3f > &vertices, const Core::Array< Vector3f > &normals) |
|
|
void | addTriangle (unsigned int index1, unsigned int index2, unsigned int index3) |
|
void | addTriangles (const Core::Array< unsigned int > &indices) |
|
|
void | setColor (const Vector3ub &c) |
|
Vector3ub | color () const |
|
|
void | setOpacity (unsigned char opacity_) |
|
unsigned char | opacity () const |
|
| Drawable (const Drawable &other) |
|
Drawable & | operator= (Drawable) |
|
const GeometryNode * | parent () const |
| Get a pointer to the drawable object's parent. More...
|
|
GeometryNode * | parent () |
|
void | setVisible (bool visibility) |
| Set the visibility of the drawable object. More...
|
|
bool | isVisible () const |
| Get the current visibility of the drawable. More...
|
|
Identifier & | identifier () |
|
const Identifier & | identifier () const |
|
virtual std::multimap< float,
Identifier > | hits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const |
|
void | setRenderPass (RenderPass pass) |
|
RenderPass | renderPass () const |
|
|
static const unsigned int | InvalidIndex |
|
Accept a visit from our friendly visitor.
Reimplemented from Drawable.
void render |
( |
const Camera & |
camera | ) |
|
|
virtual |
- Parameters
-
camera | The current camera to be used for rendering. |
Reimplemented from Drawable.
Add vertices to the object. Note that this just adds vertices to the object. Use addTriangles with size_t indices to actually draw them.
- Parameters
-
vertices | The 3D vertex points to add to the drawable. |
normals | The normal direction at the vertex. |
colors | Vertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used. |
- Note
- All arrays must be the same length, or this function call will fail, returning InvalidIndex.
- Returns
- The index of the first vertex added by this call, used to specify element arrays for the actual triangles.
Add vertices to the object. Note that this just adds vertices to the object. Use addTriangles with size_t indices to actually draw them.
- Parameters
-
vertices | The 3D vertex points to add to the drawable. |
normals | The normal direction at the vertex. |
colors | Vertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used. |
- Note
- All arrays must be the same length, or this function call will fail, returning InvalidIndex.
- Returns
- The index of the first vertex added by this call, used to specify element arrays for the actual triangles.
unsigned int addVertices |
( |
const Core::Array< Vector3f > & |
vertices, |
|
|
const Core::Array< Vector3f > & |
normals |
|
) |
| |
Add vertices to the object. Note that this just adds vertices to the object. Use addTriangles with size_t indices to actually draw them.
- Parameters
-
vertices | The 3D vertex points to add to the drawable. |
normals | The normal direction at the vertex. |
colors | Vertex color. If not specified, use the current color() and opacity(). If the 3 component color is set, the current opacity() is used. |
- Note
- All arrays must be the same length, or this function call will fail, returning InvalidIndex.
- Returns
- The index of the first vertex added by this call, used to specify element arrays for the actual triangles.
void addTriangle |
( |
unsigned int |
index1, |
|
|
unsigned int |
index2, |
|
|
unsigned int |
index3 |
|
) |
| |
Add triangles to the mesh. Triangles are specified as 3-tuples of vertex indices. Must call addVertices first, and use the return value to obtain the valid index range.
void addTriangles |
( |
const Core::Array< unsigned int > & |
indices | ) |
|
Add triangles to the mesh. Triangles are specified as 3-tuples of vertex indices. Must call addVertices first, and use the return value to obtain the valid index range.
Clear the contents of the node.
Reimplemented from Drawable.
size_t vertexCount |
( |
| ) |
const |
Get the number of vertices.
size_t indexCount |
( |
| ) |
const |
Get the number of vertices.
size_t triangleCount |
( |
| ) |
const |
Get the number of triangles.
void setColor |
( |
const Vector3ub & |
c | ) |
|
The default color of the mesh. This is used to set the color of new vertices when no explicit vertex color is specified.
Vector3ub color |
( |
| ) |
const |
The default color of the mesh. This is used to set the color of new vertices when no explicit vertex color is specified.
void setOpacity |
( |
unsigned char |
opacity_ | ) |
|
The default opacity of the mesh. This is used when either no explicit vertex color is specified, or a three component color is used.
unsigned char opacity |
( |
| ) |
const |
The default opacity of the mesh. This is used when either no explicit vertex color is specified, or a three component color is used.
The documentation for this class was generated from the following file: