CS::Collisions::iCollisionActor 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::iCollisionActor:

List of all members.

Public Member Functions

virtual float GetJumpSpeed () const =0
Get the jump speed of this actor.
virtual float GetMaximumSlope () const =0
Get the maximum slope, in radians.
virtual float GetStepHeight () const =0
Get the maximum vertical threshold that this actor can step over.
virtual bool IsOnGround () const =0
Return whether or not this actor touches the ground.
virtual void Jump ()=0
Applies an upward impulse to this actor, and an inverse impulse to objects beneath.
virtual void Rotate (float yaw)=0
Determines how much the actor can control movement when free falling.
virtual void SetJumpSpeed (float s)=0
Set the jump speed of this actor.
virtual void SetMaximumSlope (float slope)=0
The maximum slope determines the maximum angle that the actor can walk up.
virtual void SetSpeed (const csVector3 &speed)=0
Set the current motion speed of this actor.
virtual void SetStepHeight (float h)=0
Set the maximum 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 508 of file collisions.h.

Member Function Documentation

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

Get the jump speed of this actor.

 virtual float CS::Collisions::iCollisionActor::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::iCollisionActor::GetStepHeight ( ) const` [pure virtual]`

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

 virtual bool CS::Collisions::iCollisionActor::IsOnGround ( ) const` [pure virtual]`

Return whether or not this actor touches the ground.

 virtual void CS::Collisions::iCollisionActor::Jump ( ) ` [pure virtual]`

Applies an upward impulse to this actor, and an inverse impulse to objects beneath.

 virtual void CS::Collisions::iCollisionActor::Rotate ( float yaw ) ` [pure virtual]`

Determines how much the actor can control movement when free falling.

Determines how much the actor can control movement when free falling Apply the given delta rotation on this actor.

Parameters:
 yaw Is the delta angle to be applied around the Y axis
 virtual void CS::Collisions::iCollisionActor::SetJumpSpeed ( float s ) ` [pure virtual]`

Set the jump speed of this actor.

 virtual void CS::Collisions::iCollisionActor::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::iCollisionActor::SetSpeed ( const csVector3 & speed ) ` [pure virtual]`

Set the current motion speed of this actor.

Parameters:
 speed Relative movement vector in object space of the model (i.e. 0,0,1 will move the model forward).
 virtual void CS::Collisions::iCollisionActor::SetStepHeight ( float h ) ` [pure virtual]`

Set the maximum 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