CrystalSpace

Public API Reference

CS::Collisions::iCollisionActorFactory Struct Reference

A iCollisionActor is dedicated to actor motion controlling, and can be used to manage eg a Player or a Non-Player Character object. More...

#include <ivaria/collisions.h>

Inheritance diagram for CS::Collisions::iCollisionActorFactory:

List of all members.

Public Member Functions

virtual csPtr< iCollisionActorCreateCollisionActor ()=0
 Create an instance of a collision actor.
virtual float GetJumpSpeed () const =0
 Get the jump speed.
virtual float GetMaximumSlope () const =0
 Get the maximum slope, in radians.
virtual float GetStepHeight () const =0
 Get the max vertical threshold that this actor can step over.
virtual void SetJumpSpeed (float s)=0
 Set the jump speed.
virtual void SetMaximumSlope (float slope)=0
 The maximum slope determines the maximum angle that the actor can walk up.
virtual void SetStepHeight (float h)=0
 Set the max vertical threshold that this actor can step over.

Detailed Description

A iCollisionActor is dedicated to actor motion controlling, and can be used to manage eg a Player or a Non-Player Character object.

Although most physical bodies cannot be moved freely in the virtual environment for stability reasons, actors can be used to move objects around the environnement, while keeping reactions to the collisions that are generated and handling gravity. They will also interact with the dynamic objects that are collided by pushing away the objects that are hit.

The actual collider that represents the actor always floats <step height>=""> above the ground to be able to move smoothly over terrain and small obstacles.

Remarks:
The collider of iCollisionActor must be a convex shape, for example a capsule or a sphere.

Main ways to create instances implementing this interface:

Main users of this interface:

Definition at line 451 of file collisions.h.


Member Function Documentation

virtual csPtr<iCollisionActor> CS::Collisions::iCollisionActorFactory::CreateCollisionActor (  )  [pure virtual]

Create an instance of a collision actor.

virtual float CS::Collisions::iCollisionActorFactory::GetJumpSpeed (  )  const [pure virtual]

Get the jump speed.

virtual float CS::Collisions::iCollisionActorFactory::GetMaximumSlope (  )  const [pure virtual]

Get the maximum slope, in radians.

The maximum slope determines the maximum angle that the actor can walk up.

virtual float CS::Collisions::iCollisionActorFactory::GetStepHeight (  )  const [pure virtual]

Get the max vertical threshold that this actor can step over.

virtual void CS::Collisions::iCollisionActorFactory::SetJumpSpeed ( float  s  )  [pure virtual]

Set the jump speed.

virtual void CS::Collisions::iCollisionActorFactory::SetMaximumSlope ( float  slope  )  [pure virtual]

The maximum slope determines the maximum angle that the actor can walk up.

The slope angle is measured in radians. The default value is 0.7854f (45 degree).

virtual void CS::Collisions::iCollisionActorFactory::SetStepHeight ( float  h  )  [pure virtual]

Set the max vertical threshold that this actor can step over.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1