torque Torque Game Engine Documentation
TGE Version 1.5.2

SceneObject Class Reference

#include <sceneObject.h>

Inheritance diagram for SceneObject:

Inheritance graph
[legend]

Detailed Description

A 3D object.

Introduction

SceneObject exists as a foundation for 3D objects in Torque. It provides the basic functionality for:
  • A scene graph (in the Zones and Portals sections), allowing efficient and robust rendering of the game scene.
  • Various helper functions, including functions to get bounding information and momentum/velocity.
  • Collision detection, as well as ray casting.
  • Lighting. SceneObjects can register lights both at lightmap generation time, and dynamic lights at runtime (for special effects, such as from flame or a projectile, or from an explosion).
  • Manipulating scene objects, for instance varying scale.

An Example

Melv May has written a most marvelous example object deriving from SceneObject. Unfortunately this page is too small to contain it.

See also:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3217 for a copy of Melv's example.


Lighting

LightingInfo mLightingInfo
 Lighting info for this object.
virtual bool getLightingAmbientColor (ColorF *col)
 Gets the color of the ambient light in the area of the object and stores it in the provided ColorF.

Transform and Collision Members

ContainermContainer
MatrixF mObjToWorld
 Transform from object space to world space.
MatrixF mWorldToObj
 Transform from world space to object space (inverse).
Point3F mObjScale
 Object scale.
Box3F mObjBox
 Bounding box in object space.
Box3F mWorldBox
 Bounding box in world space.
SphereF mWorldSphere
 Bounding sphere in world space.
MatrixF mRenderObjToWorld
 Render matrix to transform object space to world space.
MatrixF mRenderWorldToObj
 Render matrix to transform world space to object space.
Box3F mRenderWorldBox
 Render bounding box in world space.
SphereF mRenderWorldSphere
 Render bounding sphere in world space.
SceneObjectRefmZoneRefHead
SceneObjectRefmBinRefHead
U32 mBinMinX
U32 mBinMaxX
U32 mBinMinY
U32 mBinMaxY
void resetWorldBox ()
 Regenerates the world-space bounding box and bounding sphere.
void resetRenderWorldBox ()
 Regenerates the render-world-space bounding box and sphere.

Container Interface

When objects are searched, we go through all the zones and ask them for all of their objects.

Because an object can exist in multiple zones, the container sequence key is set to the id of the current search. Then, while searching, we check to see if an object's sequence key is the same as the current search key. If it is, it will NOT be added to the list of returns since it has already been processed.

U32 mContainerSeqKey
 Container sequence key.
U32 getContainerSeqKey () const
 Returns the container sequence key.
void setContainerSeqKey (const U32 key)
 Sets the container sequence key.

Rendering Members

SceneGraphmSceneManager
 SceneGraph that controls this object.
U32 mZoneRangeStart
 Start of range of zones this object controls, 0xFFFFFFFF == no zones.
U32 mNumCurrZones
 Number of zones this object exists in.
TraversalState mTraversalState
 State of this object in the SceneGraph traversal - DON'T MESS WITH THIS.
SceneStatemLastState
 Last SceneState that was used to render this object.
U32 mLastStateKey
 Last state key that was used to render this object.

Portals

virtual void getWSPortalPlane (const U32 portalIndex, PlaneF *plane)
 Returns the plane of the portal in world space.
virtual void transformModelview (const U32 portalIndex, const MatrixF &oldMV, MatrixF *newMV)
 This is used by a portal controling object to transform the base-modelview used by the scenegraph for rendering to the modelview it needs to render correctly.
virtual void transformPosition (const U32 portalIndex, Point3F &point)
 Used to tranform the position of a point based on a portal.
virtual bool computeNewFrustum (const U32 portalIndex, const F64 *oldFrustum, const F64 nearPlane, const F64 farPlane, const RectI &oldViewport, F64 *newFrustum, RectI &newViewport, const bool flippedMatrix)
 Returns a new view frustum for the portal.
