Planeshift
psLinearPath Class Reference

#include <pspath.h>

Public Member Functions

 psLinearPath (csString name, Waypoint *wp1, Waypoint *wp2, psString flagStr)
 
 psLinearPath (int pathID, csString name, psString flagStr)
 
virtual ~psLinearPath ()
 
- Public Member Functions inherited from psPath
psPathPointAddPoint (Location *loc, bool first=false)
 Add a new point to the path. More...
 
psPathPointAddPoint (iDataConnection *db, const csVector3 &pos, const char *sectorName, bool first=false)
 Add a new point to the path and update db. More...
 
psPathPointAddPoint (const csVector3 &pos, float radius, const char *sectorName, bool first=false)
 Add a new point to the path. More...
 
bool Adjust (iDataConnection *db, int index, csVector3 &pos, csString sector)
 Adjust a point in the path. More...
 
float CalculateIncidentAngle (csVector3 &pos, csVector3 &dest)
 Utility function to calcualte angle to point between to points. More...
 
bool Create (iDataConnection *db)
 Create a path in the db. More...
 
virtual psPathAnchorCreatePathAnchor ()
 Return a path anchor to this path. More...
 
virtual float Distance (psWorld *world, iEngine *engine, const csVector3 &pos, const iSector *sector, int *index=NULL, float *fraction=NULL) const
 Calculate distance from point to path. More...
 
virtual float DistancePoint (psWorld *world, iEngine *engine, const csVector3 &pos, const iSector *sector, int *index=NULL, bool include_ends=false) const
 Calculate distance from point to path points. More...
 
psPathPointFindPoint (int id)
 Get Path Point by id. More...
 
int FindPointIndex (int id) const
 Get Path Point index by id. More...
 
int FindPointIndex (const psPathPoint *point) const
 Get Path Point index by point. More...
 
size_t FindPointsInSector (iEngine *engine, iSector *sector, csList< psPathPoint * > &list)
 Get all points in the given sector for this path. More...
 
psPathPointGetEndPoint (Direction direction)
 Get the end point. More...
 
csVector3 GetEndPos (Direction direction)
 Get the end point position. More...
 
float GetEndRot (Direction direction)
 Get the end rotation. More...
 
iSector * GetEndSector (iEngine *engine, Direction direction)
 Get the end sector. More...
 
WaypointGetEndWaypoint (Direction direction)
 Get the end waypoint. More...
 
csString GetFlags () const
 Return a string of flags. More...
 
int GetID () const
 Get ID of the path. More...
 
virtual float GetLength (psWorld *world, iEngine *engine, int index)
 Get the length of one segment of the path. More...
 
virtual float GetLength (psWorld *world, iEngine *engine)
 Get the total length of all path segments. More...
 
virtual const char * GetName () const
 Get name of the path. More...
 
virtual int GetNumPoints () const
 Get number of points in path. More...
 
psPathPointGetPoint (int index)
 
const psPathPointGetPoint (int index) const
 
psPathPointGetStartPoint (Direction direction)
 Get the start point. More...
 
WaypointGetStartWaypoint (Direction direction)
 Get the start waypoint. More...
 
psPathPointInsertPoint (iDataConnection *db, int index, const csVector3 &pos, const char *sectorName)
 Insert a new point to the path and update db. More...
 
bool Load (iDataConnection *db, iEngine *engine)
 Load the path from the db. More...
 
virtual void Precalculate (psWorld *world, iEngine *engine, bool forceUpdate=false)
 Precalculate values needed for anchors. More...
 
 psPath (csString name, Waypoint *wp1, Waypoint *wp2, psString flagStr)
 
 psPath (int pathID, csString name, psString flagStr)
 
bool RemovePoint (iDataConnection *db, int index)
 Remova a point from the path and update db. More...
 
bool RemovePoint (int index)
 Remova a point from the path. More...
 
bool RemovePoint (iDataConnection *db, psPathPoint *point)
 Remova a point from the path and update db. More...
 
bool Rename (iDataConnection *db, const char *name)
 Rename the path and update the db. More...
 
void Rename (const char *name)
 Rename the path. More...
 
void SetEnd (Waypoint *wp)
 Set the end of the path. More...
 
bool SetFlag (iDataConnection *db, const csString &flagstr, bool enable)
 Set the flags from a string and update the db. More...
 
bool SetFlag (const csString &flagstr, bool enable)
 Set the flags from a string. More...
 
void SetFlags (const psString &flagStr)
 Set the flags from a string. More...
 
void SetStart (Waypoint *wp)
 Set the start of the path. More...
 
bool UpdatePrevPointIndexes (iDataConnection *db)
 Update the indexes, after insert and removal of points. More...
 
virtual ~psPath ()
 

Protected Member Functions

virtual void GetInterpolatedForward (int index, float fraction, csVector3 &forward)
 Get the interpolated forward vector. More...
 
virtual void GetInterpolatedPosition (int index, float fraction, csVector3 &pos)
 Get the interpolated position. More...
 
virtual void GetInterpolatedUp (int index, float fraction, csVector3 &up)
 Get the interpolated up vector. More...
 
virtual void PrecalculatePath (psWorld *world, iEngine *engine)
 Do the actual precalculate work. More...
 

Additional Inherited Members

- Public Types inherited from psPath
enum  Direction { FORWARD, REVERSE }
 
typedef csPDelArray< psPathPointPathPointArray
 
- Public Attributes inherited from psPath
Waypointend
 This path end waypoint. More...
 
int id
 
csString name
 
bool noWander
 
bool oneWay
 Flags. More...
 
PathPointArray points
 The points this path consists of including start wp and end wp. More...
 
bool precalculationValid
 
Waypointstart
 This path start waypoint. More...
 
bool teleport
 Teleport between the waypoints. More...
 
float totalDistance
 

Detailed Description

Definition at line 323 of file pspath.h.

Constructor & Destructor Documentation

psLinearPath::psLinearPath ( csString  name,
Waypoint wp1,
Waypoint wp2,
psString  flagStr 
)
psLinearPath::psLinearPath ( int  pathID,
csString  name,
psString  flagStr 
)
virtual psLinearPath::~psLinearPath ( )
inlinevirtual

Definition at line 328 of file pspath.h.

Member Function Documentation

virtual void psLinearPath::GetInterpolatedForward ( int  index,
float  fraction,
csVector3 &  forward 
)
protectedvirtual

Get the interpolated forward vector.

Implements psPath.

virtual void psLinearPath::GetInterpolatedPosition ( int  index,
float  fraction,
csVector3 &  pos 
)
protectedvirtual

Get the interpolated position.

Implements psPath.

virtual void psLinearPath::GetInterpolatedUp ( int  index,
float  fraction,
csVector3 &  up 
)
protectedvirtual

Get the interpolated up vector.

Implements psPath.

virtual void psLinearPath::PrecalculatePath ( psWorld world,
iEngine *  engine 
)
protectedvirtual

Do the actual precalculate work.

Implements psPath.


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