|
A networkable object that exists in the 3D world. More...
Public Member Functions | |
Point3F | getEulerRotation () |
Get Euler rotation of this object. | |
VectorF | getForwardVector () |
Get the direction this object is facing. | |
int | getMountedObject (int slot) |
Get the object mounted at a particular slot. | |
int | getMountedObjectCount () |
Get the number of objects mounted to us. | |
int | getMountedObjectNode (int slot) |
Get the mount node index of the object mounted at our given slot. | |
int | getMountNodeObject (int node) |
Get the object mounted at our given node index. | |
Box3F | getObjectBox () |
Get the object's bounding box (relative to the object's origin). | |
int | getObjectMount () |
Get the object we are mounted to. | |
Point3F | getPosition () |
Get the object's world position. | |
VectorF | getRightVector () |
Get the right vector of the object. | |
Point3F | getScale () |
Get the object's scale. | |
TransformF | getTransform () |
Get the object's transform. | |
int | getType () |
Return the type mask for this object. | |
VectorF | getUpVector () |
Get the up vector of the object. | |
Box3F | getWorldBox () |
Get the object's world bounding box. | |
Point3F | getWorldBoxCenter () |
Get the center of the object's world bounding box. | |
bool | isGlobalBounds () |
Check if this object has a global bounds set. | |
bool | isMounted () |
Check if we are mounted to another object. | |
bool | mountObject (SceneObject objB, int slot, TransformF txfm=MatrixF::Identity) |
Mount objB to this object at the desired slot with optional transform. | |
void | setScale (Point3F scale) |
Set the object's scale. | |
void | setTransform (TransformF txfm) |
Set the object's transform (orientation and position). | |
void | unmount () |
Unmount us from the currently mounted object if any. | |
bool | unmountObject (SceneObject target) |
Unmount an object from ourselves. | |
Public Attributes | |
Editing | |
bool | isRenderEnabled |
Controls client-side rendering of the object. | |
bool | isSelectionEnabled |
Determines if the object may be selected from wihin the Tools. | |
Mounting | |
int | mountNode |
Node we are mounted to. | |
pid | mountPID |
PersistentID of object we are mounted to. | |
MatrixPosition | mountPos |
Position we are mounted at ( object space of our mount object ). | |
MatrixRotation | mountRot |
Rotation we are mounted at ( object space of our mount object ). | |
Transform | |
MatrixPosition | position |
Object world position. | |
MatrixRotation | rotation |
Object world orientation. | |
Point3F | scale |
Object world scale. | |
Static Public Attributes | |
static bool | isRenderable |
Disables rendering of all instances of this type. | |
static bool | isSelectable |
Disables selection of all instances of this type. |
A networkable object that exists in the 3D world.
The SceneObject class provides the foundation for 3D objects in the Engine. It exposes the functionality for:
You do not typically work with SceneObjects themselves. The SceneObject provides a reference within the game world (the scene), but does not render to the client on its own. The same is true of collision detection beyond that of the bounding box. Instead you use one of the many classes that derrive from SceneObject, such as TSStatic.
When it comes time to decide if a SceneObject should render or not, there are two methods that can stop the SceneObject from rendering at all. You need to be aware of the differences between these two methods as they impact how the SceneObject is networked from the server to the client.
The first method of manually controlling if a SceneObject is rendered is through its SceneObject::isRenderEnabled property. When set to false the SceneObject is considered invisible but still present within the scene. This means it still takes part in collisions and continues to be networked.
The second method is using the setHidden() method. This will actually remove a SceneObject from the scene and it will no longer be networked from the server to the cleint. Any client-side ghost of the object will be deleted as the server no longer considers the object to be in scope.
Point3F SceneObject::getEulerRotation | ( | ) |
Get Euler rotation of this object.
VectorF SceneObject::getForwardVector | ( | ) |
Get the direction this object is facing.
int SceneObject::getMountedObject | ( | int | slot | ) |
Get the object mounted at a particular slot.
slot | mount slot index to query |
int SceneObject::getMountedObjectCount | ( | ) |
Get the number of objects mounted to us.
int SceneObject::getMountedObjectNode | ( | int | slot | ) |
Get the mount node index of the object mounted at our given slot.
slot | mount slot index to query |
int SceneObject::getMountNodeObject | ( | int | node | ) |
Get the object mounted at our given node index.
node | mount node index to query |
Box3F SceneObject::getObjectBox | ( | ) |
Get the object's bounding box (relative to the object's origin).
int SceneObject::getObjectMount | ( | ) |
Get the object we are mounted to.
Point3F SceneObject::getPosition | ( | ) |
Get the object's world position.
Reimplemented in Camera.
VectorF SceneObject::getRightVector | ( | ) |
Get the right vector of the object.
Point3F SceneObject::getScale | ( | ) |
Get the object's scale.
TransformF SceneObject::getTransform | ( | ) |
Get the object's transform.
int SceneObject::getType | ( | ) |
Return the type mask for this object.
VectorF SceneObject::getUpVector | ( | ) |
Get the up vector of the object.
Box3F SceneObject::getWorldBox | ( | ) |
Get the object's world bounding box.
Point3F SceneObject::getWorldBoxCenter | ( | ) |
Get the center of the object's world bounding box.
bool SceneObject::isGlobalBounds | ( | ) |
Check if this object has a global bounds set.
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.
bool SceneObject::isMounted | ( | ) |
Check if we are mounted to another object.
bool SceneObject::mountObject | ( | SceneObject | objB, | |
int | slot, | |||
TransformF | txfm = MatrixF::Identity | |||
) |
Mount objB to this object at the desired slot with optional transform.
objB | Object to mount onto us | |
slot | Mount slot ID | |
txfm | (optional) mount offset transform |
void SceneObject::setScale | ( | Point3F | scale | ) |
Set the object's scale.
scale | object scale to set |
void SceneObject::setTransform | ( | TransformF | txfm | ) |
Set the object's transform (orientation and position).
txfm | object transform to set |
void SceneObject::unmount | ( | ) |
Unmount us from the currently mounted object if any.
bool SceneObject::unmountObject | ( | SceneObject | target | ) |
Unmount an object from ourselves.
target | object to unmount |
bool SceneObject::isRenderable [static] |
Disables rendering of all instances of this type.
Reimplemented in ConvexShape, GameBase, ShapeBase, MissionMarker, WayPoint, OcclusionVolume, LightBase, PointLight, StaticShape, SpotLight, DecalManager, RenderObjectExample, RenderShapeExample, Explosion, fxFoliageReplicator, fxShapeReplicator, fxShapeReplicatedStatic, GroundCover, ParticleEmitter, Splash, PhysicsDebris, PxCloth, SFXSpace, Vehicle, HoverVehicle, BasicClouds, CloudLayer, WaterObject, WaterBlock, WaterPlane, Marker, Player, AIPlayer, Camera, Debris, GroundPlane, Item, SpawnSphere, PathCamera, PhysicalZone, Zone, Portal, Prefab, Projectile, RigidShape, Trigger, TSStatic, RenderMeshExample, Lightning, ParticleEmitterNode, Precipitation, PhysicsForce, PhysicsShape, PxMultiActor, SFXEmitter, FlyingVehicle, WheeledVehicle, DecalRoad, MeshRoad, River, ScatterSky, SkyBox, Sun, TimeOfDay, Forest, ForestWindEmitter, InteriorInstance, and TerrainBlock.
Controls client-side rendering of the object.
bool SceneObject::isSelectable [static] |
Disables selection of all instances of this type.
Reimplemented in ConvexShape, GameBase, ShapeBase, MissionMarker, WayPoint, OcclusionVolume, LightBase, PointLight, StaticShape, SpotLight, DecalManager, RenderObjectExample, RenderShapeExample, Explosion, fxFoliageReplicator, fxShapeReplicator, fxShapeReplicatedStatic, GroundCover, ParticleEmitter, Splash, PhysicsDebris, PxCloth, SFXSpace, Vehicle, HoverVehicle, BasicClouds, CloudLayer, WaterObject, WaterBlock, WaterPlane, Marker, Player, AIPlayer, Camera, Debris, GroundPlane, Item, SpawnSphere, PathCamera, PhysicalZone, Zone, Portal, Prefab, Projectile, RigidShape, Trigger, TSStatic, RenderMeshExample, Lightning, ParticleEmitterNode, Precipitation, PhysicsForce, PhysicsShape, PxMultiActor, SFXEmitter, FlyingVehicle, WheeledVehicle, DecalRoad, MeshRoad, River, ScatterSky, SkyBox, Sun, TimeOfDay, Forest, ForestWindEmitter, InteriorInstance, and TerrainBlock.
Determines if the object may be selected from wihin the Tools.
Node we are mounted to.
PersistentID of object we are mounted to.
Unlike the SimObjectID that is determined at run time, the PersistentID of an object is saved with the level/mission and may be used to form a link between objects.
MatrixPosition SceneObject::mountPos |
Position we are mounted at ( object space of our mount object ).
MatrixRotation SceneObject::mountRot |
Rotation we are mounted at ( object space of our mount object ).
MatrixPosition SceneObject::position |
Object world position.
MatrixRotation SceneObject::rotation |
Object world orientation.
Point3F SceneObject::scale |
Object world scale.