virtual void openPortal (const U32 portalIndex, SceneState *pCurrState, SceneState *pParentState)
 Called before things are to be rendered from the portals point of view, to set up everything the portal needs to render correctly.
virtual void closePortal (const U32 portalIndex, SceneState *pCurrState, SceneState *pParentState)
 Called after rendering of a portal is complete, this resets the states the previous call to openPortal() changed.

Persist and console

void inspectPostApply ()
 Called after any property of the object is changed in the world editor.
 DECLARE_CONOBJECT (SceneObject)
static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Public Types

enum  { MaxObjectZones = 128 }
enum  TraversalState {
  Pending = 0,
  Working = 1,
  Done = 2
}
enum  SceneObjectMasks {
  ScaleMask = BIT(0),
  NextFreeMask = BIT(1)
}

Public Member Functions

 SceneObject ()
virtual ~SceneObject ()
void findLightGroup (NetConnection *con)
void findLights (const char *name, NetConnection *con)
const char * scriptThis ()
 Returns a value representing this object which can be passed to script functions.
virtual void renderObject (SceneState *state, SceneRenderImage *image)
 Called when the object is supposed to render itself.
virtual void renderShadow (SceneState *state, SceneRenderImage *image)
virtual bool prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState=false)
 Called when the SceneGraph is ready for the registration of RenderImages.
void addToScene ()
 Adds object to the client or server container depending on the object.
void removeFromScene ()
 Removes the object from the client/server container.
ContainergetContainer ()
 Returns a pointer to the container that contains this object.
U32 getTypeMask ()
 Returns the type mask for this object.
const bool isGlobalBounds () const
void setGlobalBounds ()
 If global bounds are set to be true, then the object is assumed to have an infinitely large bounding box for collision and rendering purposes.
Collision and transform related interface
The Render Transform is the interpolated transform with respect to the frame rate.

The Render Transform will differ from the object transform because the simulation is updated in fixed intervals, which controls the object transform. The framerate is, most likely, higher than this rate, so that is why the render transform is interpolated and will differ slightly from the object transform.

virtual void disableCollision ()
 Disables collisions for this object including raycasts.
virtual void enableCollision ()
 Enables collisions for this object.
bool isCollisionEnabled () const
 Returns true if collisions are enabled.
virtual bool isDisplacable () const
 Returns true if this object allows itself to be displaced.
virtual Point3F getMomentum () const
 Returns the momentum of this object.
virtual void setMomentum (const Point3F &momentum)
 Sets the momentum of this object.
virtual F32 getMass () const
 Returns the mass of this object.
virtual bool displaceObject (const Point3F &displaceVector)
 Displaces this object by a vector.
const MatrixFgetTransform () const
 Returns the transform which can be used to convert object space to world space.
const MatrixFgetWorldTransform () const
 Returns the transform which can be used to convert world space into object space.
const VectorFgetScale () const
 Returns the scale of the object.
const Box3FgetObjBox () const
 Returns the bounding box for this object in local coordinates.
const Box3FgetWorldBox () const
 Returns the bounding box for this object in world coordinates.
const SphereFgetWorldSphere () const
 Returns the bounding sphere for this object in world coordinates.
Point3F getBoxCenter () const
 Returns the center of the bounding box in world coordinates.
virtual void setTransform (const MatrixF &mat)
 Sets the Object -> World transform.
virtual void setScale (const VectorF &scale)
 Sets the scale for the object.
virtual void setRenderTransform (const MatrixF &mat)
 This sets the render transform for this object.
const MatrixFgetRenderTransform () const
 Returns the render transform.
const MatrixFgetRenderWorldTransform () const
 Returns the render transform to convert world to local coordinates.
const Box3FgetRenderWorldBox () const
 Returns the render world box.
virtual void buildConvex (const Box3F &box, Convex *convex)
 Builds a convex hull for this object.
virtual bool buildPolyList (AbstractPolyList *polyList, const Box3F &box, const SphereF &sphere)
 Builds a list of polygons which intersect a bounding volume.
