SceneObject

Engine/source/scene/sceneObject.h

A 3D object.

More...

Classes:

class

Mounted object.

class

Iterator over the zones that the object is assigned to.

class

Bidirectional link between a zone manager and its objects.

Zoning

Refresh the zoning state of this object, if it isn't up-to-date anymore.

Return the first link in the zone list of this object.

Gets the number of zones containing this object.

Returns the nth zone containing this object.

bool

If an object moves, its zoning state needs to be updated.

Number of zones this object is assigned to.

List of zones that this object is part of.

Mounting

mountObject(SceneObject * obj, S32 node, const MatrixF & xfm)

ex: Mount B to A at A's node N A.mountObject( B, N )

Remove an object mounting.

Unmount this object from it's mount.

onMount(SceneObject * obj, S32 node)

Callback when this object is mounted.

onUnmount(SceneObject * obj, S32 node)

Callback when this object is unmounted.

getMountTransform(S32 index, const MatrixF & xfm, MatrixF * outMat)
getRenderMountTransform(F32 delta, S32 index, const MatrixF & xfm, MatrixF * outMat)

Return the object that this object is mounted to.

Return object link of next object mounted to this object's mount.

Returns object list of objects mounted to this object.

Returns the mount id that this is mounted to.

bool

Returns true if this object is mounted to anything at all Also try to resolve the PID to objectId here if it is pending.

Returns the number of object mounted along with this.

Returns the object mounted at a position in the mount list.

Returns the node the object at idx is mounted to.

Returns the object a object on the mount list is mounted to.

Transform and Collision Members

Regenerates the world-space bounding box and bounding sphere.

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

Regenerates the object-space bounding box from the world-space bounding box, the world space to object space transform, and the object scale.

Called when the size of the object changes.

Transform from object space to world space.

Transform from world space to object space (inverse).

Object scale.

Bounding box in object space.

Bounding box (AABB) 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.

bool

Whether this object is considered to have an infinite bounding box.

SceneContainer 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.

Returns the container sequence key.

Sets the container sequence key.

SceneManager Functionality

Return the SceneManager that this SceneObject belongs to.

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

Removes the object from the client/server container.

Returns a pointer to the container that contains this object.

Flags

bool

Return true if this object is rendered.

setRenderEnabled(bool value)

Set whether the object gets rendered.

bool

Return true if this object can be selected in the editor.

setSelectionEnabled(bool value)

Set whether the object can be selected in the editor.

bool

Return true if the object doesn't want to be subjected to culling when in the editor.

bool

Return true if the object should be taken into account for visual occlusion.

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.

Disables collisions for this object including raycasts.

Enables collisions for this object.

bool

Returns true if collisions are enabled.

This gets called when an object collides with this object.

bool

Returns true if this object allows itself to be displaced.

Returns the momentum of this object.

Sets the momentum of this object.

Returns the mass of this object.

bool
displaceObject(const Point3F & displaceVector)

Displaces this object by a vector.

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

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

Returns the scale of the object.

Returns the bounding box for this object in local coordinates.

Returns the bounding box for this object in world coordinates.

Returns the bounding sphere for this object in world coordinates.

Returns the center of the bounding box in world coordinates.

Sets the Object -> World transform.

Sets the scale for the object.

This sets the render transform for this object.

Returns the render transform.

Returns the render transform to convert world to local coordinates.

Returns the render world box.

setHidden(bool hidden)

Sets the state of this object as hidden or not.

buildConvex(const Box3F & box, Convex * convex)

Builds a convex hull for this object.

bool
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)

Builds a list of polygons which intersect a bounding volume.

bool
castRay(const Point3F & start, const Point3F & end, RayInfo * info)

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

bool

Casts a ray against rendered geometry, returns true if RayInfo is modified.

buildSilhouette(const SceneCameraState & cameraState, Vector< Point3F > & outPoints)

Build a world-space silhouette polygon for the object for the given camera settings.

bool

Return true if the given point is contained by the object's (collision) shape.

