![]() |
Public API Reference |
#include <meshobj.h>
Inheritance diagram for csMeshWrapper:
Public Methods | |
csMeshWrapper (iMeshWrapper *theParent, iMeshObject *meshobj) | |
Constructor. More... | |
csMeshWrapper (iMeshWrapper *theParent) | |
Constructor. More... | |
void | SetParentContainer (iMeshWrapper *newParent) |
Set parent container for this object. More... | |
iMeshWrapper * | GetParentContainer () const |
Get parent container for this object. More... | |
void | SetFactory (iMeshFactoryWrapper *factory) |
Set the mesh factory. More... | |
iMeshFactoryWrapper * | GetFactory () const |
Get the mesh factory. More... | |
void | SetMeshObject (iMeshObject *meshobj) |
Set the mesh object. More... | |
iMeshObject * | GetMeshObject () const |
Get the mesh object. More... | |
void | SetZBufMode (csZBufMode mode) |
Set the Z-buf drawing mode to use for this object. More... | |
csZBufMode | GetZBufMode () const |
Get the Z-buf drawing mode. More... | |
void | SetDrawCallback (iMeshDrawCallback *cb) |
Set a callback which is called just before the object is drawn. More... | |
void | SetVisibilityNumber (uint32 vis) |
Mark this object as visible. More... | |
uint32 | GetVisibilityNumber () const |
Return if this object is visible. More... | |
void | UpdateLighting (iLight **lights, int num_lights) |
Light object according to the given array of lights (i.e. More... | |
void | DeferUpdateLighting (int flags, int num_lights) |
Update lighting as soon as the object becomes visible. More... | |
void | Draw (iRenderView *rview) |
Draw this mesh object given a camera transformation. More... | |
csMovable & | GetMovable () |
Get the movable instance for this object. More... | |
void | PlaceMesh () |
This routine will find out in which sectors a mesh object is positioned. More... | |
int | HitBeamBBox (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr) |
Check if this object is hit by this object space vector. More... | |
bool | HitBeamOutline (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr) |
Check if this object is hit by this object space vector. More... | |
bool | HitBeamObject (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr) |
Check if this object is hit by this object space vector. More... | |
bool | HitBeam (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr) |
Check if this object is hit by this world space vector. More... | |
const csMeshMeshList & | GetChildren () const |
Get the children of this mesh object. More... | |
void | GetRadius (csVector3 &rad, csVector3 ¢) const |
Get the radius of this mesh and all its children. More... | |
void | HardTransform (const csReversibleTransform &t) |
Do a hard transform of this object. More... | |
void | GetWorldBoundingBox (csBox3 &cbox) |
Get the bounding box of this object in world space. More... | |
void | GetTransformedBoundingBox (const csReversibleTransform &trans, csBox3 &cbox) |
Get the bounding box of this object after applying a transformation to it. More... | |
float | GetScreenBoundingBox (const iCamera *camera, csBox2 &sbox, csBox3 &cbox) |
Get a very inaccurate bounding box of the object in screen space. More... | |
void | SetRenderPriority (long rp) |
Set the render priority for this object. More... | |
long | GetRenderPriority () const |
Get the render priority for this object. More... | |
void | SetImposterActive (bool flag, iObjectRegistry *objreg) |
Set true if this Mesh should use Impostering. More... | |
bool | GetImposterActive () const |
Determine if this mesh is using Impostering (not if Imposter is being drawn, but simply considered). More... | |
void | SetMinDistance (iSharedVariable *dist) |
Minimum Imposter Distance is the distance from camera beyond which imposter is used. More... | |
void | SetRotationTolerance (iSharedVariable *angle) |
Rotation Tolerance is the maximum allowable angle difference between when the imposter was created and the current position of the camera. More... | |
void | CreateImposter (csReversibleTransform &) |
Tells the object to create its proctex and polygon for use by main render process later, relative to the specified Point Of View. More... | |
bool | DrawImposter (iRenderView *rview) |
Renders the imposter on the screen. More... | |
bool | WouldUseImposter (csReversibleTransform &) |
Determine if imposter or true rendering will be used. More... | |
bool | CheckImposterRelevant (iRenderView *rview) |
This is true function to check distances. Fn above may not be needed. More... | |
void | DrawIntFull (iRenderView *rview) |
Draw this mesh object given a camera transformation, non-impostered. More... | |
Public Attributes | |
csFlags | flags |
Set of flags. More... | |
csFlags | culler_flags |
Culler flags. More... | |
Protected Methods | |
void | GetFullBBox (csBox3 &box) |
Get the bounding box in object space but correct in hierarchy. More... | |
void | UpdateDeferedLighting (const csBox3 &box) |
Update defered lighting. More... | |
void | MoveToSector (csSector *s) |
Move this object to the specified sector. Can be called multiple times. More... | |
void | RemoveFromSectors () |
Remove this object from all sectors it is in (but not from the engine). More... | |
void | UpdateMove () |
Update transformations after the object has moved (through updating the movable instance). More... | |
void | DrawInt (iRenderView *rview) |
This function determines whether to draw the imposter or the true mesh and calls the appropriate function. More... | |
virtual | ~csMeshWrapper () |
Destructor. More... | |
Protected Attributes | |
iMeshWrapper * | Parent |
The parent mesh object, or NULL. More... | |
csBox3 | wor_bbox |
Bounding box in world space. More... | |
long | wor_bbox_movablenr |
Last used movable number for wor_bbox. More... | |
int | defered_num_lights |
Defered lighting. If > 0 then we have defered lighting. More... | |
int | defered_lighting_flags |
Flags to use for defered lighting. More... | |
csTicks | last_anim_time |
This value indicates the last time that was used to do animation. More... | |
uint32 | visnr |
Current visibility number used by the visibility culler. More... | |
csMovable | movable |
Position in the world. More... | |
long | render_priority |
The renderer will render all objects in a sector based on this number. More... | |
Friends | |
class | csMovable |
class | csMovableSectorList |
Definition at line 145 of file meshobj.h.
|
Destructor. This is private in order to force clients to use DecRef() for object destruction. |
|
Constructor.
|
|
Constructor.
|
|
This is true function to check distances. Fn above may not be needed.
|
|
Tells the object to create its proctex and polygon for use by main render process later, relative to the specified Point Of View.
|
|
Update lighting as soon as the object becomes visible. This will call engine->GetNearestLights with the supplied parameters. |
|
Draw this mesh object given a camera transformation. If needed the skeleton state will first be updated. Optionally update lighting if needed (DeferUpdateLighting()). |
|
Renders the imposter on the screen.
|
|
This function determines whether to draw the imposter or the true mesh and calls the appropriate function.
|
|
Draw this mesh object given a camera transformation, non-impostered. If needed the skeleton state will first be updated. Optionally update lighting if needed (DeferUpdateLighting()). |
|
Get the children of this mesh object.
|
|
Get the mesh factory.
|
|
Get the bounding box in object space but correct in hierarchy.
|
|
Determine if this mesh is using Impostering (not if Imposter is being drawn, but simply considered).
|
|
Get the mesh object.
|
|
Get the movable instance for this object. It is very important to call GetMovable().UpdateMove() after doing any kind of modification to this movable to make sure that internal data structures are correctly updated. |
|
Get parent container for this object.
|
|
Get the radius of this mesh and all its children.
|
|
Get the render priority for this object.
Definition at line 485 of file meshobj.h. References render_priority. |
|
Get a very inaccurate bounding box of the object in screen space. Returns -1 if object behind the camera or else the distance between the camera and the furthest point of the 3D box. |
|
Get the bounding box of this object after applying a transformation to it. This is really a very inaccurate function as it will take the bounding box of the object in object space and then transform this bounding box. |
|
Return if this object is visible.
|
|
Get the bounding box of this object in world space. This routine will cache the bounding box and only recalculate it if the movable changes. |
|
Get the Z-buf drawing mode.
|
|
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 object is hit by this world space vector. Return the collision point in world space coordinates. |
|
Check if this object is hit by this object space vector. BBox version. |
|
Check if this object is hit by this object space vector. Return the collision point in object space coordinates. |
|
Check if this object is hit by this object space vector. Outline version. |
|
Move this object to the specified sector. Can be called multiple times.
|
|
This routine will find out in which sectors a mesh object is positioned. To use it the mesh has to be placed in one starting sector. This routine will then start from that sector, find all portals that touch the sprite and add all additional sectors from those portals. Note that this routine using a bounding sphere for this test so it is possible that the mesh will be added to sectors where it really isn't located (but the sphere is). If the mesh is already in several sectors those additional sectors will be ignored and only the first one will be used for this routine. |
|
Remove this object from all sectors it is in (but not from the engine).
|
|
Set a callback which is called just before the object is drawn. This is useful to do some expensive computations which only need to be done on a visible object. Note that this function will be called even if the object is not visible. In general it is called if there is a likely probability that the object is visible (i.e. it is in the same sector as the camera for example). Definition at line 320 of file meshobj.h. References csRefArray::Push. |
|
Set the mesh factory.
|
|
Set true if this Mesh should use Impostering.
|
|
Set the mesh object.
|
|
Minimum Imposter Distance is the distance from camera beyond which imposter is used. Imposter gets a ptr here because value is a shared variable which can be changed at runtime for many objects. |
|
Set parent container for this object.
|
|
Set the render priority for this object.
|
|
Rotation Tolerance is the maximum allowable angle difference between when the imposter was created and the current position of the camera. Angle greater than this triggers a re-render of the imposter. |
|
Mark this object as visible.
|
|
Set the Z-buf drawing mode to use for this object.
|
|
Update defered lighting.
|
|
Light object according to the given array of lights (i.e. fill the vertex color array). |
|
Update transformations after the object has moved (through updating the movable instance). This MUST be done after you change the movable otherwise some of the internal data structures will not be updated correctly. This function is called by movable.UpdateMove(); |
|
Determine if imposter or true rendering will be used.
|
|
Culler flags.
|
|
Flags to use for defered lighting.
|
|
Defered lighting. If > 0 then we have defered lighting.
|
|
Set of flags.
|
|
This value indicates the last time that was used to do animation. If 0 then we haven't done animation yet. We compare this value with the value returned by engine->GetLastAnimationTime() to see if we need to call meshobj->NextFrame() again. |
|
Position in the world.
|
|
The parent mesh object, or NULL.
|
|
The renderer will render all objects in a sector based on this number. Low numbers get rendered first. High numbers get rendered later. There are a few predefined slots which the application is free to use or not. Definition at line 204 of file meshobj.h. Referenced by GetRenderPriority. |
|
Current visibility number used by the visibility culler.
Definition at line 191 of file meshobj.h. Referenced by GetVisibilityNumber, and SetVisibilityNumber. |
|
Bounding box in world space. This is a cache for GetWorldBoundingBox() which will recalculate this if the movable changes (by using movablenr). |
|
Last used movable number for wor_bbox.
|