virtual BSPNodebuildCollisionBSP (BSPTree *tree, const Box3F &box, const SphereF &sphere)
 Builds a collision tree of all the polygons which collide with a bounding volume.
virtual bool castRay (const Point3F &start, const Point3F &end, RayInfo *info)
 Casts a ray and obtain collision information, returns true if RayInfo is modified.
virtual bool collideBox (const Point3F &start, const Point3F &end, RayInfo *info)
Point3F getPosition () const
 Returns the position of the object.
Point3F getRenderPosition () const
 Returns the render-position of the object.
void setPosition (const Point3F &pos)
 Sets the position of the object.
virtual Point3F getVelocity () const
 Gets the velocity of the object.
virtual void setVelocity (const Point3F &v)
 Sets the velocity of the object.
Zones
A zone is a portalized section of an InteriorInstance, and an InteriorInstance can manage more than one zone.

There is always at least one zone in the world, zone 0, which represents the whole world. Any other zone will be in an InteriorInstance. Torque keeps track of the zones containing an object as it moves throughout the world. An object can exists in multiple zones at once.

bool isManagingZones () const
 Returns true if this object is managing zones.
U32 getZoneRangeStart () const
 Gets the index of the first zone this object manages in the collection of zones.
U32 getNumCurrZones () const
 Gets the number of zones containing this object.
U32 getCurrZone (const U32 index) const
 Returns the nth zone containing this object.
virtual bool getOverlappingZones (SceneObject *obj, U32 *zones, U32 *numZones)
 If an object exists in multiple zones, this method will give you the number and indices of these zones (storing them in the provided variables).
virtual U32 getPointZone (const Point3F &p)
 Returns the zone containing p.
virtual bool scopeObject (const Point3F &rootPosition, const F32 rootDistance, bool *zoneScopeState)
 This is called on a zone managing object to scope all the zones managed.

Data Fields

bool overrideOptions
bool receiveLMLighting
bool receiveSunLight
bool useAdaptiveSelfIllumination
bool useCustomAmbientLighting
bool customAmbientForSelfIllumination
ColorF customAmbientLighting
StringTableEntry lightGroupName
Vector< S32lightIds
bool useLightingOcclusion
U32 moveSnapshotId

Protected Member Functions

bool onAdd ()
 Called when the object is added to the sim.
void onRemove ()
 Called when the object is removed from the sim.
virtual bool onSceneAdd (SceneGraph *graph)
 Called when this is added to the SceneGraph.
virtual void onSceneRemove ()
 Called when this is removed from the SceneGraph.
virtual void onScaleChanged ()
 Called when the size of the object changes.
void setLastState (SceneState *state, U32 key)
 Sets the mLastState and mLastStateKey.
bool isLastState (SceneState *state, U32 key) const
 Returns true if the provided SceneState and key are set as this object's last state and key.
Traversal State
The SceneGraph traversal is recursive and the traversal state of an object can be one of three things:
  • Pending - The object has not yet been examined for zone traversal.

  • Working - The object is currently having its zones traversed.
  • Done - The object has had all of its zones traversed or doesn't manage zones.

Note:
These states were formerly referred to as TraverseColor, with White, Black, and Gray; this was changed in Torque 1.2 by Pat "KillerBunny" Wilson. This code is only used internal to this class


void setTraversalState (TraversalState s)
 This sets the traversal state of the object.
TraversalState getTraversalState () const
 Returns the traversal state of this object.

Protected Attributes

S32 mCollisionCount
bool mGlobalBounds

Private Types

typedef NetObject Parent

Private Member Functions

 SceneObject (const SceneObject &)

Friends

class Container
class SceneGraph
class SceneState

Data Structures

struct  LightingInfo
struct  posinfo


Member Typedef Documentation


Member Enumeration Documentation

anonymous enum

Enumerator:
MaxObjectZones 

Enumerator:
Pending 
Working 
Done 

Enumerator:
ScaleMask 
NextFreeMask 


Constructor & Destructor Documentation

SceneObject::SceneObject ( const SceneObject  )  [private]

Deprecated:
disallowed

