CrystalSpace

Public API Reference

CS::Collisions::iCollisionSystem Struct Reference

This is the Collision plug-in. More...

#include <ivaria/collisions.h>

Inheritance diagram for CS::Collisions::iCollisionSystem:

List of all members.

Public Member Functions

Colliders



virtual csPtr< iColliderCreateCollider ()=0
 Create an empty collider (it does not have a root shape, but only potentially children).
virtual csPtr< iColliderBoxCreateColliderBox (const csVector3 &size)=0
 Create a box collider.
virtual csPtr< iColliderCapsuleCreateColliderCapsule (float length, float radius)=0
 Create a capsule collider.
virtual csPtr
< iColliderConcaveMesh
CreateColliderConcaveMesh (iTriangleMesh *mesh, bool dynamicEnabled=false)=0
 Create a concave mesh collider.
virtual csPtr
< iColliderConcaveMeshScaled
CreateColliderConcaveMeshScaled (iColliderConcaveMesh *collider, const csVector3 &scale)=0
 Create a static scaled concave mesh collider.
virtual csPtr< iColliderConeCreateColliderCone (float length, float radius)=0
 Create a cone collider.
virtual csPtr
< iColliderConvexMesh
CreateColliderConvexMesh (iTriangleMesh *mesh)=0
 Create a convex mesh collider.
virtual csPtr< iColliderCylinderCreateColliderCylinder (float length, float radius)=0
 Create a cylinder collider, oriented along the y-axis.
virtual csPtr< iColliderPlaneCreateColliderPlane (const csPlane3 &plane)=0
 Create a static plane collider.
virtual csPtr< iColliderSphereCreateColliderSphere (float radius)=0
 Create a sphere collider.
Collision object factories



virtual csPtr
< iCollisionActorFactory
CreateCollisionActorFactory (CS::Collisions::iCollider *collider=nullptr)=0
 Create a iCollisionActorFactory.
virtual csPtr
< iCollisionObjectFactory
CreateCollisionObjectFactory (CS::Collisions::iCollider *collider=nullptr)=0
 Create a iCollisionObjectFactory.
virtual csPtr
< iCollisionTerrainFactory
CreateCollisionTerrainFactory (iTerrainFactory *terrain)=0
 Create a iCollisionTerrainFactory.
virtual csPtr
< iCollisionObjectFactory
CreateGhostCollisionObjectFactory (CS::Collisions::iCollider *collider=nullptr)=0
 Create a iCollisionObjectFactory of type CS::Collisions::COLLISION_OBJECT_GHOST.
Collision groups



virtual iCollisionGroupCreateCollisionGroup (const char *name)=0
 Create a collision group of the given name.
virtual iCollisionGroupFindCollisionGroup (const char *name) const =0
 Find the collision group of the given name, or return nullptr if it has not been found.
virtual iCollisionGroupGetCollisionGroup (size_t index) const =0
 Get a collision group by its index.
virtual size_t GetCollisionGroupCount () const =0
 Get the count of collision groups in this system.
Collision sectors



virtual iCollisionSectorCreateCollisionSector (iSector *sector=nullptr)=0
 Create a new collision sector and add it to the system's set.
virtual void DeleteCollisionSector (iCollisionSector *sector)=0
 Delete the given collision sector.
virtual void DeleteCollisionSectors ()=0
 Delete all collision sectors.
virtual iCollisionSectorFindCollisionSector (const char *name)=0
 Find a collision sector by name.
virtual iCollisionSectorFindCollisionSector (const iSector *sceneSector)=0
 Find a collision sector by its associated iSector, or nullptr if it has not been found.
virtual iCollisionSectorGetCollisionSector (size_t index)=0
 Get a collision sector by index.
virtual size_t GetCollisionSectorCount () const =0
 Return the amount of sectors in this system.
General methods



virtual void DeleteAll ()=0
 Reset the entire system and delete all sectors and collision groups.
virtual float GetSimulationSpeed () const =0
 Get the speed of the simulation, that is the time ratio that is applied when updating the motion of the objects.
virtual
CS::Physics::iPhysicalSystem
QueryPhysicalSystem ()=0
 Return the physical system pointer if this interface is also implemented by the system, or nullptr otherwise.
virtual void SetSimulationSpeed (float speed)=0
 Set the speed of the simulation, that is the time ratio that is applied when updating the motion of the objects.

Detailed Description

This is the Collision plug-in.

This plugin is a factory for creating iCollider, iCollisionObject, iCollisionSector and iCollisionActor entities.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

See also:
CS::Physics::iPhysicalSystem

Definition at line 710 of file collisions.h.


Member Function Documentation

virtual csPtr<iCollider> CS::Collisions::iCollisionSystem::CreateCollider (  )  [pure virtual]

Create an empty collider (it does not have a root shape, but only potentially children).

The collider type of this object is CS::Collisions::COLLIDER_COMPOUND.

virtual csPtr<iColliderBox> CS::Collisions::iCollisionSystem::CreateColliderBox ( const csVector3 size  )  [pure virtual]

Create a box collider.

virtual csPtr<iColliderCapsule> CS::Collisions::iCollisionSystem::CreateColliderCapsule ( float  length,
float  radius 
) [pure virtual]

Create a capsule collider.

virtual csPtr<iColliderConcaveMesh> CS::Collisions::iCollisionSystem::CreateColliderConcaveMesh ( iTriangleMesh mesh,
bool  dynamicEnabled = false 
) [pure virtual]

Create a concave mesh collider.

