Drag[en]gine Game Engine  1.0
deCollider Class Reference

World Collider Object. More...

#include <deCollider.h>

Inheritance diagram for deCollider:
deResource deObject deColliderRig deColliderVolume deColliderComponent

Public Types

enum  eResponseType { ertStatic, ertDynamic, ertKinematic }
 Collision Response Types. More...
 

Public Member Functions

void pNotifyBoneAngularVelocityChanged (int index)
 
void pNotifyBoneDynamicChanged (int index)
 
void pNotifyBoneLinearVelocityChanged (int index)
 
void pNotifyBoneOrientationChanged (int index)
 
void pNotifyBonePositionChanged (int index)
 
void pNotifyBonePropertiesChanged (int index)
 
Management
const decDVectorGetPosition () const
 Central mass point position. More...
 
void SetPosition (const decDVector &position)
 Set central mass point position. More...
 
const decQuaternionGetOrientation () const
 Orientation. More...
 
void SetOrientation (const decQuaternion &orientation)
 Set orientation. More...
 
const decVectorGetScale () const
 Scale. More...
 
void SetScale (const decVector &scale)
 Set scale. More...
 
const decVectorGetLinearVelocity () const
 Linear velocity in m/s. More...
 
void SetLinearVelocity (const decVector &linVelo)
 Set linear velocity in m/s. More...
 
const decVectorGetAngularVelocity () const
 Angular velocity in degree/s. More...
 
void SetAngularVelocity (const decVector &angVelo)
 Set angular velocity in degree/s. More...
 
float GetMass () const
 Mass in kg. More...
 
void SetMass (float mass)
 Set mass in kg. More...
 
const decVectorGetGravity () const
 Gravity in m/s^2. More...
 
void SetGravity (const decVector &gravity)
 Set gravity in m/s^2. More...
 
bool GetEnabled () const
 Collider is enabled. More...
 
void SetEnabled (bool enabled)
 Set if collider is enabled. More...
 
eResponseType GetResponseType () const
 Collision response type. More...
 
void SetResponseType (eResponseType responseType)
 Set Collision response type. More...
 
bool GetUseLocalGravity () const
 Use local gravity instead of the world gravity. More...
 
void SetUseLocalGravity (bool useLocalGravity)
 Set if local gravity is used instead of the world gravity. More...
 
float GetForceFieldDirect () const
 Factor for direct type force fields. More...
 
void SetForceFieldDirect (float factor)
 Set factor for direct type force fields. More...
 
float GetForceFieldSurface () const
 Factor for surface type force fields. More...
 
void SetForceFieldSurface (float factor)
 Set factor for surface type force fields. More...
 
float GetForceFieldMass () const
 Factor for mass type force fields. More...
 
void SetForceFieldMass (float factor)
 Set factor for mass type force fields. More...
 
float GetForceFieldSpeed () const
 Factor for speed type force fields. More...
 
void SetForceFieldSpeed (float factor)
 Set factor for speed type force fields. More...
 
const decCollisionFilterGetCollisionFilter () const
 Collision filter. More...
 
void SetCollisionFilter (const decCollisionFilter &filter)
 Set collision filter. More...
 
Force and Impuls
void ApplyImpuls (const decVector &impuls)
 Apply impuls at the center mass point. More...
 
void ApplyImpulsAt (const decVector &impuls, const decVector &point)
 Apply impuls relative to the collider position. More...
 
void ApplyTorqueImpuls (const decVector &torqueImpuls)
 Apply torque impuls at the center mass point. More...
 
void ApplyForce (const decVector &force)
 Apply force at the center mass point. More...
 
void ApplyForceAt (const decVector &force, const decVector &point)
 Apply force relative to the collider position. More...
 
void ApplyTorque (const decVector &torque)
 Apply torque force at the center mass point. More...
 
Attachments
int GetAttachmentCount () const
 Number of attachments. More...
 
deColliderAttachmentGetAttachmentAt (int index) const
 Attachment at index. More...
 
bool HasAttachmentWith (deResource *resource) const
 Resource is attached. More...
 
deColliderAttachmentGetAttachmentWith (deResource *resource) const
 Attachment with resource or null if not attached. More...
 
void AddAttachment (deColliderAttachment *attachment)
 Add attachment. More...
 
