iPolygonBuffer Struct Reference
[3D]
@@OR@@ This interface represents a black-box polygon buffer.
More...
#include <vbufmgr.h>
Inheritance diagram for iPolygonBuffer:

Public Methods | |
virtual void | SetVertexArray (csVector3 *verts, int num_verts)=0 |
Set vertices to use for the polygons. | |
virtual int | GetVertexCount () const=0 |
Gets the number of vertices. | |
virtual csVector3 * | GetVertices () const=0 |
Gets the array of vertices. | |
virtual void | AddMaterial (iMaterialHandle *mat_handle)=0 |
Add a material. | |
virtual int | GetMaterialCount () const=0 |
Get the number of materials. | |
virtual iMaterialHandle * | GetMaterial (int idx) const=0 |
Get a material. | |
virtual void | SetMaterial (int idx, iMaterialHandle *mat_handle)=0 |
Set a previously added material (this can be used to change a material handle). | |
virtual void | Clear ()=0 |
Clear all polygons, materials, and vertex array. | |
virtual void | Prepare ()=0 |
After adding everything and before using this polygon buffer you should call Prepare(). | |
virtual void | MarkLightmapsDirty ()=0 |
Sets the polygon buffer as dirty. | |
virtual const csBox3 & | GetBoundingBox () const=0 |
Get a bounding box for all the vertices. | |
virtual void | AddPolygon (int num_verts, int *verts, csPolyTextureMapping *texmap, const csPlane3 &poly_normal, int mat_index, iRendererLightmap *lm)=0 |
Add a polygon to this buffer. |
Detailed Description
@@OR@@ This interface represents a black-box polygon buffer.It is used to draw a mesh of polygons. The vertex buffer manager will create instances of iPolygonBuffer. Internally it will hold the most efficient representation for the 3D renderer to actually render the polygons. On hardware this may means that the polygons are converted to triangle meshes or triangle fans/strips. With the software renderer it will probably keep the polygons as such. Polygons in this buffer used indexed coordinates (with indices that are usually relative to a vertex buffer).
Definition at line 104 of file vbufmgr.h.
Member Function Documentation
|
Add a material.
|
|
Add a polygon to this buffer. The data pointed to by 'verts' is copied so it can be discarded after calling AddPolygon. 'mat_index' is an index in the material table (initialized with AddMaterial()). It is best to add the polygons sorted by material as that will generate the most efficient representation on hardware. |
|
Clear all polygons, materials, and vertex array.
|
|
Get a bounding box for all the vertices.
|
|
Get a material.
|
|
Get the number of materials.
|
|
Gets the number of vertices.
|
|
Gets the array of vertices.
|
|
Sets the polygon buffer as dirty. This means that the mesh is affected by some light. |
|
After adding everything and before using this polygon buffer you should call Prepare().
|
|
Set a previously added material (this can be used to change a material handle).
|
|
Set vertices to use for the polygons. The given array is copied. |
The documentation for this struct was generated from the following file:
- ivideo/vbufmgr.h
Generated for Crystal Space by doxygen 1.2.18