iPcMechanicsObject Struct Reference
A dynamic body. More...
#include <propclass/mechsys.h>
Public Member Functions | |
virtual void | AddForceDuration (const csVector3 &force, bool relative, const csVector3 &position, float seconds)=0 |
During the specified time (in seconds) add the force every step. | |
virtual void | AddForceFrame (const csVector3 &force, bool relative, const csVector3 &position)=0 |
During the next frame add the force every step. | |
virtual void | AddForceOnce (const csVector3 &force, bool relative, const csVector3 &position)=0 |
Add a force once to the given object. | |
virtual uint32 | AddForceTagged (const csVector3 &force, bool relative, const csVector3 &position)=0 |
Add a force with the given tag, to be manually removed later. | |
virtual void | AddToGroup (const char *group)=0 |
Add this body to the specified group. | |
virtual void | AttachColliderBox (const csVector3 &size, const csOrthoTransform &trans)=0 |
Create a box collider for this object. | |
virtual void | AttachColliderCylinder (float length, float radius, const csOrthoTransform &trans)=0 |
Create a cylinder collider for this object. | |
virtual void | AttachColliderMesh ()=0 |
Create a mesh collider for this object from the attached iPcMesh. | |
virtual void | AttachColliderPlane (const csPlane3 &plane)=0 |
Create a plane collider for this object. | |
virtual void | AttachColliderSphere (float radius, const csVector3 &offset)=0 |
Create a sphere collider for this object. | |
virtual void | ClearForces ()=0 |
Clear the permanent forces on this body. | |
virtual iJoint * | CreateJoint (iPcMechanicsObject *other)=0 |
Create a joint between this object and another. | |
virtual const csVector3 | GetAngularVelocity ()=0 |
Get the current angular velocity (rotation) of the object. | |
virtual iRigidBody * | GetBody ()=0 |
Get the associated rigid body. | |
virtual iPcCamera * | GetCamera ()=0 |
Get the associated camera property class. | |
virtual float | GetDensity ()=0 |
Get the object's density. | |
virtual float | GetDrag ()=0 |
Get the object's drag. | |
virtual float | GetElasticity ()=0 |
Get the object's elasticity. | |
virtual float | GetFriction ()=0 |
Get the object's friction. | |
virtual const csVector3 & | GetLift ()=0 |
Get the object's lift. | |
virtual iPcLight * | GetLight ()=0 |
Get the associated light property class. | |
virtual const csVector3 | GetLinearVelocity ()=0 |
Get the current linear velocity (movement) of the object. | |
virtual float | GetMass ()=0 |
Get the object's mass. | |
virtual iPcMechanicsSystem * | GetMechanicsSystem ()=0 |
Get the associated mechanics system. | |
virtual iPcMesh * | GetMesh ()=0 |
Get the associated mesh property class. | |
virtual float | GetSoftness ()=0 |
Get the object's softness. | |
virtual bool | IsStatic () const =0 |
Return true if static. | |
virtual csVector3 | LocalToWorld (csVector3 local)=0 |
Convert a vector from this objects local system to world coord system. | |
virtual void | MakeStatic (bool stat)=0 |
Make static. | |
virtual void | RemoveForceTagged (uint32 forceid)=0 |
Remove the force with the given tag. | |
virtual void | RemoveFromGroup (const char *group)=0 |
Remove this body from the specified group. | |
virtual void | SetAngularVelocity (const csVector3 &vel)=0 |
Set the initial angular velocity (rotation) of the object. | |
virtual void | SetCamera (iPcCamera *camera)=0 |
Set the camera which this body will control. | |
virtual void | SetDensity (float density)=0 |
Set the object's density. | |
virtual void | SetDrag (float drag)=0 |
Set the object's drag. | |
virtual void | SetElasticity (float elasticity)=0 |
Set the object's elasticity. | |
virtual void | SetFriction (float friction)=0 |
Set the object's friction. | |
virtual void | SetLift (const csVector3 &lift)=0 |
Set the object's lift. | |
virtual void | SetLight (iPcLight *light)=0 |
Set the light which this body will control. | |
virtual void | SetLinearVelocity (const csVector3 &vel)=0 |
Set the initial linear velocity (movement) of the object. | |
virtual void | SetMass (float mass)=0 |
Set the object's mass. | |
virtual void | SetMechanicsSystem (iPcMechanicsSystem *mechsys)=0 |
Set the mechanics system to use. | |
virtual void | SetMesh (iPcMesh *mesh)=0 |
Set the mesh which this body will control. | |
virtual void | SetSoftness (float softness)=0 |
Set the object's softness. | |
virtual csVector3 | WorldToLocal (csVector3 world)=0 |
Convert a vector from world coord system to this objects local system. |
Detailed Description
A dynamic body.This property class can send out the following messages to the behaviour (add prefix 'cel.parameter.' to get the ID for parameters):
- pcdynamicbody_collision: an entity has collided with this entity.
This property class supports the following actions (add prefix 'cel.action.' to get the ID of the action and add prefix 'cel.parameter.' to get the ID of the parameter):
- InitPhys: parameters 'friction' (float), 'elasticity' (float), 'density' (float), 'softness' (float), 'lift' (vector3), and 'drag' (float).
- MakeStatic: parameters 'static' (bool).
- SetSystem: parameters 'syspcent' (string) and 'syspctag' (string).
- SetMesh: parameters 'mechpctag' (string).
- SetColliderSphere: parameters 'radius' (float) and 'offset' (vector3).
- SetColliderCylinder: parameters 'length' (float), 'radius' (float) 'axis' (vector3), 'offset' (vector3), and 'angle' (float).
- SetColliderBox: parameters 'size' (vector3), 'axis' (vector3), 'angle' (float), and 'offset' (vector3).
- SetColliderPlane: parameters 'normal' (vector3) and 'offset' (float).
- SetColliderMesh: no parameters.
- SetLinearVelocity: parameters 'velocity' (vector3).
- SetAngularVelocity: parameters 'velocity' (vector3).
- AddForceOnce: parameters 'force' (vector3), 'relative' (bool), and 'position' (vector3).
- AddForceDuration: parameters 'force' (vector3), 'relative' (bool), 'position' (vector3), and 'seconds' (float).
- AddForceFrame: parameters 'force' (vector3), 'relative' (bool), and 'position' (vector3).
- AddForceTagged: parameters 'force' (vector3), 'relative' (bool), and 'position' (vector3). The tag will be set in the property 'cel.property.lasttag'.
- RemoveForceTagged: parameters 'tag' (long).
- ClearForces: no parameters.
- SetPosition: parameters 'position' (vector3).
- ClearRotation: no parameters.
- LookAt: parameters 'forward' (vector3) and 'up' (vector3).
This property class supports the following properties (add prefix 'cel.property.' to get the ID of the property:
- lasttag (long, read): last tag returned by AddForceTagged action.
Definition at line 272 of file mechsys.h.
Member Function Documentation
|
During the specified time (in seconds) add the force every step.
|
|
During the next frame add the force every step.
|
|
Add a force once to the given object.
|
|
Add a force with the given tag, to be manually removed later.
|
|
Add this body to the specified group.
|
|
Create a box collider for this object.
|
|
Create a cylinder collider for this object.
|
|
Create a mesh collider for this object from the attached iPcMesh.
|
|
Create a plane collider for this object.
|
|
Create a sphere collider for this object.
|
|
Clear the permanent forces on this body.
|
|
Create a joint between this object and another.
|
|
Get the current angular velocity (rotation) of the object.
|
|
Get the associated rigid body.
|
|
Get the associated camera property class.
|
|
Get the object's density. Must be called before Attach..., otherwise defaults to 1. |
|
Get the object's drag. Must be called before Attach..., otherwise defaults to 0. |
|
Get the object's elasticity. Must be called before Attach..., otherwise defaults to 0. |
|
Get the object's friction. Must be called before Attach..., otherwise defaults to 1. |
|
Get the object's lift. Must be called before Attach..., otherwise defaults to 0. |
|
Get the associated light property class.
|
|
Get the current linear velocity (movement) of the object.
|
|
Get the object's mass. Must be called before Attach..., otherwise defaults to 1. |
|
Get the associated mechanics system.
|
|
Get the associated mesh property class.
|
|
Get the object's softness. Must be called before Attach..., otherwise defaults to 0. |
|
Return true if static.
|
|
Convert a vector from this objects local system to world coord system.
|
|
Make static.
|
|
Remove the force with the given tag.
|
|
Remove this body from the specified group.
|
|
Set the initial angular velocity (rotation) of the object.
|
|
Set the camera which this body will control. If this is used then this overrides the default behaviour of trying to find 'pcmesh', 'pclight', and 'pccamera' in that order.
|
|
Set the object's density. Must be called before Attach..., otherwise defaults to 1.
|
|
Set the object's drag. Must be called before Attach..., otherwise defaults to 0.
|
|
Set the object's elasticity. Must be called before Attach..., otherwise defaults to 0.
|
|
Set the object's friction. Must be called before Attach..., otherwise defaults to 1.
|
|
Set the object's lift. Must be called before Attach..., otherwise defaults to 0.
|
|
Set the light which this body will control. If this is used then this overrides the default behaviour of trying to find 'pcmesh', 'pclight', and 'pccamera' in that order.
|
|
Set the initial linear velocity (movement) of the object.
|
|
Set the object's mass. Must be called before Attach..., otherwise defaults to 1.
|
|
Set the mechanics system to use. If you don't do this then the object will look in the object registry for a suitable mechanics system.
|
|
Set the mesh which this body will control. If this is used then this overrides the default behaviour of trying to find 'pcmesh', 'pclight', and 'pccamera' in that order.
|
|
Set the object's softness. Must be called before Attach..., otherwise defaults to 0.
|
|
Convert a vector from world coord system to this objects local system.
|
The documentation for this struct was generated from the following file:
- propclass/mechsys.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.6