void RemoveAttachment (deColliderAttachment *attachment)
 Remove attachment. More...
 
void RemoveAllAttachments ()
 Remove all attachments. More...
 
void NotifyAttachmentChanged (int index)
 Notify peers attachment changed. More...
 
void AttachmentsForceUpdate ()
 Force update of all attachments. More...
 
Constraints
int GetConstraintCount () const
 Number of constraints. More...
 
deColliderConstraintGetConstraintAt (int index) const
 Constraint at index. More...
 
int IndexOfConstraint (deColliderConstraint *constraint) const
 Index of constraint or -1 if absent. More...
 
bool HasConstraint (deColliderConstraint *constraint) const
 Constraint is present. More...
 
void AddConstraint (deColliderConstraint *constraint)
 Add constraint. More...
 
void RemoveConstraint (deColliderConstraint *constraint)
 Remove constraint. More...
 
void RemoveAllConstraints ()
 Remove all constraints. More...
 
void NotifyConstraintChanged (int index)
 Notify peers constraint has changed. More...
 
Ignore colliders
int GetIgnoreColliderCount () const
 Number of colliders to ignore. More...
 
deColliderGetIgnoreColliderAt (int index) const
 Collider to ignore at index. More...
 
bool HasIgnoreCollider (deCollider *collider) const
 Collider to ignore is present. More...
 
void AddIgnoreCollider (deCollider *collider)
 Add collider to ignore. More...
 
void RemoveIgnoreCollider (deCollider *collider)
 Remove collider to ignore. More...
 
void RemoveAllIgnoreColliders ()
 Remove all colliders to ignore. More...
 
Post physics collision tests
int GetCollisionTestCount () const
 Number of post physics collision tests. More...
 
deColliderCollisionTestGetCollisionTestAt (int index) const
 Post physics collision test at index. More...
 
int IndexOfCollisionTest (deColliderCollisionTest *collisionTest) const
 Index of post physics collision test or -1 if not found. More...
 
bool HasCollisionTest (deColliderCollisionTest *collisionTest) const
 Post physics collision test is present. More...
 
void AddCollisionTest (deColliderCollisionTest *collisionTest)
 Adds post physics collision test. More...
 
void RemoveCollisionTest (deColliderCollisionTest *collisionTest)
 Remove post physics collision test. More...
 
void RemoveAllCollisionTests ()
 Remove all post physics collision tests. More...
 
void NotifyCollisionTestChanged (int index)
 Notify peers a post physics collision test changed. More...
 
void NotifyCollisionTestEnableChanged (int index)
 Notify peers a post physics collision test enabled or disabled. More...
 
Collision Detection
bool PointInside (const decDVector &point)
 Test if a point is located inside the collider. More...
 
void RayHits (const decDVector &rayOrigin, const decVector &rayDirection, deBaseScriptingCollider *listener)
 Test ray for collision with the collider. More...
 
void ColliderHits (deCollider *collider, deBaseScriptingCollider *listener)
 Test collider for collision with collider. More...
 
void ColliderMoveHits (deCollider *collider, const decVector &displacement, deBaseScriptingCollider *listener)
 Test moving collider for collision with collider. More...
 
void ColliderRotateHits (deCollider *collider, const decVector &rotation, deBaseScriptingCollider *listener)
 Test rotating collider for collision with collider. More...
 
void ColliderMoveRotateHits (deCollider *collider, const decVector &displacement, const decVector &rotation, deBaseScriptingCollider *listener)
 Test moving and rotating collider for collision with collider. More...
 
System Peers
deBasePhysicsColliderGetPhysicsCollider () const
 Physics system peer. More...
 
void SetPhysicsCollider (deBasePhysicsCollider *phyCollider)
 Set physics system peer. More...
 
deBaseScriptingColliderGetScriptingCollider () const
 Scripting system peer. More...
 
void SetScriptingCollider (deBaseScriptingCollider *scrCollider)
 Set scripting system peer. More...
 
Visiting
virtual void Visit (deColliderVisitor &visitor)
 Visit collider. More...
 
Linked List
deWorldGetParentWorld () const
 Parent world or NULL. More...
 
void SetParentWorld (deWorld *world)
 Set parent world or NULL. More...
 