bool
collideBox(const Point3F & start, const Point3F & end, RayInfo * info)

Returns the position of the object.

Returns the render-position of the object.

Sets the position of the object.

Gets the velocity of the object.

Sets the velocity of the object.

Applies an impulse force to this object.

applyRadialImpulse(const Point3F & origin, F32 radius, F32 magnitude)

Applies a radial impulse to the object using the impulse origin and force.

Returns the distance from this object to a point

Sound

bool

Return whether the object's collision shape is blocking sound.

Return the ambient sound space active inside the volume of this object or NULL if the object does not have its own ambient space.

Rendering

Called when the SceneManager is ready for the registration of render instances.

Global Bounds

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.

Protected field getters/setters

const char *
_getRenderEnabled(void * object, const char * data)
bool
_setRenderEnabled(void * object, const char * index, const char * data)
const char *
_getSelectionEnabled(void * object, const char * data)
bool
_setSelectionEnabled(void * object, const char * index, const char * data)
bool
_setFieldPosition(void * object, const char * index, const char * data)
bool
_setFieldRotation(void * object, const char * index, const char * data)
bool
_setFieldScale(void * object, const char * index, const char * data)
bool
_setMountPID(void * object, const char * index, const char * data)
bool
_setAccuEnabled(void * object, const char * index, const char * data)

Public Types

enum
_Anonymous_ {
  MaxObjectZones = 128
  NumMountPoints = 32
  NumMountPointBits = 5
}
enum
SceneObjectFlags {
  RenderEnabledFlag = BIT( 0 )
  SelectionEnabledFlag = BIT( 1 )
  DisableCullingInEditorFlag = BIT( 2 )
  VisualOccluderFlag = BIT( 3 )
  SoundOccluderFlag = BIT( 4 )
  NextFreeFlag = BIT( 5 )
}

Bit-flags stored in mObjectFlags.

enum
SceneObjectMasks {
  InitialUpdateMask = BIT( 0 )
  ScaleMask = BIT( 1 )
  FlagMask = BIT( 2 )
  MountedMask = BIT( 3 )
  NextFreeMask = BIT( 4 )
}

Networking dirty mask.

Parent 

Protected Attributes

Object which must be ticked before this object.

Combination of SceneObjectFlags.

Links installed by SceneTrackers attached to this object.

Object type mask.

Public Static Attributes

Triggered when a SceneObject onAdd is called.

Triggered when a SceneObject onRemove is called.

Private Attributes

bool

For ScopeAlways objects to be able to properly implement setHidden(), they need to temporarily give up ScopeAlways status while being hidden.

Protected Functions

Returns the greatest object flag bit defined.

bool

Called when this is added to a SceneManager.

Called when this is removed from its current SceneManager.

Public Functions

Clears the effects of a call to processAfter()

Returns the object that this processes after.

Return the ProcessList for this object to use.

Return the type mask that indicates to which broad object categories this object belongs.

Called after any property of the object is changed in the world editor.

bool

Called when the object is added to the sim.

Queries the object about information used to determine scope.

Called when a SimObject is deleted.

Called when the object is removed from the sim.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Instructs this object to pack its state for transfer over the network.

Force this object to process after some other object.

Set the status of tick processing.

Instructs this object to read state data previously packed with packUpdate.

bool
writeField(StringTableEntry fieldname, const char * value)

Determine whether or not a field should be written.

Public Static Functions

Private Functions

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:

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

Zoning

_updateZoningState()

Refresh the zoning state of this object, if it isn't up-to-date anymore.

_getZoneRefHead()

Return the first link in the zone list of this object.

Each link represents a single zone that the object is assigned to.

note:

This method will return the zoning list as is. In case the zoning state of the object is dirty, the list contents may be outdated.

_getNumCurrZones()

Gets the number of zones containing this object.

_getCurrZone(const U32 index)

Returns the nth zone containing this object.

bool mZoneRefDirty 

If an object moves, its zoning state needs to be updated.

This is deferred to when the state is actually needed and this flag indicates a refresh is necessary.