SceneObject::SceneObject (  ) 

virtual SceneObject::~SceneObject (  )  [virtual]


Member Function Documentation

void SceneObject::findLightGroup ( NetConnection con  ) 

void SceneObject::findLights ( const char *  name,
NetConnection con 
)

const char* SceneObject::scriptThis (  ) 

Returns a value representing this object which can be passed to script functions.

virtual void SceneObject::disableCollision (  )  [virtual]

Disables collisions for this object including raycasts.

Reimplemented in RigidShape, and Vehicle.

virtual void SceneObject::enableCollision (  )  [virtual]

Enables collisions for this object.

Reimplemented in RigidShape, and Vehicle.

bool SceneObject::isCollisionEnabled (  )  const [inline]

Returns true if collisions are enabled.

virtual bool SceneObject::isDisplacable (  )  const [virtual]

Returns true if this object allows itself to be displaced.

See also:
displaceObject

Reimplemented in Player.

virtual Point3F SceneObject::getMomentum (  )  const [virtual]

Returns the momentum of this object.

Reimplemented in Player.

virtual void SceneObject::setMomentum ( const Point3F momentum  )  [virtual]

Sets the momentum of this object.

Parameters:
momentum Momentum

Reimplemented in Player.

virtual F32 SceneObject::getMass (  )  const [virtual]

Returns the mass of this object.

Reimplemented in Player.

virtual bool SceneObject::displaceObject ( const Point3F displaceVector  )  [virtual]

Displaces this object by a vector.

Parameters:
displaceVector Displacement vector

Reimplemented in Player.

const MatrixF& SceneObject::getTransform (  )  const [inline]

Returns the transform which can be used to convert object space to world space.

const MatrixF& SceneObject::getWorldTransform (  )  const [inline]

Returns the transform which can be used to convert world space into object space.

const VectorF& SceneObject::getScale (  )  const [inline]

Returns the scale of the object.

const Box3F& SceneObject::getObjBox (  )  const [inline]

Returns the bounding box for this object in local coordinates.

const Box3F& SceneObject::getWorldBox (  )  const [inline]

Returns the bounding box for this object in world coordinates.

const SphereF& SceneObject::getWorldSphere (  )  const [inline]

Returns the bounding sphere for this object in world coordinates.

Point3F SceneObject::getBoxCenter (  )  const [inline]

Returns the center of the bounding box in world coordinates.

virtual void SceneObject::setTransform ( const MatrixF mat  )  [virtual]

Sets the Object -> World transform.

Parameters:
mat New transform matrix

Reimplemented in AudioEmitter, Camera, fxShapeReplicatedStatic, ParticleEmitter, Item, MissionMarker, PhysicalZone, Player, RigidShape, StaticShape, Trigger, TSStatic, Vehicle, InteriorInstance, sgLightObject, TerrainBlock, and WaterBlock.

virtual void SceneObject::setScale ( const VectorF scale  )  [virtual]

Sets the scale for the object.

Parameters:
scale Scaling values

Reimplemented in AudioEmitter, and WaterBlock.

virtual void SceneObject::setRenderTransform ( const MatrixF mat  )  [virtual]

This sets the render transform for this object.

Parameters:
mat New render transform

Reimplemented in Camera.

const MatrixF& SceneObject::getRenderTransform (  )  const [inline]

Returns the render transform.

const MatrixF& SceneObject::getRenderWorldTransform (  )  const [inline]

Returns the render transform to convert world to local coordinates.

const Box3F& SceneObject::getRenderWorldBox (  )  const [inline]

Returns the render world box.

virtual void SceneObject::buildConvex ( const Box3F box,
Convex convex 
) [virtual]

Builds a convex hull for this object.

Think of a convex hull as a low-res mesh which covers, as tightly as possible, the object mesh, and is used as a collision mesh.

Parameters:
box 
convex Convex mesh generated (out)

Reimplemented in Item, PhysicalZone, Player, ShapeBase, Trigger, TSStatic, VehicleBlocker, InteriorInstance, InteriorMap, and TerrainBlock.