deColliderGetLLWorldPrev () const
 Previous collider in the parent world linked list. More...
 
void SetLLWorldPrev (deCollider *collider)
 Set next collider in the parent world linked list. More...
 
deColliderGetLLWorldNext () const
 Next collider in the parent world linked list. More...
 
void SetLLWorldNext (deCollider *collider)
 Set next collider in the parent world linked list. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Protected Member Functions

void pNotifyCollisionVolumeChanged ()
 
void pNotifyComponentChanged ()
 
void pNotifyRigChanged ()
 
- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Constructors and Destructors

 deCollider (deColliderManager *manager)
 Create collider. More...
 
virtual ~deCollider ()
 Clean up collider. More...
 

Detailed Description

World Collider Object.

Colliders are used by the physics module to provide collision detection and optional collision response. After the collision detection stage is done each Collider contains the new state of motion. The user can then update the game state depending on the changes. The scripting peer receives all relevant events during a collision detection run. A Collider can be defined as a couple of different types.

The Collider object itself can not be constructed. Create a new Collider object using one of deColliderVolume, deColliderRig or deColliderComponent classes.

Collision Response Types
The Collision Response Type determines how a collision is handeled once detected.

ertNone causes no response to be send and hence does not notify you about a collision. This is used for static objects that only act as blockers or objects that do not wish to generate collision notification because they are activated by other objects.

ertPhysics causes a physical response to be calculated by the Physics Module. The Scripting Module is notified using its peer about the collision. You are responsible there to provide informations about the surfaces getting in contact to allow the Physics Module to calculate a proper physical reaction to the collision.

ertCustom is used to generate your own collision responses. Upon collision the Scripting Module is notified. In the CollisionResponse function you are responsible for specifying the effect of the collision on the object.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

Member Enumeration Documentation

◆ eResponseType

Collision Response Types.

Enumerator
ertStatic 

Static, same as no response.

ertDynamic 

Dynamic, same as physics response.

ertKinematic 

Kinematic, same as custom response.

Constructor & Destructor Documentation

◆ deCollider()

deCollider::deCollider ( deColliderManager manager)

Create collider.

◆ ~deCollider()

virtual deCollider::~deCollider ( )
protectedvirtual

Clean up collider.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddAttachment()

void deCollider::AddAttachment ( deColliderAttachment attachment)

Add attachment.

Exceptions
deeInvalidParamResource is already attached.

Referenced by GetAttachmentCount().

◆ AddCollisionTest()

void deCollider::AddCollisionTest ( deColliderCollisionTest collisionTest)

Adds post physics collision test.

Referenced by GetConstraintCount().

◆ AddConstraint()

void deCollider::AddConstraint ( deColliderConstraint constraint)

Add constraint.

Referenced by GetConstraintCount().

◆ AddIgnoreCollider()

void deCollider::AddIgnoreCollider ( deCollider collider)

Add collider to ignore.

Exceptions
deeInvalidParamcollider is present.

Referenced by GetConstraintCount().

◆ ApplyForce()

void deCollider::ApplyForce ( const decVector force)

Apply force at the center mass point.

This affects the total force and torque applied during the next debpWorld::DetectCollision only. Useful to apply continuous forces on an object. Has to be called every frame update.

Referenced by GetCollisionFilter().

◆ ApplyForceAt()

void deCollider::ApplyForceAt ( const decVector force,
const decVector point 
)

Apply force relative to the collider position.

This affects the total force and torque applied during the next debpWorld::DetectCollision only. Useful to apply continuous forces on an object. Has to be called every frame update.

Referenced by GetCollisionFilter().

◆ ApplyImpuls()

void deCollider::ApplyImpuls ( const decVector impuls)

Apply impuls at the center mass point.

This affects linear and angular velocity. This is the best way way to apply impacts.

Referenced by GetCollisionFilter().

◆ ApplyImpulsAt()

void deCollider::ApplyImpulsAt ( const decVector impuls,
const decVector point 
)

Apply impuls relative to the collider position.

This affects linear and angular velocity. This is the best way way to apply impacts.

Referenced by GetCollisionFilter().

◆ ApplyTorque()

void deCollider::ApplyTorque ( const decVector torque)

Apply torque force at the center mass point.

