CEL

Public API Reference

iPcMover Struct Reference

This is a mover property class. More...

#include <propclass/mover.h>

Inheritance diagram for iPcMover:

List of all members.

Public Member Functions

virtual const csVector3GetPosition () const =0
 Get the end position that we want to move to.
virtual iSectorGetSector () const =0
 Get the end sector that we want to move to.
virtual float GetSqRadius () const =0
 Get the current squared radius.
virtual const csVector3GetUp () const =0
virtual void Interrupt ()=0
 Interrupt a movement.
virtual bool IsMoving () const =0
 Return true if currently moving.
virtual bool IsSmoothMovement () const =0
 Return true if the rotations used during the movement will be smooth and false if they will be sudden.
virtual bool MoveTo (iSector *sector, const csVector3 &position, float sqradius, bool checklos=false)=0
 Move to the specified position.
virtual void SetSmoothMovement (bool smooth)=0
 Define if the movement will have sudden of smooth turns.
virtual bool Start (iSector *sector, const csVector3 &position, const csVector3 &up, float sqradius)=0
 Start moving.

Detailed Description

This is a mover property class.

It works closely with pclinmove and pcactormove in order to move an object from one position to another while checking collision detection along the way.

This property class can send out the following messages:

This property class supports the following actions (add prefix 'cel.mover.action.' if you want to access this action through a message):

This property class supports the following properties:

Definition at line 54 of file mover.h.


Member Function Documentation

virtual const csVector3& iPcMover::GetPosition (  )  const [pure virtual]

Get the end position that we want to move to.

virtual iSector* iPcMover::GetSector (  )  const [pure virtual]

Get the end sector that we want to move to.

virtual float iPcMover::GetSqRadius (  )  const [pure virtual]

Get the current squared radius.

virtual const csVector3& iPcMover::GetUp (  )  const [pure virtual]
Deprecated:
Handling of up vector by pcmover is deprecated.
virtual void iPcMover::Interrupt (  )  [pure virtual]

Interrupt a movement.

The behaviour will get a 'pcmover_interrupted' message if the mover was really moving. Otherwise nothing happens.

virtual bool iPcMover::IsMoving (  )  const [pure virtual]

Return true if currently moving.

virtual bool iPcMover::IsSmoothMovement (  )  const [pure virtual]

Return true if the rotations used during the movement will be smooth and false if they will be sudden.

virtual bool iPcMover::MoveTo ( iSector sector,
const csVector3 position,
float  sqradius,
bool  checklos = false 
) [pure virtual]

Move to the specified position.

When you call this function this property class will attempt to move the linmove to the correct position. If it fails the behaviour will get a 'pcmover_stuck' message. Otherwise it will get a 'pcmover_arrived' message. If checklos parameter is true a line of sight test will be made in advance, and if this function detects that line of sight is blocked then the behaviour will get a 'pcmover_impossible' message and this function will return false then. If this property class was already controlling a movement then that movement will be interrupted (possibly giving a pcmover_interrupted message).

Parameters:
sector is the desired sector to move to.
position is the desired position to move to.
sqradius if the linmove ends up within the given squared radius of the desired position the movement will stop and be considered sucessful.
checklos whether to check line of sight to destination on movement start.
virtual void iPcMover::SetSmoothMovement ( bool  smooth  )  [pure virtual]

Define if the movement will have sudden of smooth turns.

Having sudden turns will ensure the movement is done in straight lines.

virtual bool iPcMover::Start ( iSector sector,
const csVector3 position,
const csVector3 up,
float  sqradius 
) [pure virtual]

Start moving.

When you call this function this property class will attempt to move the linmove to the correct position. If it fails the behaviour will get a 'pcmover_stuck' message. Otherwise it will get a 'pcmover_arrived' message. If this function detects that it is completely impossible to move there in advance then the behaviour will get a 'pcmover_impossible' message and this function will return false then. If this property class was already controlling a movement then that movement will be interrupted (possibly giving a pcmover_interrupted message).

Parameters:
sector is the desired sector to move to.
position is the desired position to move to.
up is the up vector (used for rotation).
sqradius if the linmove ends up within the given squared radius of the desired position the movement will stop and be considered sucessful.
Deprecated:
Use MoveTo instead.

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

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1