U32 mNumCurrZones 

Number of zones this object is assigned to.

note:

If mZoneRefDirty is set, this might be outdated.

ZoneRef * mZoneRefHead 

List of zones that this object is part of.

note:

If mZoneRefDirty is set, this might be outdated.

Mounting

mountObject(SceneObject * obj, S32 node, const MatrixF & xfm)

ex: Mount B to A at A's node N A.mountObject( B, N )

Parameters:

obj

Object to mount

node

Mount node ID

Reimplemented by: Entity, TurretShape, Vehicle

unmountObject(SceneObject * obj)

Remove an object mounting.

Parameters:

obj

Object to unmount

Reimplemented by: PxMultiActor, TurretShape

unmount()

Unmount this object from it's mount.

Reimplemented by: Player

onMount(SceneObject * obj, S32 node)

Callback when this object is mounted.

Parameters:

obj

Object we are mounting to.

node

Node we are unmounting from.

Reimplemented by: Entity, GameBase, PhysicsForce, ShapeBase, TSStatic

onUnmount(SceneObject * obj, S32 node)

Callback when this object is unmounted.

This should be overridden to set maskbits or do other object type specific work. Parameters:

obj

Object we are unmounting from.

node

Node we are unmounting from.

Reimplemented by: Entity, GameBase, PhysicsForce, ShapeBase, TSStatic

getMountTransform(S32 index, const MatrixF & xfm, MatrixF * outMat)

Reimplemented by: Entity, ShapeBase

getRenderMountTransform(F32 delta, S32 index, const MatrixF & xfm, MatrixF * outMat)

Reimplemented by: Entity, ShapeBase

getObjectMount()

Return the object that this object is mounted to.

getMountLink()

Return object link of next object mounted to this object's mount.

getMountList()

Returns object list of objects mounted to this object.

getMountNode()

Returns the mount id that this is mounted to.

isMounted()

Returns true if this object is mounted to anything at all Also try to resolve the PID to objectId here if it is pending.

getMountedObjectCount()

Returns the number of object mounted along with this.

getMountedObject(S32 idx)

Returns the object mounted at a position in the mount list.

Parameters:

idx

Position on the mount list

getMountedObjectNode(S32 idx)

Returns the node the object at idx is mounted to.

Parameters:

idx

Index

getMountNodeObject(S32 node)

Returns the object a object on the mount list is mounted to.

Parameters:

node

resolveMountPID()

MountInfo mMount 
SimPersistID * mMountPID 

Transform and Collision Members

resetWorldBox()

Regenerates the world-space bounding box and bounding sphere.

resetRenderWorldBox()

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

resetObjectBox()

Regenerates the object-space bounding box from the world-space bounding box, the world space to object space transform, and the object scale.

onScaleChanged()

Called when the size of the object changes.

Reimplemented by: ConvexShape, Player, TSStatic

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 (AABB) 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.

bool mGlobalBounds 

Whether this object is considered to have an infinite bounding box.

S32 mCollisionCount 

SceneContainer 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.

getContainerSeqKey()

Returns the container sequence key.

setContainerSeqKey(const U32 key)

Sets the container sequence key.

SceneContainer * mContainer 

Container database that the object is assigned to.

U32 mContainerSeqKey 

SceneContainer sequence key.

SceneObjectRef * mBinRefHead 
U32 mBinMinX 
U32 mBinMaxX 
U32 mBinMinY 
U32 mBinMaxY 

SceneManager Functionality

getSceneManager()

Return the SceneManager that this SceneObject belongs to.

addToScene()

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

removeFromScene()

Removes the object from the client/server container.

getContainer()

Returns a pointer to the container that contains this object.

Flags

isRenderEnabled()

Return true if this object is rendered.

setRenderEnabled(bool value)

Set whether the object gets rendered.

isSelectionEnabled()

Return true if this object can be selected in the editor.

setSelectionEnabled(bool value)

Set whether the object can be selected in the editor.

isCullingDisabledInEditor()

Return true if the object doesn't want to be subjected to culling when in the editor.