This affects the total torque applied during the next debpWorld::DetectCollision only. Useful to apply continuous forces on an object. Has to be called every frame update.

Referenced by GetCollisionFilter().

◆ ApplyTorqueImpuls()

void deCollider::ApplyTorqueImpuls ( const decVector torqueImpuls)

Apply torque impuls at the center mass point.

This affects angular velocity. This is the best way way to apply impacts.

Referenced by GetCollisionFilter().

◆ AttachmentsForceUpdate()

void deCollider::AttachmentsForceUpdate ( )

Force update of all attachments.

You have to call this if want to reset colliders and components to a predefined state like after warping or resetting objects. This requires an attachment update outside the regular physics simulation run by the physics module to prevent exploding behavior.

Referenced by GetAttachmentCount().

◆ ColliderHits()

void deCollider::ColliderHits ( deCollider collider,
deBaseScriptingCollider listener 
)

Test collider for collision with collider.

For each collision deBaseScriptingCollider::CollisionResponse() of the listener set in the tested collider is called. To stop testing set deCollisionInfo::SetStopTesting() to true.

Referenced by GetConstraintCount().

◆ ColliderMoveHits()

void deCollider::ColliderMoveHits ( deCollider collider,
const decVector displacement,
deBaseScriptingCollider listener 
)

Test moving collider for collision with collider.

For each collision deBaseScriptingCollider::CollisionResponse() of the listener set in the tested collider is called. To stop testing set deCollisionInfo::SetStopTesting() to true.

Referenced by GetConstraintCount().

◆ ColliderMoveRotateHits()

void deCollider::ColliderMoveRotateHits ( deCollider collider,
const decVector displacement,
const decVector rotation,
deBaseScriptingCollider listener 
)

Test moving and rotating collider for collision with collider.

For each collision deBaseScriptingCollider::CollisionResponse() of the listener set in the tested collider is called. To stop testing set deCollisionInfo::SetStopTesting() to true.

Referenced by GetConstraintCount().

◆ ColliderRotateHits()

void deCollider::ColliderRotateHits ( deCollider collider,
const decVector rotation,
deBaseScriptingCollider listener 
)

Test rotating collider for collision with collider.

For each collision deBaseScriptingCollider::CollisionResponse() of the listener set in the tested collider is called. To stop testing set deCollisionInfo::SetStopTesting() to true.

Referenced by GetConstraintCount().

◆ GetAngularVelocity()

const decVector& deCollider::GetAngularVelocity ( ) const
inline

Angular velocity in degree/s.

References SetAngularVelocity().

◆ GetAttachmentAt()

deColliderAttachment* deCollider::GetAttachmentAt ( int  index) const

Attachment at index.

Exceptions
deeOutOfBoundaryindex is less than 0 or greater than or equal to GetAttachmentCount().

Referenced by GetAttachmentCount().

◆ GetAttachmentCount()

int deCollider::GetAttachmentCount ( ) const
inline

◆ GetAttachmentWith()

deColliderAttachment* deCollider::GetAttachmentWith ( deResource resource) const

Attachment with resource or null if not attached.

Referenced by GetAttachmentCount().

◆ GetCollisionFilter()

const decCollisionFilter& deCollider::GetCollisionFilter ( ) const
inline

◆ GetCollisionTestAt()

deColliderCollisionTest* deCollider::GetCollisionTestAt ( int  index) const

Post physics collision test at index.

Exceptions
deeInvalidParamindex is less than 0.
deeInvalidParamindex is greater or equal than GetCollisionTestCount()-1.

Referenced by GetConstraintCount().

◆ GetCollisionTestCount()

int deCollider::GetCollisionTestCount ( ) const

Number of post physics collision tests.

Referenced by GetConstraintCount().

◆ GetConstraintAt()

deColliderConstraint* deCollider::GetConstraintAt ( int  index) const

Constraint at index.

Exceptions
deeOutOfBoundaryindex is less than 0 or greater than or equal to GetConstraintCount().

Referenced by GetConstraintCount().

◆ GetConstraintCount()

◆ GetEnabled()

bool deCollider::GetEnabled ( ) const
inline

Collider is enabled.

Only enabled colliders take part in collision detection and response. Disabled colliders though still update attachments and can be used in manual collision detection.

References SetEnabled().

