
Public Member Functions | |
| vtMesh (enum PrimType ePrimType, int VertType, int NumVertices) | |
| void | Release () |
| Use this method instead of delete, when you are done with this object. | |
| void | GetBoundBox (FBox3 &box) const |
| void | AddTri (int p0, int p1, int p2) |
| void | AddFan (int p0, int p1, int p2=-1, int p3=-1, int p4=-1, int p5=-1) |
| void | AddFan (int *idx, int iNVerts) |
| void | AddStrip (int iNVerts, unsigned short *pIndices) |
| void | AddLine (int p0, int p1) |
| int | AddLine (const FPoint3 &pos1, const FPoint3 &pos2) |
| void | AddQuad (int p0, int p1, int p2, int p3) |
| void | SetVtxPos (unsigned int, const FPoint3 &) |
| FPoint3 | GetVtxPos (unsigned int i) const |
| void | SetVtxNormal (unsigned int, const FPoint3 &) |
| FPoint3 | GetVtxNormal (unsigned int i) const |
| void | SetVtxColor (unsigned int, const RGBAf &) |
| RGBAf | GetVtxColor (unsigned int i) const |
| void | SetVtxTexCoord (unsigned int, const FPoint2 &) |
| FPoint2 | GetVtxTexCoord (unsigned int i) const |
| void | SetLineWidth (float fWidth) |
| void | ReOptimize () |
| void | AllowOptimize (bool bAllow) |
| void | SetNormalsFromPrimitives () |
Friends | |
| class | vtGeom |
|
||||||||||||||||
|
Construct a Mesh. A Mesh is a container for a set of vertices and primitives.
|
|
||||||||||||
|
Add a triangle fan with any number of points.
Implements vtMeshBase. |
|
||||||||||||||||||||||||||||
|
Add a triangle fan with up to 6 points (center + 5 points). The first 3 arguments are required, the rest are optional. A fan will be created with as many point indices as you pass. Implements vtMeshBase. |
|
||||||||||||
|
Add a single line primitive to a mesh.
|
|
||||||||||||
|
Add a single line primitive to a mesh.
|
|
||||||||||||||||||||
|
Add a triangle. p0, p1, p2 are the indices of the vertices of the triangle. Implements vtMeshBase. |
|
||||||||||||
|
Adds an indexed triangle strip to the mesh.
Implements vtMeshBase. |
|
||||||||||||||||
|
Add a triangle. p0, p1, p2 are the indices of the vertices of the triangle. Implements vtMeshBase. |
|
|
Set whether to allow rendering optimization of this mesh. With OpenGL, this optimization is called a "display list", which increases the speed of rendering by creating a special representation of the mesh the first time it is drawn. The tradeoff is that subsequent changes to the mesh are not applied unless you call ReOptimize().
|
|
|
Computes the bounding box of the mesh, based on the extent of its vertices. Result is placed in the 'box' parameter. If there are no vertices, then 'box' is unchanged. Reimplemented from vtMeshBase. |
|
|
Get the color of a vertex. Implements vtMeshBase. |
|
|
Get the normal of a vertex. Implements vtMeshBase. |
|
|
Get the position of a vertex. Implements vtMeshBase. |
|
|
Get the texture coordinates of a vertex. Implements vtMeshBase. |
|
|
For a mesh with rendering optimization enabled, forces an update of the optimized representation. |
|
|
Set the line width, in pixels, for this mesh's geometry. You should call this method _after_ the mesh has been added to some geometry with vtGeom::AddMesh() (this requirement was found with the OSG flavor of vtlib.) |
|
|
Set the normals of the vertices by combining the normals of the surrounding faces. This requires going through all the primitives to average their contribution to each vertex. |
|
||||||||||||
|
Set the color of a vertex. This color multiplies with the color of the material used with the mesh, so if you want the vertex color to be dominant, use a white material.
Implements vtMeshBase. |
|
||||||||||||
|
Set the normal of a vertex. This is used for lighting, if the mesh is used with a material with lighting enabled. Generally you will want to use a vector of unit length.
Implements vtMeshBase. |
|
||||||||||||
|
Set the position of a vertex.
Implements vtMeshBase. |
|
||||||||||||
|
Set the texture coordinates of a vertex. Generally these values are in the range of 0 to 1, although you can use higher values if you want repeating tiling. The components of the texture coordinates are usually called "u" and "v".
Implements vtMeshBase. |
1.4.5