virtual bool SceneObject::buildPolyList ( AbstractPolyList polyList,
const Box3F box,
const SphereF sphere 
) [virtual]

Builds a list of polygons which intersect a bounding volume.

This will use either the sphere or the box, not both, the SceneObject implimentation ignores sphere.

See also:
AbstractPolyList
Parameters:
polyList Poly list build (out)
box Box bounding volume
sphere Sphere bounding volume

Reimplemented in Item, Player, ShapeBase, TSStatic, WheeledVehicle, InteriorInstance, PathedInterior, and TerrainBlock.

virtual BSPNode* SceneObject::buildCollisionBSP ( BSPTree tree,
const Box3F box,
const SphereF sphere 
) [virtual]

Builds a collision tree of all the polygons which collide with a bounding volume.

Note:
Not implemented in SceneObject.
See also:
TerrainBlock::buildCollisionBSP
Parameters:
tree BSP tree built (out)
box Box bounding volume
sphere Sphere bounding volume

Reimplemented in TerrainBlock.

virtual bool SceneObject::castRay ( const Point3F start,
const Point3F end,
RayInfo info 
) [virtual]

Casts a ray and obtain collision information, returns true if RayInfo is modified.

Parameters:
start Start point of ray
end End point of ray
info Collision information obtained (out)

Reimplemented in Player, ShapeBase, Trigger, TSStatic, InteriorInstance, InteriorMap, TerrainBlock, and WaterBlock.

virtual bool SceneObject::collideBox ( const Point3F start,
const Point3F end,
RayInfo info 
) [virtual]

Reimplemented in TerrainBlock.

Point3F SceneObject::getPosition (  )  const

Returns the position of the object.

Point3F SceneObject::getRenderPosition (  )  const

Returns the render-position of the object.

See also:
getRenderTransform

void SceneObject::setPosition ( const Point3F pos  ) 

Sets the position of the object.

virtual Point3F SceneObject::getVelocity (  )  const [virtual]

Gets the velocity of the object.

Reimplemented in Item, Player, Projectile, RigidShape, and Vehicle.

virtual void SceneObject::setVelocity ( const Point3F v  )  [virtual]

Sets the velocity of the object.

Parameters:
v Velocity

Reimplemented in Debris, Item, Player, and ShapeBase.

bool SceneObject::isManagingZones (  )  const [inline]

Returns true if this object is managing zones.

This is only true in the case of InteriorInstances which have zones in them.

U32 SceneObject::getZoneRangeStart (  )  const [inline]

Gets the index of the first zone this object manages in the collection of zones.

U32 SceneObject::getNumCurrZones (  )  const [inline]

Gets the number of zones containing this object.

U32 SceneObject::getCurrZone ( const U32  index  )  const [inline]

Returns the nth zone containing this object.

virtual bool SceneObject::getOverlappingZones ( SceneObject obj,
U32 zones,
U32 numZones 
) [virtual]

If an object exists in multiple zones, this method will give you the number and indices of these zones (storing them in the provided variables).

Parameters:
obj Object in question.
zones Indices of zones containing the object. (out)
numZones Number of elements in the returned array. (out)

Reimplemented in InteriorInstance, and SceneRoot.

virtual U32 SceneObject::getPointZone ( const Point3F p  )  [virtual]

Returns the zone containing p.

Parameters:
p Point to test.

Reimplemented in InteriorInstance.

virtual bool SceneObject::scopeObject ( const Point3F rootPosition,
const F32  rootDistance,
bool *  zoneScopeState 
) [virtual]

This is called on a zone managing object to scope all the zones managed.

Parameters:
rootPosition Camera position
rootDistance Camera visible distance
zoneScopeState Array of booleans which line up with the collection of zones, marked true if that zone is scoped (out)

Reimplemented in InteriorInstance, and SceneRoot.

virtual void SceneObject::renderObject ( SceneState state,
SceneRenderImage image 
) [virtual]

Called when the object is supposed to render itself.