isVisualOccluder()

Return true if the object should be taken into account for visual occlusion.

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.

disableCollision()

Disables collisions for this object including raycasts.

Reimplemented by: RigidShape, Vehicle

enableCollision()

Enables collisions for this object.

Reimplemented by: RigidShape, Vehicle

isCollisionEnabled()

Returns true if collisions are enabled.

onCollision(SceneObject * object, const VectorF & vec)

This gets called when an object collides with this object.

Parameters:

object

Object colliding with this object

vec

Vector along which collision occurred

Reimplemented by: ShapeBase

isDisplacable()

Returns true if this object allows itself to be displaced.

Reimplemented by: Player

getMomentum()

Returns the momentum of this object.

Reimplemented by: Player

setMomentum(const Point3F & momentum)

Sets the momentum of this object.

Parameters:

momentum

Momentum

Reimplemented by: Player

getMass()

Returns the mass of this object.

Reimplemented by: PhysicsShape, ShapeBase

displaceObject(const Point3F & displaceVector)

Displaces this object by a vector.

Parameters:

displaceVector

Displacement vector

Reimplemented by: Player

getTransform()

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

getWorldTransform()

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

getScale()

Returns the scale of the object.

getObjBox()

Returns the bounding box for this object in local coordinates.

getWorldBox()

Returns the bounding box for this object in world coordinates.

getWorldSphere()

Returns the bounding sphere for this object in world coordinates.

getBoxCenter()

Returns the center of the bounding box in world coordinates.

setTransform(const MatrixF & mat)

Sets the Object -> World transform.

Parameters:

mat

New transform matrix

Reimplemented by: DecalRoad, MeshRoad, River, WaterBlock, WaterPlane, Forest, ForestWindEmitter, CoverPoint, NavMesh, SceneSpace, ScenePolyhedralZone, SceneSimpleZone, AccumulationVolume, Camera, CollisionTrigger, ConvexShape, Entity, RenderMeshExample, RenderObjectExample, RenderShapeExample, fxShapeReplicatedStatic, Precipitation, GroundPlane, Item, LightBase, MissionMarker, OcclusionVolume, PhysicalZone, PhysicsShape, PxCloth, PxFluid, PxMultiActor, Player, Portal, Prefab, ProximityMine, RigidShape, T3DSceneComponent, SFXEmitter, StaticShape, Trigger, TSStatic, AITurretShape, TurretShape, Vehicle, TerrainBlock

setScale(const VectorF & scale)

Sets the scale for the object.

Parameters:

scale

Scaling values

Reimplemented by: WaterBlock, GroundPlane, T3DSceneComponent, DecalRoad, MeshRoad, River, NavMesh, PhysicsShape, PxCloth, PxFluid, PxMultiActor, PointLight, Prefab, SFXEmitter, SpotLight, TerrainBlock

setRenderTransform(const MatrixF & mat)

This sets the render transform for this object.

Parameters:

mat

New render transform

Reimplemented by: Camera, Entity

getRenderTransform()

Returns the render transform.

getRenderWorldTransform()

Returns the render transform to convert world to local coordinates.

getRenderWorldBox()

Returns the render world box.

setHidden(bool hidden)

Reimplemented from: SimObject

Reimplemented by: WayPoint, ShapeBase

buildConvex(const Box3F & box, Convex * convex)

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 by: MeshRoad, Forest, CollisionTrigger, ConvexShape, Entity, GroundPlane, Item, PhysicalZone, Player, ShapeBase, Trigger, TSStatic, VehicleBlocker, TerrainBlock

buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)

Builds a list of polygons which intersect a bounding volume.

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

Parameters:
context

A contentual hint as to the type of polylist to build.

polyList

Poly list build (out)

box

Box bounding volume

sphere

Sphere bounding volume

Reimplemented by: MeshRoad, River, WaterBlock, WaterPlane, Forest, ConvexShape, Entity, GroundPlane, Item, Player, ShapeBase, TSStatic, WheeledVehicle, TerrainBlock

