iPcLinearMovement Struct Reference
This property class controls movement of an entity in a realistic manner. More...
#include <propclass/linmove.h>
Public Member Functions | |
virtual void | AddGravityCallback (iPcGravityCallback *callback)=0 |
Shedules a callback when gravity has grasped an object and is dragging it down. | |
virtual void | AddVelocity (const csVector3 &vel)=0 |
Exerts a velocity on the body in world coordinates. | |
virtual void | ClearPortalDisplacement ()=0 |
Clear the total displacement caused by space warping portals. | |
virtual void | ClearWorldVelocity ()=0 |
Resets the velocity of this body in world coordinates. | |
virtual void | ExtrapolatePosition (float delta)=0 |
This function actually moves and rotates the mesh, relighting if necessary. | |
virtual iPcMesh * | GetAnchor () const =0 |
Get the current anchor or 0 if movement is not anchored. | |
virtual void | GetAngularVelocity (csVector3 &v) const =0 |
Get the current angular velocity vector. | |
virtual void | GetCDDimensions (csVector3 &body, csVector3 &legs, csVector3 &shift, iPcCollisionDetection *&pc_cd)=0 |
Get CD box for the object. | |
virtual void | GetDRData (bool &on_ground, float &speed, csVector3 &pos, float &yrot, iSector *§or, csVector3 &vel, csVector3 &worldVel, float &ang_vel)=0 |
Return all necessary data for Dead Reckoning. | |
virtual void | GetLastFullPosition (csVector3 &pos, float &yrot, iSector *§or)=0 |
Get full position and sector. | |
virtual void | GetLastPosition (csVector3 &pos, float &yrot, iSector *§or)=0 |
Get position and sector. | |
virtual csVector3 | GetPortalDisplacement ()=0 |
Get the total displacement caused by space warping portals. | |
virtual iSector * | GetSector ()=0 |
Get sector. | |
virtual void | GetVelocity (csVector3 &v) const =0 |
Get the current velocity vector. | |
virtual bool | InitCD (iPcCollisionDetection *pc_cd=0)=0 |
Initialize CD again?@@. | |
virtual bool | InitCD (const csVector3 &body, const csVector3 &legs, const csVector3 &shift, iPcCollisionDetection *pc_cd=0)=0 |
Initialize CD box for the object. | |
virtual bool | InitCD (iMeshWrapper *mesh, float percentage, iPcCollisionDetection *pc_cd=0)=0 |
Initialize CD box for the object from a mesh. | |
virtual bool | IsPath () const =0 |
Is a csPath active now or standard DR movement? | |
virtual void | RemoveGravityCallback (iPcGravityCallback *callback)=0 |
Remove a gravity callback. | |
virtual void | SetAnchor (iPcMesh *pcmesh)=0 |
Set an anchor for this movement class. | |
virtual void | SetAngularVelocity (const csVector3 &angle, const csVector3 &angle_to_reach)=0 |
Set the orientation of the mesh with three given euler angles with a maximum to reached. | |
virtual void | SetAngularVelocity (const csVector3 &angle)=0 |
Set the orientation of the mesh with three given euler angles. | |
virtual void | SetDRData (bool on_ground, float speed, csVector3 &pos, float yrot, iSector *sector, csVector3 &vel, csVector3 &worldVel, float ang_vel)=0 |
Sets all relevant dead reckoning data on this entity. | |
virtual void | SetFullPosition (const char *center_name, float yrot, iSector *sector)=0 |
Set full position and sector. | |
virtual void | SetFullPosition (const csVector3 &pos, float yrot, const iSector *sector)=0 |
Set full position and sector. | |
virtual void | SetHugGround (bool hugGround)=0 |
Set if pcmesh should be transformed to follow the contour of the ground. | |
virtual void | SetPath (iPath *newpath)=0 |
This function lets linmove store a ref to the supplied iPath. | |
virtual void | SetPathAction (int which, const char *action)=0 |
This relates a particular action name to be used between two points in the path. | |
virtual void | SetPathSector (const char *sectorname)=0 |
This sets the sector which will be used for the entire path. | |
virtual void | SetPathSpeed (float speed)=0 |
This relates the movement of the entity along the path to the time values specified by the path. | |
virtual void | SetPathTime (float timeval)=0 |
This function sets the current position on the path for use when time deltas are added later. | |
virtual void | SetPosition (const char *center_name, float yrot, iSector *sector)=0 |
Set position and sector. | |
virtual void | SetPosition (const csVector3 &pos, float yrot, const iSector *sector)=0 |
Set position and sector. | |
virtual void | SetSoftDRData (bool on_ground, float speed, csVector3 &pos, float yrot, iSector *sector, csVector3 &vel, csVector3 &worldVel, float ang_vel)=0 |
Sets dead reckoning data in a 'soft' way. | |
virtual void | SetSpeed (float speedZ)=0 |
Set the current speed. | |
virtual void | SetVelocity (const csVector3 &vel)=0 |
Set the current velocity vector in body coordinates. | |
virtual csTicks | TimeDiff (void)=0 |
Returns the difference in time between now and when the last DR update or extrapolation took place. | |
virtual void | UpdateDR (csTicks ticks)=0 |
This function calls ExtrapolatePosition with a certain time but calculates the delta relative to the last update, not a fixed delta. | |
virtual void | UpdateDRDelta (csTicks ticksdelta)=0 |
This function calls ExtrapolatePosition with a certain time but uses a fixed delta. |
Detailed Description
This property class controls movement of an entity in a realistic manner.It should be used in combination with iPcMesh but otherwise doesn't depend on any other property classes. So in that sense it is unrelated to the other movement property classes.
This property class supports dead reckoning which is useful for networking.
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):
- InitCD: parameters 'body' (vector3), 'legs' (vector3), and 'offset' (vector3).
- InitCDMesh: parameters 'percentage' (float).
- SetPosition: parameters 'sector' (string), 'position' (vector3 or string (name of mapnode in that case)), and 'yrot' (y rotation degrees).
This property class supports the following properties (add prefix 'cel.property.' to get the ID of the property:
- anchor (string, read/write): name of the entity on which we are anchored.
Definition at line 88 of file linmove.h.
Member Function Documentation
|
Shedules a callback when gravity has grasped an object and is dragging it down. I.e, calls when the object changes to negative Y velocity
|
|
Exerts a velocity on the body in world coordinates.
|
|
Clear the total displacement caused by space warping portals.
|
|
Resets the velocity of this body in world coordinates.
|
|
This function actually moves and rotates the mesh, relighting if necessary.
|
|
Get the current anchor or 0 if movement is not anchored.
|
|
Get the current angular velocity vector.
|
|
Get CD box for the object.
|
|
Return all necessary data for Dead Reckoning.
|
|
Get full position and sector. This is an absolute position which is not relative to the anchor. |
|
Get position and sector. If there is an anchor then this position is relative to the anchor. Use SetLastFullPosition() if you want an absolute position. |
|
Get the total displacement caused by space warping portals.
|
|
Get sector.
|
|
Get the current velocity vector.
|
|
Initialize CD again?@@.
|
|
Initialize CD box for the object. The two parameters are the dimensions of the body and the legs collider boxes. The 'shift' vector is used to shift the box. By default (with shift equal to the 0 vector) the colliders are created assuming the 0,0,0 origin is at the bottom center of the actor. |
|
Initialize CD box for the object from a mesh.
|
|
Is a csPath active now or standard DR movement?
|
|
Remove a gravity callback.
|
|
Set an anchor for this movement class. When this linmove is anchored it basically means that all movement will be done relative to the anchor. You can use this to do movement on an object that is also moving on its own. If 'pcmesh' is 0 this will clear the anchor. |
|
Set the orientation of the mesh with three given euler angles with a maximum to reached. It returns true if this maximum has has been reached. |
|
Set the orientation of the mesh with three given euler angles.
|
|
Sets all relevant dead reckoning data on this entity.
|
|
Set full position and sector. The position is absolute and will be corrected to fit on the anchor if there is one. Use node name as center. |
|
Set full position and sector. The position is absolute and will be corrected to fit on the anchor if there is one. |
|
Set if pcmesh should be transformed to follow the contour of the ground.
|
|
This function lets linmove store a ref to the supplied iPath. If this path is present, it will be used for movement instead of linear velocity vector. |
|
This relates a particular action name to be used between two points in the path. This allows linmove to automatically switch a bird from "fly" to "glide", for example, during downward segments of the flight path. |
|
This sets the sector which will be used for the entire path.
|
|
This relates the movement of the entity along the path to the time values specified by the path. Speed=0 makes the entity stationary. Speed=1 is normal traversal of the path. |
|
This function sets the current position on the path for use when time deltas are added later.
|
|
Set position and sector. The position is relative to the anchor (if there is one). Use node name as center. |
|
Set position and sector. The position is relative to the anchor (if there is one). |
|
Sets dead reckoning data in a 'soft' way. Instead of immediately setting the position, an error (offset) is measured between the current position and the new position. Over the period of 1 second, the position will be offset until this position error is zero. |
|
Set the current speed.
|
|
Set the current velocity vector in body coordinates.
|
|
Returns the difference in time between now and when the last DR update or extrapolation took place.
|
|
This function calls ExtrapolatePosition with a certain time but calculates the delta relative to the last update, not a fixed delta. This allows all entities linmoves to be synchronized to the same ticks, even if updates are all happening at different times. |
|
This function calls ExtrapolatePosition with a certain time but uses a fixed delta. This allows all entities linmoves to be synchronized to the same ticks, even if updates are all happening at different times. |
The documentation for this struct was generated from the following file:
- propclass/linmove.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.6