Drag[en]gine Game Engine 1.15
deColliderCollisionTest Class Reference

Collider collision test. More...

#include <deColliderCollisionTest.h>

Inheritance diagram for deColliderCollisionTest:
deObject

Public Types

typedef deTObjectReference< deColliderCollisionTestRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
deTouchSensorGetTouchSensor () const
 Touch sensor to use for testing or NULL to use the parent collider world. More...
 
void SetTouchSensor (deTouchSensor *touchSensor)
 Set touch sensor to use for testing or NULL to use the parent collider world. More...
 
deColliderGetCollider () const
 Collider or NULL to test using a ray. More...
 
void SetCollider (deCollider *collider)
 Set collider or NULL to test using a ray. More...
 
const decCollisionFilterGetCollisionFilter () const
 Collision filter. More...
 
void SetCollisionFilter (const decCollisionFilter &filter)
 Set collision filter. More...
 
deComponentGetComponent () const
 Component to use to retrieve bone position from or NULL if not used. More...
 
void SetComponent (deComponent *component)
 Set component to use to retrieve bone position from or NULL if not used. More...
 
const decStringGetBone () const
 Bone to apply origin to for testing or empty string to use parent collider position. More...
 
void SetBone (const char *name)
 Set bone to apply origin to for testing or empty string to use parent collider position. More...
 
const decVectorGetOrigin () const
 Cast origin. More...
 
void SetOrigin (const decVector &origin)
 Set cast origin. More...
 
const decVectorGetDirection () const
 Cast direction. More...
 
void SetDirection (const decVector &direction)
 Set cast direction. More...
 
bool GetLocalDirection () const
 Local direction. More...
 
void SetLocalDirection (bool localDirection)
 Set if direction is local. More...
 
bool GetEnabled () const
 Collision test is enabled. More...
 
void SetEnabled (bool enabled)
 Set if collision test is enabled. More...
 
int GetCollisionInfoCount () const
 Number of collision information. More...
 
deCollisionInfoGetCollisionInfoAt (int index) const
 Get collision information at index. More...
 
void AddCollisionInfo (deCollisionInfo *info)
 Add collision information. More...
 
void RemoveAllCollisionInfo ()
 Remove all collision information. More...
 
const decDVectorGetTestOrigin () const
 Test origin used by physics module. More...
 
void SetTestOrigin (const decDVector &testOrigin)
 Set test origin used by physics module. More...
 
const decDVectorGetTestDirection () const
 Test direction used by physics module. More...
 
void SetTestDirection (const decDVector &testDirection)
 Set test direction used by physics module. More...
 
Operator
deColliderCollisionTestoperator= (const deColliderCollisionTest &collisionTest)
 Copy a collider collision test to this collider collision test. 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...
 

Constructors and Destructors

 deColliderCollisionTest ()
 Create collider collision test. More...
 
 deColliderCollisionTest (const deColliderCollisionTest &collisionTester)
 Create copy of a collider collision test. More...
 
virtual ~deColliderCollisionTest ()
 Clean up collider collision test. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Collider collision test.

The collision information instance is created by the constructor. It is not changed for the lifetime of the object. See GetHasCollision() to determine if the collision information object contains valid collision information.

If ray testing is used (collider is NULL) all CanHitCollider calls are send to the parent collider CanHitCollider call.

The parent collider is ignored during collision tests. It is therefore not required to explicitly exclude it from CanHitCollider call.

Member Typedef Documentation

◆ Ref

Constructor & Destructor Documentation

◆ deColliderCollisionTest() [1/2]

deColliderCollisionTest::deColliderCollisionTest ( )

Create collider collision test.

◆ deColliderCollisionTest() [2/2]

deColliderCollisionTest::deColliderCollisionTest ( const deColliderCollisionTest collisionTester)

Create copy of a collider collision test.

◆ ~deColliderCollisionTest()

virtual deColliderCollisionTest::~deColliderCollisionTest ( )
protectedvirtual