castRay(const Point3F & start, const Point3F & end, RayInfo * info)

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 by: MeshRoad, River, WaterBlock, WaterPlane, CollisionTrigger, ConvexShape, Entity, GroundPlane, Player, ShapeBase, Trigger, TSStatic, TerrainBlock, Forest

castRayRendered(const Point3F & start, const Point3F & end, RayInfo * info)

Casts a ray against rendered geometry, returns true if RayInfo is modified.

Parameters:

start

Start point of ray

end

End point of ray

info

Collision information obtained (out)

Reimplemented by: Entity, ShapeBase, TSStatic, Forest

buildSilhouette(const SceneCameraState & cameraState, Vector< Point3F > & outPoints)

Build a world-space silhouette polygon for the object for the given camera settings.

This is used for occlusion.

Parameters:

cameraState

Camera view parameters.

outPoints

Vector to store the resulting polygon points in. Leave untouched if method is not implemented.

Reimplemented by: AccumulationVolume, OcclusionVolume

containsPoint(const Point3F & point)

Return true if the given point is contained by the object's (collision) shape.

The default implementation will return true if the point is within the object's bounding box. Subclasses should implement more precise tests.

Reimplemented by: WaterObject, ScenePolyhedralObject, ScenePolyhedralObject, SFXEmitter

collideBox(const Point3F & start, const Point3F & end, RayInfo * info)

Reimplemented by: MeshRoad, River, ConvexShape, TerrainBlock, Forest

getPosition()

Returns the position of the object.

Reimplemented by: Entity, T3DSceneComponent

getRenderPosition()

Returns the render-position of the object.

setPosition(const Point3F & pos)

Sets the position of the object.

getVelocity()

Gets the velocity of the object.

Reimplemented by: Camera, Item, PhysicsShape, Player, Projectile, RigidShape, Vehicle

setVelocity(const Point3F & v)

Sets the velocity of the object.

Parameters:

v

Velocity

Reimplemented by: Debris, Camera, Item, Player, ShapeBase

applyImpulse(const Point3F & pos, const VectorF & vec)

Applies an impulse force to this object.

Parameters:

pos

Position where impulse came from in world space

vec

Velocity vector (Impulse force F = m * v)

Reimplemented by: Item, PhysicsDebris, PhysicsShape, PxMultiActor, Player, ShapeBase, RigidShape, Vehicle

applyRadialImpulse(const Point3F & origin, F32 radius, F32 magnitude)

Applies a radial impulse to the object using the impulse origin and force.

Parameters:

origin

Point of origin of the radial impulse.

radius

The radius of the impulse area.

magnitude

The strength of the impulse.

Reimplemented by: Forest, PhysicsDebris, PhysicsShape, PxMultiActor

distanceTo(const Point3F & pnt)

Returns the distance from this object to a point

Parameters:

pnt

World space point to measure to

Reimplemented by: WaterPlane, WaterBlock

Sound

isOccludingSound()

Return whether the object's collision shape is blocking sound.

getSoundAmbience()

Return the ambient sound space active inside the volume of this object or NULL if the object does not have its own ambient space.

Reimplemented by: WaterObject, SceneAmbientSoundObject, SceneAmbientSoundObject

Rendering

prepRenderImage(SceneRenderState * state)

Called when the SceneManager is ready for the registration of render instances.

Parameters:

state

Rendering state.

Reimplemented by: MeshRoad, BasicClouds, CloudLayer, DecalRoad, ScatterSky, SkyBox, Sun, VolumetricFog, WaterObject, WaterPlane, Forest, ForestWindEmitter, CoverPoint, NavMesh, NavPath, SceneSpace, Marker, SceneSimpleZone, CollisionTrigger, ConvexShape, Debris, DecalManager, Entity, RenderMeshExample, RenderObjectExample, RenderShapeExample, Explosion, fxFoliageReplicator, fxShapeReplicator, GroundCover, Lightning, ParticleEmitter, Precipitation, Ribbon, GroundPlane, Item, LightBase, PhysicalZone, PhysicsDebris, PhysicsShape, PxCloth, PxFluid, PxMultiActor, Player, Projectile, ProximityMine, SFXEmitter, ShapeBase, Trigger, TSStatic, TurretShape, TerrainBlock

