CrystalSpace

Public API Reference

CS::Collisions::CollisionHelper Class Reference

A class to help managing the colliders and physical models of the meshes and scenes. More...

#include <cstool/collisionhelper.h>

List of all members.

Public Member Functions

void DecomposeConcaveMesh (iMeshWrapper *mesh, CS::Collisions::iCollider *collider, CS::Collisions::iConvexDecomposer *decomposer) const
 Perform a convex decomposition on the given concave mesh wrapper and compound the resulting convex parts into the given collider.
void DecomposeConcaveMesh (iTriangleMesh *mesh, CS::Collisions::iCollider *collider, CS::Collisions::iConvexDecomposer *decomposer) const
 Perform a convex decomposition on the given concave triangle mesh and compound the resulting convex parts into the given collider.
iTriangleMeshFindCollisionMesh (iMeshFactoryWrapper *meshFactory) const
 Search for the collision iTriangleMesh of the given mesh factory.
iTriangleMeshFindCollisionMesh (iMeshWrapper *mesh) const
 Search for the collision iTriangleMesh of the given mesh.
bool Initialize (iObjectRegistry *objectRegistry, CS::Collisions::iCollisionSystem *collisionSystem=nullptr, CS::Collisions::iConvexDecomposer *decomposer=nullptr)
 Initialize this collision helper.
void InitializeCollisionObjects (iSector *sector, iMeshWrapper *mesh) const
 Recursively creates and adds all collision objects of the mesh and it's children to the collision system.
void InitializeCollisionObjects (iSector *sector, iCollection *collection=nullptr) const
 Creates and adds all collision objects of all meshes in the given sector to the collision system.
void InitializeCollisionObjects (iEngine *engine, iCollection *collection=nullptr) const
 Creates and adds all collision objects of all meshes in the given engine to the collision system.

Detailed Description

A class to help managing the colliders and physical models of the meshes and scenes.

Definition at line 63 of file collisionhelper.h.


Member Function Documentation

void CS::Collisions::CollisionHelper::DecomposeConcaveMesh ( iMeshWrapper mesh,
CS::Collisions::iCollider collider,
CS::Collisions::iConvexDecomposer decomposer 
) const

Perform a convex decomposition on the given concave mesh wrapper and compound the resulting convex parts into the given collider.

This is equivalent to a call to FindCollisionMesh() followed by a call to DecomposeConcaveMesh(iTriangleMesh*,CS::Collisions::iCollider*,CS::Collisions::iConvexDecomposer*).

void CS::Collisions::CollisionHelper::DecomposeConcaveMesh ( iTriangleMesh mesh,
CS::Collisions::iCollider collider,
CS::Collisions::iConvexDecomposer decomposer 
) const

Perform a convex decomposition on the given concave triangle mesh and compound the resulting convex parts into the given collider.

iTriangleMesh* CS::Collisions::CollisionHelper::FindCollisionMesh ( iMeshFactoryWrapper meshFactory  )  const

Search for the collision iTriangleMesh of the given mesh factory.

Return nullptr in case there are explicitely none.

iTriangleMesh* CS::Collisions::CollisionHelper::FindCollisionMesh ( iMeshWrapper mesh  )  const

Search for the collision iTriangleMesh of the given mesh.

Return nullptr in case there are explicitely none.

bool CS::Collisions::CollisionHelper::Initialize ( iObjectRegistry objectRegistry,
CS::Collisions::iCollisionSystem collisionSystem = nullptr,
CS::Collisions::iConvexDecomposer decomposer = nullptr 
)

Initialize this collision helper.

void CS::Collisions::CollisionHelper::InitializeCollisionObjects ( iSector sector,
iMeshWrapper mesh 
) const

Recursively creates and adds all collision objects of the mesh and it's children to the collision system.

void CS::Collisions::CollisionHelper::InitializeCollisionObjects ( iSector sector,
iCollection collection = nullptr 
) const

Creates and adds all collision objects of all meshes in the given sector to the collision system.

void CS::Collisions::CollisionHelper::InitializeCollisionObjects ( iEngine engine,
iCollection collection = nullptr 
) const

Creates and adds all collision objects of all meshes in the given engine to the collision system.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1