CEL

Public API Reference

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

iPcMechanicsObject Struct Reference

A dynamic body. More...

#include <propclass/mechsys.h>

List of all members.

Public Member Functions

virtual void SetMesh (iPcMesh *mesh)=0
 Set the mesh which this body will control.
virtual iPcMeshGetMesh ()=0
 Get the associated mesh property class.
virtual void SetMechanicsSystem (iPcMechanicsSystem *mechsys)=0
 Set the mechanics system to use.
virtual iPcMechanicsSystemGetMechanicsSystem ()=0
 Get the associated mechanics system.
virtual iRigidBody * GetBody ()=0
 Get the associated rigid body.
virtual void SetFriction (float friction)=0
 Set the object's friction.
virtual void SetMass (float mass)=0
 Set the object's mass.
virtual void SetElasticity (float elasticity)=0
 Set the object's elasticity.
virtual void SetDensity (float density)=0
 Set the object's density.
virtual void SetSoftness (float softness)=0
 Set the object's softness.
virtual void SetLift (const csVector3 &lift)=0
 Set the object's lift.
virtual void SetDrag (float drag)=0
 Set the object's drag.
virtual float GetFriction ()=0
 Get the object's friction.
virtual float GetMass ()=0
 Get the object's mass.
virtual float GetElasticity ()=0
 Get the object's elasticity.
virtual float GetDensity ()=0
 Get the object's density.
virtual float GetSoftness ()=0
 Get the object's softness.
virtual const csVector3 & GetLift ()=0
 Get the object's lift.
virtual float GetDrag ()=0
 Get the object's drag.
virtual void SetLinearVelocity (const csVector3 &vel)=0
 Set the initial linear velocity (movement) of the object.
virtual void SetAngularVelocity (const csVector3 &vel)=0
 Set the initial angular velocity (rotation) of the object.
virtual const csVector3 GetLinearVelocity ()=0
 Get the current linear velocity (movement) of the object.
virtual const csVector3 GetAngularVelocity ()=0
 Get the current angular velocity (rotation) of the object.
virtual void MakeStatic (bool stat)=0
 Make static.
virtual bool IsStatic () const =0
 Return true if static.
virtual void AttachColliderSphere (float radius, const csVector3 &offset)=0
 Create a sphere collider for this object.
virtual void AttachColliderCylinder (float length, float radius, const csOrthoTransform &trans)=0
 Create a cylinder collider for this object.
virtual void AttachColliderBox (const csVector3 &size, const csOrthoTransform &trans)=0
 Create a box collider for this object.
virtual void AttachColliderPlane (const csPlane3 &plane)=0
 Create a plane collider for this object.
virtual void AttachColliderMesh ()=0
 Create a mesh collider for this object from the attached iPcMesh.
virtual void AddForceOnce (const csVector3 &force, bool relative, const csVector3 &position)=0
 Add a force once to the given object.
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 AddForceTagged (const csVector3 &force, bool relative, const csVector3 &position, uint32 &forceid)=0
 Add a force with the given tag, to be manually removed later.
virtual void RemoveForceTagged (uint32 forceid)=0
 Remove the force with the given tag.
virtual void ClearForces ()=0
 Clear the permanent forces on this body.
virtual void AddToGroup (const char *group)=0
 Add this body to the specified group.
virtual void RemoveFromGroup (const char *group)=0
 Remove this body from the specified group.
virtual iJoint * CreateJoint (iPcMechanicsObject *other)=0
 Create a joint between this object and another.


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):

Definition at line 198 of file mechsys.h.


Member Function Documentation

virtual void iPcMechanicsObject::AddForceDuration const csVector3 &  force,
bool  relative,
const csVector3 &  position,
float  seconds
[pure virtual]
 

During the specified time (in seconds) add the force every step.

Parameters:
force a vector representing the force to add to this object.
relative if set to true, the given force and position are both in object space; otherwise they are in world space.
position the position of the force.
seconds the number of seconds that this force should last.

