ShapeBaseData
Defines properties for a ShapeBase object.
Shadows
bool
Enable shadows for this shape (currently unused, shadows are always enabled).
int
Size of the projected shadow texture (must be power of 2).
float
Maximum distance at which shadow is visible (currently unused).
float
Maximum height above ground to project shadow. If the object is higher than this no shadow will be rendered.
float
Scalar applied to the radius of spot shadows (initial radius is based on the shape bounds but can be adjusted with this field).
Render
assetIdString
The source shape asset.
filename
The DTS or DAE model to use for this object.
Destruction
Parameters related to the destruction effects of this object.
Explosion to generate when this shape is blown up.
Explosion to generate when this shape is blown up underwater.
Debris to generate when this shape is blown up.
bool
Whether to render the shape when it is in the "Destroyed" damage state.
filename
The DTS or DAE model to use for auto-generated breakups.
Damage/Energy
float
Maximum energy level for this object.
float
Maximum damage level for this object.
float
Damage level above which the object is disabled.
float
Damage level above which the object is destroyed.
float
Rate at which damage is repaired in damage units/tick.
bool
Flag controlling whether to manage our own energy level, or to use the energy level of the object we are mounted to.
bool
Invincible flag; when invincible, the object cannot be damaged or repaired.
Camera
The settings used by the shape when it is the camera.
float
The maximum distance from the camera to the object.
float
The minimum distance from the camera to the object.
float
The default camera vertical FOV in degrees.
float
The minimum camera vertical FOV allowed in degrees.
float
The maximum camera vertical FOV allowed in degrees.
bool
If the derrived class supports it, allow the camera to bank.
bool
Do mounted images bank along with the camera?
bool
Flag controlling whether the view from this object is first person only.
bool
Flag controlling whether the client uses this object's eye point to view from.
bool
Observe this object through its camera transform and default fov.
Misc
bool
If true, verify that the CRC of the client's shape model matches the server's CRC for the shape model when loaded by the client.
Reflection
string
References a ReflectorDesc datablock that defines performance and quality properties for dynamic reflections.
Callbacks
void
void
onDisabled(ShapeBase obj, string lastState)
Called when the object damage state changes to Disabled.
void
onDestroyed(ShapeBase obj, string lastState)
Called when the object damage state changes to Destroyed.
void
onImpact(ShapeBase obj, SceneObject collObj, VectorF vec, float len)
Called when we collide with another object beyond some impact speed.
void
onCollision(ShapeBase obj, SceneObject collObj, VectorF vec, float len)
Called when we collide with another object.
void
void
onEndSequence(ShapeBase obj, int slot, string name)
Called when a thread playing a non-cyclic sequence reaches the end of the sequence.
void
onForceUncloak(ShapeBase obj, string reason)
Called when the object is forced to uncloak.
Public Attributes
string
bool
Public Functions
bool
checkDeployPos(TransformF txfm)
Check if there is the space at the given transform is free to spawn into.
TransformF
getDeployTransform(Point3F pos, Point3F normal)
Helper method to get a transform from a position and vector (suitable for use with setTransform).
Detailed Description
Defines properties for a ShapeBase object.
Shadows
bool shadowEnable
Enable shadows for this shape (currently unused, shadows are always enabled).
int shadowSize
Size of the projected shadow texture (must be power of 2).
float shadowMaxVisibleDistance
Maximum distance at which shadow is visible (currently unused).
float shadowProjectionDistance
Maximum height above ground to project shadow. If the object is higher than this no shadow will be rendered.
float shadowSphereAdjust
Scalar applied to the radius of spot shadows (initial radius is based on the shape bounds but can be adjusted with this field).
Render
assetIdString ShapeAsset
The source shape asset.
filename shapeFile
The DTS or DAE model to use for this object.
Destruction
Parameters related to the destruction effects of this object.
ExplosionData Explosion
Explosion to generate when this shape is blown up.
ExplosionData underwaterExplosion
Explosion to generate when this shape is blown up underwater.
DebrisData Debris
Debris to generate when this shape is blown up.
bool renderWhenDestroyed
Whether to render the shape when it is in the "Destroyed" damage state.
filename debrisShapeName
The DTS or DAE model to use for auto-generated breakups.
note:may not be functional.
Physics
float mass
Shape mass.
Used in simulation of moving objects.
float drag
Drag factor.
Reduces velocity of moving objects.
float density
Shape density.
Used when computing buoyancy when in water.
Damage/Energy
float maxEnergy
Maximum energy level for this object.
float maxDamage
Maximum damage level for this object.
float disabledLevel
Damage level above which the object is disabled.
Currently unused.
float destroyedLevel
Damage level above which the object is destroyed.
When the damage level increases above this value, the object damage state is set to "Destroyed".
float repairRate
Rate at which damage is repaired in damage units/tick.
This value is subtracted from the damage level until it reaches 0.
bool inheritEnergyFromMount
Flag controlling whether to manage our own energy level, or to use the energy level of the object we are mounted to.
bool isInvincible
Invincible flag; when invincible, the object cannot be damaged or repaired.
Camera
The settings used by the shape when it is the camera.
float cameraMaxDist
The maximum distance from the camera to the object.
Used when computing a custom camera transform for this object.
float cameraMinDist
The minimum distance from the camera to the object.
Used when computing a custom camera transform for this object.
float cameraDefaultFov
The default camera vertical FOV in degrees.
float cameraMinFov
The minimum camera vertical FOV allowed in degrees.
float cameraMaxFov
The maximum camera vertical FOV allowed in degrees.
bool cameraCanBank
If the derrived class supports it, allow the camera to bank.
bool mountedImagesBank
Do mounted images bank along with the camera?
bool firstPersonOnly
Flag controlling whether the view from this object is first person only.
bool useEyePoint
Flag controlling whether the client uses this object's eye point to view from.
bool observeThroughObject
Observe this object through its camera transform and default fov.
If true, when this object is the camera it can provide a custom camera transform and FOV (instead of the default eye transform).
Misc
bool computeCRC
If true, verify that the CRC of the client's shape model matches the server's CRC for the shape model when loaded by the client.
Reflection
string cubeReflectorDesc
References a ReflectorDesc datablock that defines performance and quality properties for dynamic reflections.
Callbacks
onEnabled(ShapeBase obj, string lastState)
Called when the object damage state changes to Enabled.
Parameters:
obj | The ShapeBase object |
lastState | The previous damage state |
onDisabled(ShapeBase obj, string lastState)
Called when the object damage state changes to Disabled.
Parameters:
obj | The ShapeBase object |
lastState | The previous damage state |
onDestroyed(ShapeBase obj, string lastState)
Called when the object damage state changes to Destroyed.
Parameters:
obj | The ShapeBase object |
lastState | The previous damage state |
onImpact(ShapeBase obj, SceneObject collObj, VectorF vec, float len)
Called when we collide with another object beyond some impact speed.
The Player class makes use of this callback when a collision speed is more than PlayerData::minImpactSpeed. Parameters:
obj | The ShapeBase object |
collObj | The object we collided with |
vec | Collision impact vector |
len | Length of the impact vector |
onCollision(ShapeBase obj, SceneObject collObj, VectorF vec, float len)
Called when we collide with another object.
Parameters:
obj | The ShapeBase object |
collObj | The object we collided with |
vec | Collision impact vector |
len | Length of the impact vector |
onDamage(ShapeBase obj, float delta)
Called when the object is damaged.
Parameters:
obj | The ShapeBase object |
obj | The ShapeBase object |
delta | The amount of damage received. |
onTrigger(ShapeBase obj, int index, bool state)
Called when a move trigger input changes state.
Parameters:
obj | The ShapeBase object |
index | Index of the trigger that changed |
state | New state of the trigger |
onEndSequence(ShapeBase obj, int slot, string name)
Called when a thread playing a non-cyclic sequence reaches the end of the sequence.
Parameters:
obj | The ShapeBase object |
slot | Thread slot that finished playing |
name | Thread name that finished playing |
onForceUncloak(ShapeBase obj, string reason)
Called when the object is forced to uncloak.
Parameters:
obj | The ShapeBase object |
reason | String describing why the object was uncloaked |
Public Attributes
string remapTextureTags
bool silentBBoxValidation
Public Functions
checkDeployPos(TransformF txfm)
Check if there is the space at the given transform is free to spawn into.
The shape's bounding box volume is used to check for collisions at the given world transform. Only interior and static objects are checked for collision. Parameters:
txfm | Deploy transform to check |
True if the space is free, false if there is already something in the way.
note:This is a server side only check, and is not actually limited to spawning.
getDeployTransform(Point3F pos, Point3F normal)
Helper method to get a transform from a position and vector (suitable for use with setTransform).
Parameters:
pos | Desired transform position |
normal | Vector of desired direction |
The deploy transform