◆ GetForceFieldDirect()

float deCollider::GetForceFieldDirect ( ) const
inline

Factor for direct type force fields.

References SetForceFieldDirect().

◆ GetForceFieldMass()

float deCollider::GetForceFieldMass ( ) const
inline

Factor for mass type force fields.

References SetForceFieldMass().

◆ GetForceFieldSpeed()

float deCollider::GetForceFieldSpeed ( ) const
inline

Factor for speed type force fields.

References SetForceFieldSpeed().

◆ GetForceFieldSurface()

float deCollider::GetForceFieldSurface ( ) const
inline

Factor for surface type force fields.

References SetForceFieldSurface().

◆ GetGravity()

const decVector& deCollider::GetGravity ( ) const
inline

Gravity in m/s^2.

References SetGravity().

◆ GetIgnoreColliderAt()

deCollider* deCollider::GetIgnoreColliderAt ( int  index) const

Collider to ignore at index.

Exceptions
deeInvalidParamindex is less than 0.
deeInvalidParamindex is greater or equal than GetIgnoreColliderCount()-1.

Referenced by GetConstraintCount().

◆ GetIgnoreColliderCount()

int deCollider::GetIgnoreColliderCount ( ) const

Number of colliders to ignore.

Referenced by GetConstraintCount().

◆ GetLinearVelocity()

const decVector& deCollider::GetLinearVelocity ( ) const
inline

Linear velocity in m/s.

References SetLinearVelocity().

◆ GetLLWorldNext()

◆ GetLLWorldPrev()

deCollider* deCollider::GetLLWorldPrev ( ) const
inline

Previous collider in the parent world linked list.

References SetLLWorldPrev().

◆ GetMass()

float deCollider::GetMass ( ) const
inline

Mass in kg.

References SetMass().

◆ GetOrientation()

const decQuaternion& deCollider::GetOrientation ( ) const
inline

Orientation.

References SetOrientation().

◆ GetParentWorld()

deWorld* deCollider::GetParentWorld ( ) const
inline

Parent world or NULL.

References SetParentWorld().

◆ GetPhysicsCollider()

deBasePhysicsCollider* deCollider::GetPhysicsCollider ( ) const
inline

Physics system peer.

References SetPhysicsCollider().

◆ GetPosition()

const decDVector& deCollider::GetPosition ( ) const
inline

Central mass point position.

References SetPosition().

◆ GetResponseType()

eResponseType deCollider::GetResponseType ( ) const
inline

Collision response type.

References SetResponseType().

◆ GetScale()

const decVector& deCollider::GetScale ( ) const
inline

Scale.

References SetScale().

◆ GetScriptingCollider()

deBaseScriptingCollider* deCollider::GetScriptingCollider ( ) const
inline

Scripting system peer.

References SetScriptingCollider(), and Visit().

◆ GetUseLocalGravity()

bool deCollider::GetUseLocalGravity ( ) const
inline

Use local gravity instead of the world gravity.

References SetUseLocalGravity().

◆ HasAttachmentWith()

bool deCollider::HasAttachmentWith ( deResource resource) const

Resource is attached.

Referenced by GetAttachmentCount().

◆ HasCollisionTest()

bool deCollider::HasCollisionTest ( deColliderCollisionTest collisionTest) const

Post physics collision test is present.

Referenced by GetConstraintCount().

◆ HasConstraint()

bool deCollider::HasConstraint ( deColliderConstraint constraint) const

Constraint is present.

Referenced by GetConstraintCount().

◆ HasIgnoreCollider()

bool deCollider::HasIgnoreCollider ( deCollider collider) const

Collider to ignore is present.

Referenced by GetConstraintCount().

◆ IndexOfCollisionTest()

int deCollider::IndexOfCollisionTest ( deColliderCollisionTest collisionTest) const

Index of post physics collision test or -1 if not found.

Referenced by GetConstraintCount().

◆ IndexOfConstraint()

int deCollider::IndexOfConstraint ( deColliderConstraint constraint) const

Index of constraint or -1 if absent.

Referenced by GetConstraintCount().

◆ NotifyAttachmentChanged()

void deCollider::NotifyAttachmentChanged ( int  index)

Notify peers attachment changed.

You have to call this explicitly if you changed attachments.