virtual void iPcMechanicsObject::AddForceFrame const csVector3 &  force,
bool  relative,
const csVector3 &  position
[pure virtual]
 

During the next frame add the force every step.

Parameters:
force a vector representing the force to add to this object.
relative if set to true, the given force and position are both in object space; otherwise they are in world space.
position the position of the force.

virtual void iPcMechanicsObject::AddForceOnce const csVector3 &  force,
bool  relative,
const csVector3 &  position
[pure virtual]
 

Add a force once to the given object.

Parameters:
force a vector representing the force to add to this object.
relative if set to true, the given force and position are both in object space; otherwise they are in world space.
position the position of the force.

virtual void iPcMechanicsObject::AddForceTagged const csVector3 &  force,
bool  relative,
const csVector3 &  position,
uint32 &  forceid
[pure virtual]
 

Add a force with the given tag, to be manually removed later.

Parameters:
force a vector representing the force to add to this object.
relative if set to true, the given force and position are both in object space; otherwise they are in world space.
position the position of the force.
forceid is set to the ID of this force.

virtual void iPcMechanicsObject::AddToGroup const char *  group  )  [pure virtual]
 

Add this body to the specified group.

Parameters:
group the name of the group to add the body to. Creates the group if it does not exist.

virtual void iPcMechanicsObject::AttachColliderBox const csVector3 &  size,
const csOrthoTransform &  trans
[pure virtual]
 

Create a box collider for this object.

Parameters:
size the size of the box in each direction.
trans the transformation to apply to the box.

virtual void iPcMechanicsObject::AttachColliderCylinder float  length,
float  radius,
const csOrthoTransform &  trans
[pure virtual]
 

Create a cylinder collider for this object.

Parameters:
length the length of the cylinder.
radius the radius of the cylinder.
trans the transformation to apply to the cylinder.

virtual void iPcMechanicsObject::AttachColliderMesh  )  [pure virtual]
 

Create a mesh collider for this object from the attached iPcMesh.

virtual void iPcMechanicsObject::AttachColliderPlane const csPlane3 &  plane  )  [pure virtual]
 

Create a plane collider for this object.

Parameters:
plane the definition of the plane to use.

virtual void iPcMechanicsObject::AttachColliderSphere float  radius,
const csVector3 &  offset
[pure virtual]
 

Create a sphere collider for this object.

Parameters:
radius the radius of the sphere.
offset the offset from the center of the object to the center of the sphere.

virtual void iPcMechanicsObject::ClearForces  )  [pure virtual]
 

Clear the permanent forces on this body.

virtual iJoint* iPcMechanicsObject::CreateJoint iPcMechanicsObject other  )  [pure virtual]
 

Create a joint between this object and another.

virtual const csVector3 iPcMechanicsObject::GetAngularVelocity  )  [pure virtual]
 

Get the current angular velocity (rotation) of the object.

virtual iRigidBody* iPcMechanicsObject::GetBody  )  [pure virtual]
 

Get the associated rigid body.

virtual float iPcMechanicsObject::GetDensity  )  [pure virtual]
 

Get the object's density.

Must be called before Attach..., otherwise defaults to 1.

virtual float iPcMechanicsObject::GetDrag  )  [pure virtual]
 

Get the object's drag.

Must be called before Attach..., otherwise defaults to 0.

virtual float iPcMechanicsObject::GetElasticity  )  [pure virtual]
 

Get the object's elasticity.

Must be called before Attach..., otherwise defaults to 0.

virtual float iPcMechanicsObject::GetFriction  )  [pure virtual]
 

Get the object's friction.

Must be called before Attach..., otherwise defaults to 1.

virtual const csVector3& iPcMechanicsObject::GetLift  )  [pure virtual]
 

Get the object's lift.

Must be called before Attach..., otherwise defaults to 0.

virtual const csVector3 iPcMechanicsObject::GetLinearVelocity  )  [pure virtual]
 