Parameters:
mesh The triangle mesh defining the geometry of the collider.
dynamicEnabled Whether or not this collider can be used for dynamic concave rigid bodies. The simulation of dynamic concave objects must have been enabled through iPhysicalSystem::SetDynamicConcaveEnabled(), otherwise this parameter has no effect.
virtual csPtr<iColliderConcaveMeshScaled> CS::Collisions::iCollisionSystem::CreateColliderConcaveMeshScaled ( iColliderConcaveMesh collider,
const csVector3 scale 
) [pure virtual]

Create a static scaled concave mesh collider.

This collider is quite memory efficient since it re-uses the data defined by an original CS::Collider::iColliderConcaveMesh (which remains untouched).

This collider is always static and cannot be toggled dynamic.

Parameters:
collider The original collider that will be scaled by this collider.
scale The scale to apply on the original collider.
virtual csPtr<iColliderCone> CS::Collisions::iCollisionSystem::CreateColliderCone ( float  length,
float  radius 
) [pure virtual]

Create a cone collider.

virtual csPtr<iColliderConvexMesh> CS::Collisions::iCollisionSystem::CreateColliderConvexMesh ( iTriangleMesh mesh  )  [pure virtual]

Create a convex mesh collider.

Parameters:
mesh The triangle mesh defining the geometry of the collider.
virtual csPtr<iColliderCylinder> CS::Collisions::iCollisionSystem::CreateColliderCylinder ( float  length,
float  radius 
) [pure virtual]

Create a cylinder collider, oriented along the y-axis.

virtual csPtr<iColliderPlane> CS::Collisions::iCollisionSystem::CreateColliderPlane ( const csPlane3 plane  )  [pure virtual]

Create a static plane collider.

virtual csPtr<iColliderSphere> CS::Collisions::iCollisionSystem::CreateColliderSphere ( float  radius  )  [pure virtual]

Create a sphere collider.

virtual csPtr<iCollisionActorFactory> CS::Collisions::iCollisionSystem::CreateCollisionActorFactory ( CS::Collisions::iCollider collider = nullptr  )  [pure virtual]
virtual iCollisionGroup* CS::Collisions::iCollisionSystem::CreateCollisionGroup ( const char *  name  )  [pure virtual]

Create a collision group of the given name.

Return nullptr if the group could not be created. If a group with the given name already exists, then return a reference to this group.

Warning:
You cannot create more than 16 collision groups in total.
Collision groups cannot be removed once created.
virtual csPtr<iCollisionObjectFactory> CS::Collisions::iCollisionSystem::CreateCollisionObjectFactory ( CS::Collisions::iCollider collider = nullptr  )  [pure virtual]
virtual iCollisionSector* CS::Collisions::iCollisionSystem::CreateCollisionSector ( iSector sector = nullptr  )  [pure virtual]

Create a new collision sector and add it to the system's set.

If sector is provided then it will first search if a previous collision sector associated to it is already available. No new collision sector would be created in this case, and the previous one would be returned instead.

virtual csPtr<iCollisionTerrainFactory> CS::Collisions::iCollisionSystem::CreateCollisionTerrainFactory ( iTerrainFactory terrain  )  [pure virtual]
virtual csPtr<iCollisionObjectFactory> CS::Collisions::iCollisionSystem::CreateGhostCollisionObjectFactory ( CS::Collisions::iCollider collider = nullptr  )  [pure virtual]
virtual void CS::Collisions::iCollisionSystem::DeleteAll (  )  [pure virtual]

Reset the entire system and delete all sectors and collision groups.

virtual void CS::Collisions::iCollisionSystem::DeleteCollisionSector ( iCollisionSector sector  )  [pure virtual]

Delete the given collision sector.

virtual void CS::Collisions::iCollisionSystem::DeleteCollisionSectors (  )  [pure virtual]

Delete all collision sectors.

virtual iCollisionGroup* CS::Collisions::iCollisionSystem::FindCollisionGroup ( const char *  name  )  const [pure virtual]

Find the collision group of the given name, or return nullptr if it has not been found.

virtual iCollisionSector* CS::Collisions::iCollisionSystem::FindCollisionSector ( const char *  name  )  [pure virtual]

Find a collision sector by name.

virtual iCollisionSector* CS::Collisions::iCollisionSystem::FindCollisionSector ( const iSector sceneSector  )  [pure virtual]

Find a collision sector by its associated iSector, or nullptr if it has not been found.

virtual iCollisionGroup* CS::Collisions::iCollisionSystem::GetCollisionGroup ( size_t  index  )  const [pure virtual]

Get a collision group by its index.

virtual size_t CS::Collisions::iCollisionSystem::GetCollisionGroupCount (  )  const [pure virtual]

Get the count of collision groups in this system.

virtual iCollisionSector* CS::Collisions::iCollisionSystem::GetCollisionSector ( size_t  index  )  [pure virtual]

Get a collision sector by index.

virtual size_t CS::Collisions::iCollisionSystem::GetCollisionSectorCount (  )  const [pure virtual]

Return the amount of sectors in this system.

virtual float CS::Collisions::iCollisionSystem::GetSimulationSpeed (  )  const [pure virtual]

Get the speed of the simulation, that is the time ratio that is applied when updating the motion of the objects.

virtual CS::Physics::iPhysicalSystem* CS::Collisions::iCollisionSystem::QueryPhysicalSystem (  )  [pure virtual]

Return the physical system pointer if this interface is also implemented by the system, or nullptr otherwise.

virtual void CS::Collisions::iCollisionSystem::SetSimulationSpeed ( float  speed  )  [pure virtual]

Set the speed of the simulation, that is the time ratio that is applied when updating the motion of the objects.

The default value is 1.0f.

If the speed is equal or lower than zero, then the simulation will not be updated anymore (unless you call manually the method CS::Physics::iPhysicalSystem::StepSimulation()).


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

Generated for Crystal Space 2.1 by doxygen 1.6.1