Lighting

setLightingPlugin(SceneObjectLightingPlugin * plugin)

getLightingPlugin()

Global Bounds

isGlobalBounds()

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.

They can't be toggled currently.

Protected field getters/setters

_getRenderEnabled(void * object, const char * data)

_setRenderEnabled(void * object, const char * index, const char * data)

_getSelectionEnabled(void * object, const char * data)

_setSelectionEnabled(void * object, const char * index, const char * data)

_setFieldPosition(void * object, const char * index, const char * data)

_setFieldRotation(void * object, const char * index, const char * data)

_setFieldScale(void * object, const char * index, const char * data)

_setMountPID(void * object, const char * index, const char * data)

_setAccuEnabled(void * object, const char * index, const char * data)

Public Types

@102

Enumerator

MaxObjectZones = 128

Maximum number of zones that an object can concurrently be assigned to.

NumMountPoints = 32
NumMountPointBits = 5
SceneObjectFlags

Enumerator

RenderEnabledFlag = BIT( 0 )

If set, the object can be rendered.

note:

The per-class render disable flag can override the per-object flag.

SelectionEnabledFlag = BIT( 1 )

If set, the object can be selected in the editor.

note:

The per-class selection disable flag can override the per-object flag.

DisableCullingInEditorFlag = BIT( 2 )

If set, object will not be subjected to culling when in the editor.

This is useful to bypass zone culling and always render certain editor-only visual elements (like the zones themselves).

VisualOccluderFlag = BIT( 3 )

If set, object will be used as a visual occluder.

In this case, the object should implement buildSilhouette() and return a convex silhouette polygon.

SoundOccluderFlag = BIT( 4 )

If set, object will be used as a sound occluder.

NextFreeFlag = BIT( 5 )

Bit-flags stored in mObjectFlags.

If a derived class adds more flags they must overload getObjectFlagMax to ensure those flags will be transmitted over the network.

SceneObjectMasks

Enumerator

InitialUpdateMask = BIT( 0 )
ScaleMask = BIT( 1 )
FlagMask = BIT( 2 )
MountedMask = BIT( 3 )
NextFreeMask = BIT( 4 )

Networking dirty mask.

typedef NetObject Parent 

Public Friends

Protected Attributes

SimObjectPtr< SceneObject > mAfterObject 

Object which must be ticked before this object.

SceneObjectLightingPlugin * mLightPlugin 

SceneObjectLightingPlugin attached to this object.

BitSet32 mObjectFlags 

Combination of SceneObjectFlags.

SceneManager * mSceneManager 

SceneManager to which this SceneObject belongs.

SceneObjectLink * mSceneObjectLinks 

Links installed by SceneTrackers attached to this object.

U32 mTypeMask 

Object type mask.

see:

SimObjectTypes

Public Attributes

GFXTextureObject * mAccuTex 
bool mPathfindingIgnore 

Public Static Attributes

Signal< void(SceneObject *) > smSceneObjectAdd 

Triggered when a SceneObject onAdd is called.

Signal< void(SceneObject *) > smSceneObjectRemove 

Triggered when a SceneObject onRemove is called.

Private Attributes

bool mIsScopeAlways 

For ScopeAlways objects to be able to properly implement setHidden(), they need to temporarily give up ScopeAlways status while being hidden.

Otherwise the client-side ghost will not disappear as the server-side object will be forced to stay in scope.

Protected Functions

getObjectFlagMax()

Returns the greatest object flag bit defined.

Only bits within this range will be transmitted over the network.

onSceneAdd()

Called when this is added to a SceneManager.

Reimplemented by: SceneRootZone, SceneSimpleZone, DecalManager

onSceneRemove()

Called when this is removed from its current SceneManager.

