CrystalSpace

Public API Reference

CS::Collisions::iActor Struct Reference

A iActor is the common abstract interface for actor motion controlling, and can be used to create eg a player or a Non-Player Character model. More...

#include <ivaria/collisions.h>

Inheritance diagram for CS::Collisions::iActor:

List of all members.

Public Member Functions

virtual float GetAirControlFactor () const =0
 Determines how much the actor can control movement when free falling.
virtual bool GetGravityEnabled () const =0
 Whether or not this object is subject to the constant gravitational forces of its sector.
virtual float GetJumpSpeed () const =0
 Get the jump speed.
virtual float GetStepHeight () const =0
 Get the maximum vertical threshold that this actor can step over.
virtual float GetWalkSpeed () const =0
 Get the walk speed.
virtual bool IsFreeFalling () const =0
 Whether the actor is not on ground and gravity applies.
virtual bool IsOnGround () const =0
 Whether 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 SetAirControlFactor (float f)=0
 Determines how much the actor can control movement when free falling.
virtual void SetGravityEnabled (bool g)=0
 Whether or not this object is subject to the constant gravitational forces of its sector.
virtual void SetJumpSpeed (float s)=0
 Set the jump speed.
virtual void SetStepHeight (float h)=0
 Set the maximum vertical threshold that this actor can step over.
virtual void SetWalkSpeed (float s)=0
 Set the walk speed.
virtual void StopMoving ()=0
 Stops any player-controlled movement.
virtual void Walk (csVector3 dir)=0
 Start walking in the given direction with walk speed.
virtual void WalkHorizontal (csVector2 dir)=0
 Start walking in the given horizontal direction with walk speed.

Detailed Description

A iActor is the common abstract interface for actor motion controlling, and can be used to create eg a player or a Non-Player Character model.

Actors can be used to move objects around the environnement, while keeping reactions to the collisions that are generated and handling gravity.

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 458 of file collisions.h.


Member Function Documentation

virtual float CS::Collisions::iActor::GetAirControlFactor (  )  const [pure virtual]

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

virtual bool CS::Collisions::iActor::GetGravityEnabled (  )  const [pure virtual]

Whether or not this object is subject to the constant gravitational forces of its sector.

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

Get the jump speed.

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

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

virtual float CS::Collisions::iActor::GetWalkSpeed (  )  const [pure virtual]

Get the walk speed.

virtual bool CS::Collisions::iActor::IsFreeFalling (  )  const [pure virtual]

Whether the actor is not on ground and gravity applies.

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

Whether this actor touches the ground.

virtual void CS::Collisions::iActor::Jump (  )  [pure virtual]

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

virtual void CS::Collisions::iActor::SetAirControlFactor ( float  f  )  [pure virtual]

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

virtual void CS::Collisions::iActor::SetGravityEnabled ( bool  g  )  [pure virtual]

Whether or not this object is subject to the constant gravitational forces of its sector.

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

Set the jump speed.

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

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

virtual void CS::Collisions::iActor::SetWalkSpeed ( float  s  )  [pure virtual]

Set the walk speed.

virtual void CS::Collisions::iActor::StopMoving (  )  [pure virtual]

Stops any player-controlled movement.

virtual void CS::Collisions::iActor::Walk ( csVector3  dir  )  [pure virtual]

Start walking in the given direction with walk speed.

Sets linear velocity. Takes air control into consideration. Adds the current vertical velocity to the given vertical velocity.

virtual void CS::Collisions::iActor::WalkHorizontal ( csVector2  dir  )  [pure virtual]

Start walking in the given horizontal direction with walk speed.

Sets linear velocity. Takes air control into consideration. Does not influence vertical movement.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1