Parameters:
state Current rendering state.
See also:
SceneState
Parameters:
image Image associated with this object to render.
See also:
SceneRenderImage

Reimplemented in AudioEmitter, Debris, FireballAtmosphere, Explosion, fxFoliageReplicator, fxLight, fxRenderObject, fxShapeReplicator, fxSunLight, Lightning, ParticleEmitter, Precipitation, Splash, WeatherLightning, Projectile, ShapeBase, ShowTSShape, Trigger, TSStatic, InteriorInstance, InteriorMap, MirrorSubObject, PathedInterior, sgLightObject, volumeLight, DecalManager, Marker, Sky, TerrainBlock, and WaterBlock.

virtual void SceneObject::renderShadow ( SceneState state,
SceneRenderImage image 
) [inline, virtual]

virtual bool SceneObject::prepRenderImage ( SceneState state,
const U32  stateKey,
const U32  startZone,
const bool  modifyBaseZoneState = false 
) [virtual]

Called when the SceneGraph is ready for the registration of RenderImages.

See also:
SceneState
Parameters:
state SceneState
stateKey State key of the current SceneState
startZone Base zone index
modifyBaseZoneState If true, the object needs to modify the zone state.

Reimplemented in AudioEmitter, Debris, FireballAtmosphere, Explosion, fxFoliageReplicator, fxLight, fxRenderObject, fxShapeReplicator, fxSunLight, Lightning, ParticleEmitter, Precipitation, Splash, WeatherLightning, Item, Projectile, ShapeBase, ShowTSShape, Trigger, TSStatic, WheeledVehicle, InteriorInstance, InteriorMap, PathedInterior, volumeLight, SceneRoot, DecalManager, Marker, Sky, TerrainBlock, and WaterBlock.

void SceneObject::addToScene (  ) 

Adds object to the client or server container depending on the object.

void SceneObject::removeFromScene (  ) 

Removes the object from the client/server container.

virtual bool SceneObject::onSceneAdd ( SceneGraph graph  )  [protected, virtual]

Called when this is added to the SceneGraph.

Parameters:
graph SceneGraph this is getting added to

Reimplemented in InteriorInstance, PathedInterior, SceneRoot, and WaterBlock.

virtual void SceneObject::onSceneRemove (  )  [protected, virtual]

Called when this is removed from the SceneGraph.

Reimplemented in ShapeBase, InteriorInstance, PathedInterior, and SceneRoot.

virtual void SceneObject::onScaleChanged (  )  [protected, virtual]

Called when the size of the object changes.

Reimplemented in Player.

virtual void SceneObject::transformModelview ( const U32  portalIndex,
const MatrixF oldMV,
MatrixF newMV 
) [protected, virtual]

This is used by a portal controling object to transform the base-modelview used by the scenegraph for rendering to the modelview it needs to render correctly.

See also:
MirrorSubObject
Parameters:
portalIndex Index of portal in the list of portals controlled by the object.
oldMV Current modelview matrix used by the SceneGraph (in)
newMV New modelview to be used by the SceneGraph (out)

Reimplemented in MirrorSubObject.

virtual void SceneObject::transformPosition ( const U32  portalIndex,
Point3F point 
) [protected, virtual]

Used to tranform the position of a point based on a portal.

Parameters:
portalIndex Index of a portal to transform by.
point Point to transform.

Reimplemented in MirrorSubObject.

virtual bool SceneObject::computeNewFrustum ( const U32  portalIndex,
const F64 oldFrustum,
const F64  nearPlane,
const F64  farPlane,
const RectI oldViewport,
F64 newFrustum,
RectI newViewport,
const bool  flippedMatrix 
) [protected, virtual]

Returns a new view frustum for the portal.

Parameters:
portalIndex Which portal in the list of portals the object controls
oldFrustum Current frustum.
nearPlane Near clipping plane.
farPlane Far clipping plane.
oldViewport Current viewport.
newFrustum New view frustum to use. (out)
newViewport New viewport to use. (out)
flippedMatrix Should the object should use a flipped matrix to calculate viewport and frustum?