Get the current linear velocity (movement) of the object.

virtual float iPcMechanicsObject::GetMass  )  [pure virtual]
 

Get the object's mass.

Must be called before Attach..., otherwise defaults to 1.

virtual iPcMechanicsSystem* iPcMechanicsObject::GetMechanicsSystem  )  [pure virtual]
 

Get the associated mechanics system.

virtual iPcMesh* iPcMechanicsObject::GetMesh  )  [pure virtual]
 

Get the associated mesh property class.

virtual float iPcMechanicsObject::GetSoftness  )  [pure virtual]
 

Get the object's softness.

Must be called before Attach..., otherwise defaults to 0.

virtual bool iPcMechanicsObject::IsStatic  )  const [pure virtual]
 

Return true if static.

virtual void iPcMechanicsObject::MakeStatic bool  stat  )  [pure virtual]
 

Make static.

Parameters:
stat if true, the object is static; otherwise it is affected by forces.

virtual void iPcMechanicsObject::RemoveForceTagged uint32  forceid  )  [pure virtual]
 

Remove the force with the given tag.

Parameters:
forceid the tag of the desired force.

virtual void iPcMechanicsObject::RemoveFromGroup const char *  group  )  [pure virtual]
 

Remove this body from the specified group.

Parameters:
group the name of the group to remove the body from.

virtual void iPcMechanicsObject::SetAngularVelocity const csVector3 &  vel  )  [pure virtual]
 

Set the initial angular velocity (rotation) of the object.

Parameters:
vel the angular velocity to apply to the object

virtual void iPcMechanicsObject::SetDensity float  density  )  [pure virtual]
 

Set the object's density.

Must be called before Attach..., otherwise defaults to 1.

Parameters:
density the density of this object.

virtual void iPcMechanicsObject::SetDrag float  drag  )  [pure virtual]
 

Set the object's drag.

Must be called before Attach..., otherwise defaults to 0.

Parameters:
drag the drag generated by this object in a fluid.

virtual void iPcMechanicsObject::SetElasticity float  elasticity  )  [pure virtual]
 

Set the object's elasticity.

Must be called before Attach..., otherwise defaults to 0.

Parameters:
elasticity the elasticity of this object.

virtual void iPcMechanicsObject::SetFriction float  friction  )  [pure virtual]
 

Set the object's friction.

Must be called before Attach..., otherwise defaults to 1.

Parameters:
friction the friction coefficient for this object.

virtual void iPcMechanicsObject::SetLift const csVector3 &  lift  )  [pure virtual]
 

Set the object's lift.

Must be called before Attach..., otherwise defaults to 0.

Parameters:
lift the lift generated by this object in a fluid.

virtual void iPcMechanicsObject::SetLinearVelocity const csVector3 &  vel  )  [pure virtual]
 

Set the initial linear velocity (movement) of the object.

Parameters:
vel the linear velocity to apply to the object.

virtual void iPcMechanicsObject::SetMass float  mass  )  [pure virtual]
 

Set the object's mass.

Must be called before Attach..., otherwise defaults to 1.

Parameters:
mass the mass of this object.

virtual void iPcMechanicsObject::SetMechanicsSystem iPcMechanicsSystem mechsys  )  [pure virtual]
 

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.

Parameters:
mechsys a pointer to the iPcMechanicsSystem to use.

virtual void iPcMechanicsObject::SetMesh iPcMesh mesh  )  [pure virtual]
 

Set the mesh which this body will control.

If not called then this property class will automatically look for 'pcmesh'.

Parameters:
mesh a pointer to the iPcMesh to control.

virtual void iPcMechanicsObject::SetSoftness float  softness  )  [pure virtual]
 

Set the object's softness.

Must be called before Attach..., otherwise defaults to 0.

Parameters:
softness the softness of this object.


The documentation for this struct was generated from the following file:
Generated for CEL: Crystal Entity Layer by doxygen 1.4.4