#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. | |
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. | |
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. | |
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. | |
virtual void | NextFrame (csTicks current_time)=0 |
Control animation of this object. | |
virtual bool | WantToDie () const=0 |
If this method returns true this object wants to die. 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. | |
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 long | GetShapeNumber () const=0 |
Return a number which will change as soon as the object undergoes a fundamental change that affects the maximum bounding box. 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.
|
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. |
|
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(). |
|
Get the bounding box in object space for this mesh object. Type has three possibilities:
|
|
Return a number which will change as soon as the object undergoes a fundamental change that affects the maximum bounding box. Using this number you can test if you need to get the bounding box again and perform calculations on that. |
|
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. |
|
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. |
|
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. |
|
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. |
|
If this method returns true this object wants to die. The user of this object should take care to make it die at the soonest possible time. This is usally used for things like particle systems that only have a limited time to live. |