iPcMover Struct Reference
This is a mover property class. More...
#include <propclass/mover.h>
Public Member Functions | |
virtual bool | Start (iSector *sector, const csVector3 &position, const csVector3 &up, float movespeed, float rotatespeed, float sqradius)=0 |
Start moving. | |
virtual void | Interrupt ()=0 |
Interrupt a movement. | |
virtual iSector * | GetSector () const =0 |
Get the end sector that we want to move too. | |
virtual const csVector3 & | GetPosition () const =0 |
Get the end position that we want to move too. | |
virtual const csVector3 & | GetUp () const =0 |
Get the current up vector. | |
virtual float | GetMoveSpeed () const =0 |
Get the current movement speed. | |
virtual float | GetRotateSpeed () const =0 |
Get the current rotation speed. | |
virtual float | GetSqRadius () const =0 |
Get the current squared radius. | |
virtual bool | IsMoving () const =0 |
Return true if currently moving. |
Detailed Description
This is a mover property class.It works closely with pclinmove 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 to the behaviour (add prefix 'cel.parameter.' to get the ID for parameters):
- pcmover_impossible: don't even start the move: impossible.
- pcmover_stuck: can't move further.
- pcmover_arrived: arrived at final position.
- pcmover_interrupted: movement has been interrupted.
This property class supports the following actions (add prefix 'cel.action.' to get the ID of the action and add prefix 'cel.parameter.' to get the ID of the parameter):
- Start: parameters 'sectorname' (string), 'position' (vector3), 'up' (vector3), 'movespeed' (float), 'rotatespeed' (float), and 'sqradius' (float).
- Interrupt: interrupt the current movement.
This property class supports the following properties (add prefix 'cel.property.' to get the ID of the property:
- position (vector3, read only): current end position.
- up (vector3, read only): current up vector.
- movespeed (float, read only): current movement speed.
- rotatespeed (float, read only): current rotation speed.
- sqradius (float, read/write): current squared radius.
- moving (bool, read only): returns true if currently moving.
Definition at line 65 of file mover.h.
Member Function Documentation
|
Get the current movement speed.
|
|
Get the end position that we want to move too.
|
|
Get the current rotation speed.
|
|
Get the end sector that we want to move too.
|
|
Get the current squared radius.
|
|
Get the current up vector.
|
|
Interrupt a movement. The behaviour will get a 'pcmover_interrupted' message if the mover was really moving. Otherwise nothing happens. |
|
Return true if currently moving.
|
|
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).
|
The documentation for this struct was generated from the following file:
- propclass/mover.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.4