ShapeBaseData

object.

Inherit:
GameBaseData

Description

Defines properties for a ShapeBase object.

Methods

bool ShapeBaseData::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
Returns:True if the space is free, false if there is already something in the way.
TransformF ShapeBaseData::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
Returns:

The deploy transform

void ShapeBaseData::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
void ShapeBaseData::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.
void ShapeBaseData::onDestroyed(ShapeBase obj, string lastState)

Called when the object damage state changes to Destroyed.

Parameters:
  • obj – The ShapeBase object
  • lastState – The previous damage state
void ShapeBaseData::onDisabled(ShapeBase obj, string lastState)

Called when the object damage state changes to Disabled.

Parameters:
  • obj – The ShapeBase object
  • lastState – The previous damage state
void ShapeBaseData::onEnabled(ShapeBase obj, string lastState)

Called when the object damage state changes to Enabled.

Parameters:
  • obj – The ShapeBase object
  • lastState – The previous damage state
void ShapeBaseData::onEndSequence(ShapeBase obj, int slot)

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
void ShapeBaseData::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
void ShapeBaseData::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
void ShapeBaseData::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

Fields

bool ShapeBaseData::cameraCanBank

If the derrived class supports it, allow the camera to bank.

float ShapeBaseData::cameraDefaultFov

The default camera vertical FOV in degrees.

float ShapeBaseData::cameraMaxDist

The maximum distance from the camera to the object. Used when computing a custom camera transform for this object.

float ShapeBaseData::cameraMaxFov

The maximum camera vertical FOV allowed in degrees.

float ShapeBaseData::cameraMinDist

The minimum distance from the camera to the object. Used when computing a custom camera transform for this object.

float ShapeBaseData::cameraMinFov

The minimum camera vertical FOV allowed in degrees.

bool ShapeBaseData::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.

string ShapeBaseData::cubeReflectorDesc

References a ReflectorDesc datablock that defines performance and quality properties for dynamic reflections.

DebrisData ShapeBaseData::Debris

Debris to generate when this shape is blown up.

filename ShapeBaseData::debrisShapeName

The DTS or DAE model to use for auto-generated breakups.

float ShapeBaseData::density

Shape density. Used when computing buoyancy when in water.

float ShapeBaseData::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 ShapeBaseData::disabledLevel

Damage level above which the object is disabled. Currently unused.

float ShapeBaseData::drag

Drag factor. Reduces velocity of moving objects.

ExplosionData ShapeBaseData::Explosion

Explosion to generate when this shape is blown up.

bool ShapeBaseData::firstPersonOnly

Flag controlling whether the view from this object is first person only.

bool ShapeBaseData::inheritEnergyFromMount

Flag controlling whether to manage our own energy level, or to use the energy level of the object we are mounted to.

bool ShapeBaseData::isInvincible

Invincible flag; when invincible, the object cannot be damaged or repaired.

float ShapeBaseData::mass

Shape mass. Used in simulation of moving objects.

float ShapeBaseData::maxDamage

Maximum damage level for this object.

float ShapeBaseData::maxEnergy

Maximum energy level for this object.

bool ShapeBaseData::mountedImagesBank

Do mounted images bank along with the camera?

bool ShapeBaseData::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).

bool ShapeBaseData::renderWhenDestroyed

Whether to render the shape when it is in the “Destroyed” damage state.

float ShapeBaseData::repairRate

Rate at which damage is repaired in damage units/tick. This value is subtracted from the damage level until it reaches 0.

bool ShapeBaseData::shadowEnable

Enable shadows for this shape (currently unused, shadows are always enabled).

float ShapeBaseData::shadowMaxVisibleDistance

Maximum distance at which shadow is visible (currently unused).

float ShapeBaseData::shadowProjectionDistance

Maximum height above ground to project shadow. If the object is higher than this no shadow will be rendered.

int ShapeBaseData::shadowSize

Size of the projected shadow texture (must be power of 2).

float ShapeBaseData::shadowSphereAdjust

Scalar applied to the radius of spot shadows (initial radius is based on the shape bounds but can be adjusted with this field).

filename ShapeBaseData::shapeFile

The DTS or DAE model to use for this object.

ExplosionData ShapeBaseData::underwaterExplosion

Explosion to generate when this shape is blown up underwater.

bool ShapeBaseData::useEyePoint

Flag controlling whether the client uses this object’s eye point to view from.