Reimplemented by: VolumetricFogRTManager, SceneRootZone, SceneZoneSpace, DecalManager, Portal, ShapeBase

Public Functions

SceneObject()

~SceneObject()

clearProcessAfter()

Reimplemented from: ProcessObject

DECLARE_CONOBJECT(SceneObject )

getAfterObject()

Reimplemented from: ProcessObject

getProcessList()

Return the ProcessList for this object to use.

getTypeMask()

Return the type mask that indicates to which broad object categories this object belongs.

inspectPostApply()

Reimplemented from: SimObject

Reimplemented by: BasicClouds, CloudLayer, DecalRoad, MeshRoad, River, ScatterSky, SkyBox, Sun, TimeOfDay, VolumetricFog, WaterBlock, WaterObject, WaterPlane, Forest, ForestWindEmitter, CoverPoint, NavMesh, NavPath, Marker, AccumulationVolume, CollisionTrigger, ConvexShape, RenderMeshExample, RenderShapeExample, fxFoliageReplicator, fxShapeReplicator, GroundCover, ParticleEmitterNode, Precipitation, RibbonNode, GameBase, GroundPlane, LightBase, MissionMarker, WayPoint, SpawnSphere, CameraBookmark, PhysicalZone, PhysicsShape, PxCloth, PxFluid, PxMultiActor, Prefab, SFXEmitter, Trigger, TSStatic, TerrainBlock

onAdd()

Reimplemented from: SimObject

Reimplemented by: BasicClouds, CloudLayer, DecalRoad, MeshRoad, River, ScatterSky, SkyBox, Sun, TimeOfDay, VolumetricFog, WaterBlock, WaterObject, WaterPlane, Forest, ForestWindEmitter, CoverPoint, NavMesh, NavPath, ScenePolyhedralObject, ScenePolyhedralObject, SceneSpace, Marker, ScenePolyhedralZone, SceneRootZone, AccumulationVolume, AIPlayer, Camera, CollisionTrigger, ConvexShape, Debris, Entity, RenderMeshExample, RenderObjectExample, RenderShapeExample, Explosion, fxFoliageReplicator, fxShapeReplicator, GroundCover, Lightning, ParticleEmitter, ParticleEmitterNode, Precipitation, Ribbon, RibbonNode, Splash, GameBase, GroundPlane, Item, LightBase, MissionMarker, WayPoint, SpawnSphere, CameraBookmark, OcclusionVolume, PathCamera, PhysicalZone, PhysicsDebris, PhysicsForce, PhysicsShape, PxCloth, PxFluid, PxMultiActor, Player, Prefab, Projectile, ProximityMine, RigidShape, SFXEmitter, ShapeBase, StaticShape, Trigger, TSStatic, AITurretShape, TurretShape, FlyingVehicle, HoverVehicle, Vehicle, VehicleBlocker, WheeledVehicle, TerrainBlock

onCameraScopeQuery(NetConnection * cr, CameraScopeQuery * camInfo)

Reimplemented from: NetObject

Reimplemented by: Entity, Player, ShapeBase

onDeleteNotify(SimObject * object)

Reimplemented from: SimSet

Reimplemented by: CollisionTrigger, Item, ShapeBase, Trigger, Camera, PxMultiActor, ForestWindEmitter, NavPath

onRemove()

Reimplemented from: SimGroup

Reimplemented by: BasicClouds, CloudLayer, DecalRoad, MeshRoad, River, ScatterSky, SkyBox, Sun, TimeOfDay, VolumetricFog, VolumetricFogRTManager, WaterBlock, WaterObject, WaterPlane, Forest, ForestWindEmitter, CoverPoint, NavMesh, NavPath, SceneSpace, Marker, SceneRootZone, AccumulationVolume, AIPlayer, Camera, CollisionTrigger, ConvexShape, Debris, Entity, RenderMeshExample, RenderObjectExample, RenderShapeExample, Explosion, fxFoliageReplicator, fxShapeReplicator, GroundCover, Lightning, ParticleEmitter, ParticleEmitterNode, Precipitation, Ribbon, RibbonNode, Splash, GameBase, GroundPlane, Item, LightBase, MissionMarker, CameraBookmark, PathCamera, PhysicalZone, PhysicsDebris, PhysicsForce, PhysicsShape, PxCloth, PxFluid, PxMultiActor, Player, Prefab, Projectile, ProximityMine, RigidShape, SFXEmitter, ShapeBase, StaticShape, Trigger, TSStatic, AITurretShape, TurretShape, FlyingVehicle, HoverVehicle, Vehicle, VehicleBlocker, WheeledVehicle, TerrainBlock

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Reimplemented from: NetObject

