![]() |
Public API Reference |
#include <objmodel.h>
Inheritance diagram for iObjectModel:
Public Methods | |
virtual long | GetShapeNumber () const=0 |
Returns a number that will change whenever the shape of this object changes. More... | |
virtual iPolygonMesh * | GetPolygonMeshBase ()=0 |
Get a polygon mesh representing the basic geometry of the object. More... | |
virtual iPolygonMesh * | GetPolygonMeshColldet ()=0 |
Get a polygon mesh representing the geometry of the object. More... | |
virtual void | SetPolygonMeshColldet (iPolygonMesh *polymesh)=0 |
Set a polygon mesh representing the geometry of the object. More... | |
virtual iPolygonMesh * | GetPolygonMeshViscull ()=0 |
Get a polygon mesh specifically for visibility culling (to be used as an occluder). More... | |
virtual void | SetPolygonMeshViscull (iPolygonMesh *polymesh)=0 |
Set a polygon mesh representing the geometry of the object. More... | |
virtual csPtr< iPolygonMesh > | CreateLowerDetailPolygonMesh (float detail)=0 |
Create a polygon mesh representing a lower detail version of the object but without the restrictions of GetPolygonMeshViscull(). More... | |
virtual void | GetObjectBoundingBox (csBox3 &bbox, int type=CS_BBOX_NORMAL)=0 |
Get the bounding box in object space for this mesh object. More... | |
virtual void | GetRadius (csVector3 &radius, csVector3 ¢er)=0 |
Get the radius and center of this object in object space. More... | |
virtual void | AddListener (iObjectModelListener *listener)=0 |
Add a listener to this object model. More... | |
virtual void | RemoveListener (iObjectModelListener *listener)=0 |
Remove a listener from this object model. More... |
It is a generic way to describe meshes in the engine. By using this interface you can make sure your code works on all engine geometry. The data returned by this class is in local object space.
Definition at line 82 of file igeom/objmodel.h.
|
Add a listener to this object model. This listener will be called whenever the object model changes or right before it is destroyed. Implemented in csObjectModel. |
|
Create a polygon mesh representing a lower detail version of the object but without the restrictions of GetPolygonMeshViscull(). The floating point input number is 0 for minimum detail and 1 for highest detail. This function may return the same polygon mesh as GetPolygonMeshColldet() (but with ref count incremented by one). Can return NULL if this object model doesn't support that. Implemented in csObjectModel. |
|
Get the bounding box in object space for this mesh object. Type has three possibilities:
|
|
Get a polygon mesh representing the basic geometry of the object. Can return NULL if this object model doesn't support that. Implemented in csObjectModel. |
|
Get a polygon mesh representing the geometry of the object. This mesh is useful for collision detection. Can return NULL if this object model doesn't support that. Implemented in csObjectModel. |
|
Get a polygon mesh specifically for visibility culling (to be used as an occluder). This polygon mesh is guaranteed to be smaller or equal to the real object. In other words: if you would render the original mesh in red and this one in blue you should not see any blue anywhere. This kind of lower detail version can be used for occlusion writing in a visibility culling system. Can return NULL if this object model doesn't support that. In that case the object will not be used for visibility culling. Implemented in csObjectModel. |
|
Get the radius and center of this object in object space.
|
|
Returns a number that will change whenever the shape of this object changes. If that happens then the data in all the returned polygon meshes and bounding volumes will be invalid. Implemented in csObjectModel. |
|
Remove a listener from this object model.
Implemented in csObjectModel. |
|
Set a polygon mesh representing the geometry of the object. This mesh is useful for collision detection. This can be used to replace the default polygon mesh returned by GetPolygonMeshColldet() with one that has less detail or even to support polygon mesh for mesh objects that otherwise don't support it. The object model will keep a reference to the given polymesh. Implemented in csObjectModel. |
|
Set a polygon mesh representing the geometry of the object. This mesh is useful for visibility culling. This can be used to replace the default polygon mesh returned by GetPolygonMeshViscull() with one that has less detail or even to support polygon mesh for mesh objects that otherwise don't support it. The object model will keep a reference to the given polymesh. Implemented in csObjectModel. |