Referenced by GetAttachmentCount().

◆ NotifyCollisionTestChanged()

void deCollider::NotifyCollisionTestChanged ( int  index)

Notify peers a post physics collision test changed.

You have to call this explicitly if you changed post physics collision tests.

Exceptions
deeInvalidParamindex is less than 0 or greater than or equal to GetCollisionTestCount().

Referenced by GetConstraintCount().

◆ NotifyCollisionTestEnableChanged()

void deCollider::NotifyCollisionTestEnableChanged ( int  index)

Notify peers a post physics collision test enabled or disabled.

You have to call this explicitly if you changed post physics collision tests enabled state.

Exceptions
deeInvalidParamindex is less than 0 or greater than or equal to GetCollisionTestCount().

Referenced by GetConstraintCount().

◆ NotifyConstraintChanged()

void deCollider::NotifyConstraintChanged ( int  index)

Notify peers constraint has changed.

You have to call this explicitly if you changed something on an constraint.

Referenced by GetConstraintCount().

◆ pNotifyBoneAngularVelocityChanged()

void deCollider::pNotifyBoneAngularVelocityChanged ( int  index)

Referenced by GetLLWorldNext().

◆ pNotifyBoneDynamicChanged()

void deCollider::pNotifyBoneDynamicChanged ( int  index)

Referenced by GetLLWorldNext().

◆ pNotifyBoneLinearVelocityChanged()

void deCollider::pNotifyBoneLinearVelocityChanged ( int  index)

Referenced by GetLLWorldNext().

◆ pNotifyBoneOrientationChanged()

void deCollider::pNotifyBoneOrientationChanged ( int  index)

Referenced by GetLLWorldNext().

◆ pNotifyBonePositionChanged()

void deCollider::pNotifyBonePositionChanged ( int  index)

Referenced by GetLLWorldNext().

◆ pNotifyBonePropertiesChanged()

void deCollider::pNotifyBonePropertiesChanged ( int  index)

Referenced by GetLLWorldNext().

◆ pNotifyCollisionVolumeChanged()

void deCollider::pNotifyCollisionVolumeChanged ( )
protected

Referenced by GetLLWorldNext().

◆ pNotifyComponentChanged()

void deCollider::pNotifyComponentChanged ( )
protected

Referenced by GetLLWorldNext().

◆ pNotifyRigChanged()

void deCollider::pNotifyRigChanged ( )
protected

Referenced by GetLLWorldNext().

◆ PointInside()

bool deCollider::PointInside ( const decDVector point)

Test if a point is located inside the collider.

Referenced by GetConstraintCount().

◆ RayHits()

void deCollider::RayHits ( const decDVector rayOrigin,
const decVector rayDirection,
deBaseScriptingCollider listener 
)

Test ray for collision with the collider.

For each collision deBaseScriptingCollider::CollisionResponse() is called. To stop testing set deCollisionInfo::SetStopTesting() to true. The distance parameter in the collision response represents the actual distance to the ray origin along the ray direction.

Referenced by GetConstraintCount().

◆ RemoveAllAttachments()

void deCollider::RemoveAllAttachments ( )

Remove all attachments.

Referenced by GetAttachmentCount().

◆ RemoveAllCollisionTests()

void deCollider::RemoveAllCollisionTests ( )

Remove all post physics collision tests.

Referenced by GetConstraintCount().

◆ RemoveAllConstraints()

void deCollider::RemoveAllConstraints ( )

Remove all constraints.

Referenced by GetConstraintCount().

◆ RemoveAllIgnoreColliders()

void deCollider::RemoveAllIgnoreColliders ( )

Remove all colliders to ignore.

Referenced by GetConstraintCount().

◆ RemoveAttachment()

void deCollider::RemoveAttachment ( deColliderAttachment attachment)

Remove attachment.

Exceptions
deeInvalidParamattachment is absent.

Referenced by GetAttachmentCount().

◆ RemoveCollisionTest()

void deCollider::RemoveCollisionTest ( deColliderCollisionTest collisionTest)

Remove post physics collision test.

Exceptions
deeInvalidParamcollisionTest is absent.

Referenced by GetConstraintCount().

◆ RemoveConstraint()

void deCollider::RemoveConstraint ( deColliderConstraint constraint)