Clean up collider collision test.

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

◆ AddCollisionInfo()

void deColliderCollisionTest::AddCollisionInfo ( deCollisionInfo info)

Add collision information.

◆ GetBone()

const decString & deColliderCollisionTest::GetBone ( ) const
inline

Bone to apply origin to for testing or empty string to use parent collider position.

◆ GetCollider()

deCollider * deColliderCollisionTest::GetCollider ( ) const
inline

Collider or NULL to test using a ray.

◆ GetCollisionFilter()

const decCollisionFilter & deColliderCollisionTest::GetCollisionFilter ( ) const
inline

Collision filter.

◆ GetCollisionInfoAt()

deCollisionInfo * deColliderCollisionTest::GetCollisionInfoAt ( int  index) const

Get collision information at index.

Warning
Do not change the content of this object. It is potentially shared.

◆ GetCollisionInfoCount()

int deColliderCollisionTest::GetCollisionInfoCount ( ) const

Number of collision information.

◆ GetComponent()

deComponent * deColliderCollisionTest::GetComponent ( ) const
inline

Component to use to retrieve bone position from or NULL if not used.

◆ GetDirection()

const decVector & deColliderCollisionTest::GetDirection ( ) const
inline

Cast direction.

◆ GetEnabled()

bool deColliderCollisionTest::GetEnabled ( ) const
inline

Collision test is enabled.

◆ GetLocalDirection()

bool deColliderCollisionTest::GetLocalDirection ( ) const
inline

Local direction.

◆ GetOrigin()

const decVector & deColliderCollisionTest::GetOrigin ( ) const
inline

Cast origin.

◆ GetTestDirection()

const decDVector & deColliderCollisionTest::GetTestDirection ( ) const
inline

Test direction used by physics module.

◆ GetTestOrigin()

const decDVector & deColliderCollisionTest::GetTestOrigin ( ) const
inline

Test origin used by physics module.

◆ GetTouchSensor()

deTouchSensor * deColliderCollisionTest::GetTouchSensor ( ) const
inline

Touch sensor to use for testing or NULL to use the parent collider world.

◆ operator=()

deColliderCollisionTest & deColliderCollisionTest::operator= ( const deColliderCollisionTest collisionTest)

Copy a collider collision test to this collider collision test.

◆ RemoveAllCollisionInfo()

void deColliderCollisionTest::RemoveAllCollisionInfo ( )

Remove all collision information.

◆ SetBone()

void deColliderCollisionTest::SetBone ( const char *  name)

Set bone to apply origin to for testing or empty string to use parent collider position.

◆ SetCollider()

void deColliderCollisionTest::SetCollider ( deCollider collider)

Set collider or NULL to test using a ray.

◆ SetCollisionFilter()

void deColliderCollisionTest::SetCollisionFilter ( const decCollisionFilter filter)

Set collision filter.

◆ SetComponent()

void deColliderCollisionTest::SetComponent ( deComponent component)

Set component to use to retrieve bone position from or NULL if not used.

◆ SetDirection()

void deColliderCollisionTest::SetDirection ( const decVector direction)

Set cast direction.

◆ SetEnabled()

void deColliderCollisionTest::SetEnabled ( bool  enabled)

Set if collision test is enabled.

◆ SetLocalDirection()

void deColliderCollisionTest::SetLocalDirection ( bool  localDirection)

Set if direction is local.

◆ SetOrigin()

void deColliderCollisionTest::SetOrigin ( const decVector origin)

Set cast origin.

◆ SetTestDirection()

void deColliderCollisionTest::SetTestDirection ( const decDVector testDirection)

Set test direction used by physics module.

◆ SetTestOrigin()

void deColliderCollisionTest::SetTestOrigin ( const decDVector testOrigin)

Set test origin used by physics module.

◆ SetTouchSensor()

void deColliderCollisionTest::SetTouchSensor ( deTouchSensor touchSensor)

Set touch sensor to use for testing or NULL to use the parent collider world.


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