Planeshift
Static Public Member Functions

psGameObject Class Reference

#include <npcbehave.h>

List of all members.

Static Public Member Functions

static float Calc2DDistance (const csVector3 &a, const csVector3 &b)
static float CalculateIncidentAngle (const csVector3 &pos, const csVector3 &dest)
static void ClampRadians (float &target_angle)
static csVector3 DisplaceTargetPos (const iSector *mySector, const csVector3 &myPos, const iSector *targetSector, const csVector3 &targetPos, float offset)
static csVector3 DisplaceTargetPos (const iSector *mySector, const csVector3 &myPos, const iSector *targetSector, const csVector3 &targetPos, float offset, float angle)
static void GetPosition (gemNPCObject *object, csVector3 &pos, iSector *&sector)
 Helper function to return position of a gemNPCObject.
static void GetPosition (gemNPCObject *object, csVector3 &pos, float &yrot, iSector *&sector)
 Helper function to return position of a gemNPCObject.
static void GetRotationAngle (gemNPCObject *object, float &yrot)
static void NormalizeRadians (float &target_angle)
static csString ReplaceNPCVariables (NPC *npc, const csString &object)
 Replace NPC Variables/keywords in the string.
static bool ReplaceNPCVariablesBool (NPC *npc, const csString &object)
 Replace NPC Variables/keywords in the string.
static void SetPosition (gemNPCObject *objecty, const csVector3 &pos, iSector *=NULL)
static void SetRotationAngle (gemNPCObject *object, float angle)

Detailed Description

Definition at line 542 of file npcbehave.h.


Member Function Documentation

static float psGameObject::Calc2DDistance ( const csVector3 &  a,
const csVector3 &  b 
) [static]
static float psGameObject::CalculateIncidentAngle ( const csVector3 &  pos,
const csVector3 &  dest 
) [static]
Returns:
The angle in the range [-PI,PI]
static void psGameObject::ClampRadians ( float target_angle) [static]
static csVector3 psGameObject::DisplaceTargetPos ( const iSector *  mySector,
const csVector3 &  myPos,
const iSector *  targetSector,
const csVector3 &  targetPos,
float  offset 
) [static]
static csVector3 psGameObject::DisplaceTargetPos ( const iSector *  mySector,
const csVector3 &  myPos,
const iSector *  targetSector,
const csVector3 &  targetPos,
float  offset,
float  angle 
) [static]
static void psGameObject::GetPosition ( gemNPCObject object,
csVector3 &  pos,
iSector *&  sector 
) [static]

Helper function to return position of a gemNPCObject.

Parameters:
objectThe object to thet the position of
posReturn the position of object
sectorReturn the sector of object
static void psGameObject::GetPosition ( gemNPCObject object,
csVector3 &  pos,
float yrot,
iSector *&  sector 
) [static]

Helper function to return position of a gemNPCObject.

Parameters:
objectThe object to thet the position of
posReturn the position of object
yrotReturn the Y Rotation of the object
sectorReturn the sector of object
static void psGameObject::GetRotationAngle ( gemNPCObject object,
float yrot 
) [inline, static]

Definition at line 564 of file npcbehave.h.

static void psGameObject::NormalizeRadians ( float target_angle) [static]
static csString psGameObject::ReplaceNPCVariables ( NPC npc,
const csString &  object 
) [static]

Replace NPC Variables/keywords in the string.

Replace $race,$target,$tribe,$owner,$name.

Parameters:
npcThe npc to take the variables from
objectThe string to replace the keywords from
Returns:
String with replaced keywords.
static bool psGameObject::ReplaceNPCVariablesBool ( NPC npc,
const csString &  object 
) [static]

Replace NPC Variables/keywords in the string.

Check for a boolean result of the replace.

Parameters:
npcThe npc to take the variables from
objectThe string to replace the keywords from
Returns:
true if result from replace is "true" or "yes".
static void psGameObject::SetPosition ( gemNPCObject objecty,
const csVector3 &  pos,
iSector *  = NULL 
) [static]
static void psGameObject::SetRotationAngle ( gemNPCObject object,
float  angle 
) [static]

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