Remove constraint.

Exceptions
deeInvalidParamconstraint is absent.

Referenced by GetConstraintCount().

◆ RemoveIgnoreCollider()

void deCollider::RemoveIgnoreCollider ( deCollider collider)

Remove collider to ignore.

Exceptions
deeInvalidParamcollider is absent.

Referenced by GetConstraintCount().

◆ SetAngularVelocity()

void deCollider::SetAngularVelocity ( const decVector angVelo)

Set angular velocity in degree/s.

Referenced by GetAngularVelocity().

◆ SetCollisionFilter()

void deCollider::SetCollisionFilter ( const decCollisionFilter filter)

Set collision filter.

Referenced by GetCollisionFilter().

◆ SetEnabled()

void deCollider::SetEnabled ( bool  enabled)

Set if collider is enabled.

Only enabled colliders take part in collision detection and response. Disabled colliders though still update attachments and can be used in manual collision detection.

Referenced by GetEnabled().

◆ SetForceFieldDirect()

void deCollider::SetForceFieldDirect ( float  factor)

Set factor for direct type force fields.

Referenced by GetForceFieldDirect().

◆ SetForceFieldMass()

void deCollider::SetForceFieldMass ( float  factor)

Set factor for mass type force fields.

Referenced by GetForceFieldMass().

◆ SetForceFieldSpeed()

void deCollider::SetForceFieldSpeed ( float  factor)

Set factor for speed type force fields.

Referenced by GetForceFieldSpeed().

◆ SetForceFieldSurface()

void deCollider::SetForceFieldSurface ( float  factor)

Set factor for surface type force fields.

Referenced by GetForceFieldSurface().

◆ SetGravity()

void deCollider::SetGravity ( const decVector gravity)

Set gravity in m/s^2.

Referenced by GetGravity().

◆ SetLinearVelocity()

void deCollider::SetLinearVelocity ( const decVector linVelo)

Set linear velocity in m/s.

Referenced by GetLinearVelocity().

◆ SetLLWorldNext()

void deCollider::SetLLWorldNext ( deCollider collider)

Set next collider in the parent world linked list.

Referenced by GetLLWorldNext().

◆ SetLLWorldPrev()

void deCollider::SetLLWorldPrev ( deCollider collider)

Set next collider in the parent world linked list.

Referenced by GetLLWorldPrev().

◆ SetMass()

void deCollider::SetMass ( float  mass)

Set mass in kg.

Referenced by GetMass().

◆ SetOrientation()

void deCollider::SetOrientation ( const decQuaternion orientation)

Set orientation.

Referenced by GetOrientation().

◆ SetParentWorld()

void deCollider::SetParentWorld ( deWorld world)

Set parent world or NULL.

Referenced by GetParentWorld().

◆ SetPhysicsCollider()

void deCollider::SetPhysicsCollider ( deBasePhysicsCollider phyCollider)

Set physics system peer.

Referenced by GetPhysicsCollider().

◆ SetPosition()

void deCollider::SetPosition ( const decDVector position)

Set central mass point position.

Referenced by GetPosition().

◆ SetResponseType()

void deCollider::SetResponseType ( eResponseType  responseType)

Set Collision response type.

Referenced by GetResponseType().

◆ SetScale()

void deCollider::SetScale ( const decVector scale)

Set scale.

For deColliderComponent the scaling is used from the set deComponent in the first place. The collider scaling is applied on top of it. Hence if you use deColliderComponent with scaled components you do not have to set the scaling on the deColliderComponent. For deColliderVolume and deColliderRig using scaling is required.

Referenced by GetScale().

◆ SetScriptingCollider()

void deCollider::SetScriptingCollider ( deBaseScriptingCollider scrCollider)

Set scripting system peer.

Referenced by GetScriptingCollider().

◆ SetUseLocalGravity()

void deCollider::SetUseLocalGravity ( bool  useLocalGravity)

Set if local gravity is used instead of the world gravity.

Referenced by GetUseLocalGravity().

◆ Visit()

virtual void deCollider::Visit ( deColliderVisitor visitor)
virtual

Visit collider.

Reimplemented in deColliderRig, deColliderComponent, and deColliderVolume.

Referenced by GetScriptingCollider().


The documentation for this class was generated from the following file: