![]() |
Public API Reference |
#include <object.h>
Inheritance diagram for iMeshObject:
Public Methods | |
virtual iMeshObjectFactory * | GetFactory () const=0 |
Get the reference to the factory that created this mesh object. More... | |
virtual bool | DrawTest (iRenderView *rview, iMovable *movable)=0 |
First part of Draw. More... | |
virtual void | UpdateLighting (iLight **lights, int num_lights, iMovable *movable)=0 |
Update lighting for the object on the given position. More... | |
virtual bool | Draw (iRenderView *rview, iMovable *movable, csZBufMode zbufMode)=0 |
Draw this mesh object. More... | |
virtual void | SetVisibleCallback (iMeshObjectDrawCallback *cb)=0 |
Register a callback to the mesh object which will be called from within Draw() if the mesh object thinks that the object is really visible. More... | |
virtual iMeshObjectDrawCallback * | GetVisibleCallback () const=0 |
Get the current visible callback. More... | |
virtual void | NextFrame (csTicks current_time, const csVector3 &pos)=0 |
Control animation of this object. More... | |
virtual void | HardTransform (const csReversibleTransform &t)=0 |
Do a hard transform of this object. More... | |
virtual bool | SupportsHardTransform () const=0 |
Return true if HardTransform is supported for this mesh object type. More... | |
virtual bool | HitBeamOutline (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr)=0 |
Check if this mesh is hit by this object space vector. More... | |
virtual bool | HitBeamObject (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr)=0 |
Check if this mesh is hit by this object space vector. More... | |
virtual void | SetLogicalParent (iBase *logparent)=0 |
Set a reference to some logical parent in the context that holds the mesh objects. More... | |
virtual iBase * | GetLogicalParent () const=0 |
Get the logical parent for this mesh object. More... | |
virtual iObjectModel * | GetObjectModel ()=0 |
Get the generic interface describing the geometry of this mesh. More... | |
virtual bool | SetColor (const csColor &color)=0 |
Set the base color of the mesh. More... | |
virtual bool | GetColor (csColor &color) const=0 |
Get the base color of the mesh. More... | |
virtual bool | SetMaterialWrapper (iMaterialWrapper *material)=0 |
Set the material of the mesh. More... | |
virtual iMaterialWrapper * | GetMaterialWrapper () const=0 |
Get the material of the mesh. More... |
The mesh object only manages its shape, texture etc. but *not* its position, sector or similar information. For this reason, a mesh object can only be used in the engine if a hook object is created for it in the engine that does the required management. The hook object is called mesh wrapper.
Definition at line 58 of file imesh/object.h.
|
Draw this mesh object. Returns false if not visible. If this function returns true it does not mean that the object is invisible. It just means that this MeshObject thinks that the object was probably visible. DrawTest() will be called before this function (possibly with an UpdateLighting() in between. Implemented in csMeshObject. |
|
First part of Draw. The engine will call this DrawTest() before calling Draw() so DrawTest() can (if needed) remember computationally expensive data. If DrawTest() returns false the engine will not call Draw(). Possibly UpdateLighting() will be called in between DrawTest() and Draw(). Implemented in csMeshObject. |
|
Get the base color of the mesh. Will return false if not supported. Implemented in csMeshObject. |
|
Get the reference to the factory that created this mesh object.
Implemented in csMeshObject. |
|
Get the logical parent for this mesh object. See SetLogicalParent() for more information. Implemented in csMeshObject. |
|
Get the material of the mesh. If not supported this will return NULL. Implemented in csMeshObject. |
|
Get the generic interface describing the geometry of this mesh. If the factory supports this you should preferably use the object model from the factory instead. Implemented in csMeshObject. |
|
Get the current visible callback.
Implemented in csMeshObject. |
|
Do a hard transform of this object. This transformation and the original coordinates are not remembered but the object space coordinates are directly computed (world space coordinates are set to the object space coordinates by this routine). Note that some implementations of mesh objects will not change the orientation of the object but only the position. Implemented in csMeshObject. |
|
Check if this mesh is hit by this object space vector. Return the collision point in object space coordinates. This is the most detailed version (and also the slowest). The returned hit will be guaranteed to be the point closest to the 'start' of the beam. Implemented in csMeshObject. |
|
Check if this mesh is hit by this object space vector. This will do a test based on the outline of the object. This means that it is more accurate than HitBeamBBox(). Note that this routine will typically be faster than HitBeamObject(). The hit may be on the front or the back of the object, but will indicate that it iterrupts the beam. Implemented in csMeshObject. |
|
Control animation of this object.
Implemented in csMeshObject. |
|
Set the base color of the mesh. This color will be added to whatever color is set for lighting. Not all meshes need to support this. This function will return true if it worked. Implemented in csMeshObject. |
|
Set a reference to some logical parent in the context that holds the mesh objects. When a mesh object is used in the context of the 3D engine then this will be an iMeshWrapper. In case it is used in the context of the isometric engine this will be an iIsoMeshSprite. Note that this function should NOT increase the ref-count of the given logical parent because this would cause a circular reference (since the logical parent already holds a reference to this mesh object). Implemented in csMeshObject. |
|
Set the material of the mesh. This only works for single-material meshes. If not supported this function will return false. Implemented in csMeshObject. |
|
Register a callback to the mesh object which will be called from within Draw() if the mesh object thinks that the object is really visible. Depending on the type of mesh object this can be very accurate or not accurate at all. But in all cases it will certainly be called if the object is visible. Implemented in csMeshObject. |
|
Return true if HardTransform is supported for this mesh object type.
Implemented in csMeshObject. |
|
Update lighting for the object on the given position.
Implemented in csMeshObject. |