Reimplemented by: AccumulationVolume, GroundCover, Precipitation, PathCamera, DecalRoad, MeshRoad, River, BasicClouds, CloudLayer, ScatterSky, SkyBox, Sun, TimeOfDay, VolumetricFog, WaterBlock, WaterObject, WaterPlane, Forest, ForestWindEmitter, CoverPoint, NavMesh, NavPath, Marker, SceneSimpleZone, Camera, CollisionTrigger, ConvexShape, Entity, RenderMeshExample, RenderObjectExample, RenderShapeExample, fxFoliageReplicator, fxShapeReplicator, Lightning, ParticleEmitterNode, RibbonNode, Splash, GameBase, Item, LightBase, MissionMarker, WayPoint, SpawnSphere, CameraBookmark, PhysicalZone, PhysicsShape, PxCloth, PxFluid, PxMultiActor, Player, PointLight, Portal, Prefab, Projectile, ProximityMine, RigidShape, SFXEmitter, ShapeBase, SpotLight, StaticShape, Trigger, TSStatic, AITurretShape, TurretShape, FlyingVehicle, HoverVehicle, Vehicle, VehicleBlocker, WheeledVehicle, TerrainBlock, SceneAmbientSoundObject, SceneAmbientSoundObject, ScenePolyhedralObject, ScenePolyhedralObject, SceneSpace, SceneZoneSpace, GroundPlane

processAfter(ProcessObject * obj)

Reimplemented from: ProcessObject

setProcessTick(bool t)

Reimplemented from: ProcessObject

unpackUpdate(NetConnection * conn, BitStream * stream)

Reimplemented from: NetObject

Reimplemented by: DecalRoad, MeshRoad, River, AccumulationVolume, GroundCover, Precipitation, PathCamera, BasicClouds, CloudLayer, ScatterSky, SkyBox, Sun, TimeOfDay, VolumetricFog, WaterBlock, WaterObject, WaterPlane, Forest, ForestWindEmitter, CoverPoint, NavMesh, NavPath, Marker, SceneSimpleZone, Camera, CollisionTrigger, ConvexShape, Entity, RenderMeshExample, RenderObjectExample, RenderShapeExample, fxFoliageReplicator, fxShapeReplicator, Lightning, ParticleEmitterNode, RibbonNode, Splash, GameBase, Item, LightBase, MissionMarker, WayPoint, SpawnSphere, CameraBookmark, PhysicalZone, PhysicsShape, PxCloth, PxFluid, PxMultiActor, Player, PointLight, Portal, Prefab, Projectile, ProximityMine, RigidShape, SFXEmitter, ShapeBase, SpotLight, StaticShape, Trigger, TSStatic, AITurretShape, TurretShape, FlyingVehicle, HoverVehicle, Vehicle, VehicleBlocker, WheeledVehicle, TerrainBlock, SceneAmbientSoundObject, SceneAmbientSoundObject, ScenePolyhedralObject, ScenePolyhedralObject, SceneSpace, SceneZoneSpace, GroundPlane

writeField(StringTableEntry fieldname, const char * value)

Reimplemented from: SimObject

Reimplemented by: DecalRoad, MeshRoad, River, SceneZoneSpace, ConvexShape, Portal, ScenePolyhedralObject, ScenePolyhedralObject

Public Static Functions

initPersistFields()

Private Functions

SceneObject(const SceneObject & )

Deprecated:

disallowed