Reimplemented in MirrorSubObject.

virtual void SceneObject::openPortal ( const U32  portalIndex,
SceneState pCurrState,
SceneState pParentState 
) [protected, virtual]

Called before things are to be rendered from the portals point of view, to set up everything the portal needs to render correctly.

Parameters:
portalIndex Index of portal to use.
pCurrState Current SceneState
pParentState SceneState used before this portal was activated

Reimplemented in MirrorSubObject.

virtual void SceneObject::closePortal ( const U32  portalIndex,
SceneState pCurrState,
SceneState pParentState 
) [protected, virtual]

Called after rendering of a portal is complete, this resets the states the previous call to openPortal() changed.

Parameters:
portalIndex Index of portal to use.
pCurrState Current SceneState
pParentState SceneState used before this portal was activated

Reimplemented in MirrorSubObject.

virtual void SceneObject::getWSPortalPlane ( const U32  portalIndex,
PlaneF plane 
) [virtual]

Returns the plane of the portal in world space.

Parameters:
portalIndex Index of portal to use.
plane Plane of the portal in world space (out)

Reimplemented in MirrorSubObject.

void SceneObject::setLastState ( SceneState state,
U32  key 
) [inline, protected]

Sets the mLastState and mLastStateKey.

Parameters:
state SceneState to set as the last state
key Key to set as the last state key

bool SceneObject::isLastState ( SceneState state,
U32  key 
) const [inline, protected]

Returns true if the provided SceneState and key are set as this object's last state and key.

Parameters:
state SceneState in question
key State key in question

void SceneObject::setTraversalState ( TraversalState  s  )  [inline, protected]

This sets the traversal state of the object.

Note:
This is used internally; you should not normally need to call it.
Parameters:
s Traversal state to assign

SceneObject::TraversalState SceneObject::getTraversalState (  )  const [inline, protected]

Returns the traversal state of this object.

virtual bool SceneObject::getLightingAmbientColor ( ColorF col  )  [virtual]

Gets the color of the ambient light in the area of the object and stores it in the provided ColorF.

Parameters:
col Ambient color (out)

Reimplemented in InteriorInstance.

void SceneObject::resetWorldBox (  )  [protected]

Regenerates the world-space bounding box and bounding sphere.

void SceneObject::resetRenderWorldBox (  )  [protected]

Regenerates the render-world-space bounding box and sphere.

U32 SceneObject::getContainerSeqKey (  )  const [inline, protected]

Returns the container sequence key.

void SceneObject::setContainerSeqKey ( const U32  key  )  [inline, protected]

Sets the container sequence key.

Container* SceneObject::getContainer (  )  [inline]

Returns a pointer to the container that contains this object.

U32 SceneObject::getTypeMask (  )  [inline]

Returns the type mask for this object.

const bool SceneObject::isGlobalBounds (  )  const [inline]

void SceneObject::setGlobalBounds (  )  [inline]

If global bounds are set to be true, then the object is assumed to have an infinitely large bounding box for collision and rendering purposes.

They can't be toggled currently.

void SceneObject::inspectPostApply (  )  [virtual]

SceneObject::DECLARE_CONOBJECT ( SceneObject   ) 


Friends And Related Function Documentation

friend class Container [friend]

friend class SceneGraph [friend]

friend class SceneState [friend]


Field Documentation

Lighting info for this object.

Transform from object space to world space.

Transform from world space to object space (inverse).

Object scale.

Bounding box in object space.

Bounding box in world space.

Bounding sphere in world space.

Render matrix to transform object space to world space.

Render matrix to transform world space to object space.

Render bounding box in world space.

Render bounding sphere in world space.

Container sequence key.

bool SceneObject::mGlobalBounds [protected]

SceneGraph that controls this object.

Start of range of zones this object controls, 0xFFFFFFFF == no zones.

Number of zones this object exists in.

State of this object in the SceneGraph traversal - DON'T MESS WITH THIS.

Last SceneState that was used to render this object.

Last state key that was used to render this object.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen