CrystalSpace

Public API Reference

CS::Collisions::iCollisionGroup Struct Reference

Collision groups allow to filter the collisions occuring between the objects in the system. More...

#include <ivaria/collisions.h>

Inheritance diagram for CS::Collisions::iCollisionGroup:

List of all members.

Public Member Functions

virtual bool GetCollisionEnabled (iCollisionGroup *other)=0
 Get whether or not the objects from this group will collide with the objects of the group other.
virtual const char * GetName () const =0
 Get the name of this collision group.
virtual void SetCollisionEnabled (iCollisionGroup *other, bool enabled)=0
 Set whether or not the objects from this group will collide with the objects of the group other.

Detailed Description

Collision groups allow to filter the collisions occuring between the objects in the system.

Each iCollisionObject is associated with a collision group, and the user can define whether or not the objects from one group will collide with the objects of another.

There is a maximum of 16 collision groups that can be created in total, and those groups cannot (currently) be removed once created. You should therefore be careful when defining and managing your set of collision groups.

The collision system will always create one default collision group named "Default". This collision group is associated by default to all collision objects without any valid group.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

Main users of this interface:

Definition at line 208 of file collisions.h.


Member Function Documentation

virtual bool CS::Collisions::iCollisionGroup::GetCollisionEnabled ( iCollisionGroup other  )  [pure virtual]

Get whether or not the objects from this group will collide with the objects of the group other.

virtual const char* CS::Collisions::iCollisionGroup::GetName (  )  const [pure virtual]

Get the name of this collision group.

virtual void CS::Collisions::iCollisionGroup::SetCollisionEnabled ( iCollisionGroup other,
bool  enabled 
) [pure virtual]

Set whether or not the objects from this group will collide with the objects of the group other.

By default, all groups will collide with all others.

Note that it is valid to use the same group as the parameter and the one being called. This defines whether or not the objects of the group will collide together.

Parameters:
other The other group that will or not collide with this one.
enabled Whether or not the collisions are enabled between the two groups.

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

Generated for Crystal Space 2.1 by doxygen 1.6.1