O --- O
PEDSIM Documentation [EXAMPLES] [DOCUMENTATION] [DOWNLOAD] [HOME]
|
O --- O
|

[Tagent] [Tevent] [Tpov] [Ttree]


Public Methods

 Tagent ()
void move (long systemtime)
 This is the main function of the agent, here, all the dynamics takes place.

void setPosition (double px, double py)
 set the agents position (to beam the agent)

void setType (int t)
int getid ()
int gettype ()
double getx ()
double gety ()
double getdirection ()
double getsword ()
double getcolor ()
bool isalive ()
void hit ()
 called if the agent was hit by another agents sword

void print ()

Private Attributes

double x
 current position of the agent

double y
 current position of the agent

int id
 agent number

double vx
 velocity of the agent

double vy
 velocity of the agent

int type
double energy
 how much energy the agent has. [0..100]

bool dead
 if the agent is alive: 1, else: 0

vector< Tagent >::iterator enemynearest
 the nearest enemy to this agent

double enemydist
 the distance to the nearest enemy

double color
 the color of the agent. I think this is obsolete, or should be called different. Colors a known to viewers or renderers, not to sim

double direction
 the direction the agent walks to.

double sword
 the position of its sword

double swordini
 the initial position of its sword. used that not all the swords are in sync.


Detailed Description

Description: Class that descripts an agent object Introduced: chgloor Dec 26, 2003


Constructor & Destructor Documentation

Tagent::Tagent  
 

Description: set intial values Introduced: chgloor Monday, December 29, 2003 11:10:37


Member Function Documentation

double Tagent::getcolor   [inline]
 

double Tagent::getdirection   [inline]
 

int Tagent::getid   [inline]
 

double Tagent::getsword   [inline]
 

int Tagent::gettype   [inline]
 

double Tagent::getx   [inline]
 

double Tagent::gety   [inline]
 

void Tagent::hit  
 

called if the agent was hit by another agents sword

Description: if an agent was hit by another agent Introduced: chgloor Monday, December 29, 2003 14:06:36

bool Tagent::isalive   [inline]
 

void Tagent::move long    systemtime
 

This is the main function of the agent, here, all the dynamics takes place.

Description: does the ped dynamics stuff Introduced: chgloor Monday, December 29, 2003 11:10:58 Return value: void

void Tagent::print   [inline]
 

void Tagent::setPosition double    px,
double    py
 

set the agents position (to beam the agent)

Description: sets the position Introduced: chgloor Tuesday, February 10, 2004 10:48:39 Return value: void

void Tagent::setType int    t [inline]
 


Member Data Documentation

double Tagent::color [private]
 

the color of the agent. I think this is obsolete, or should be called different. Colors a known to viewers or renderers, not to sim

bool Tagent::dead [private]
 

if the agent is alive: 1, else: 0

double Tagent::direction [private]
 

the direction the agent walks to.

double Tagent::enemydist [private]
 

the distance to the nearest enemy

vector<Tagent>::iterator Tagent::enemynearest [private]
 

the nearest enemy to this agent

double Tagent::energy [private]
 

how much energy the agent has. [0..100]

int Tagent::id [private]
 

agent number

double Tagent::sword [private]
 

the position of its sword

double Tagent::swordini [private]
 

the initial position of its sword. used that not all the swords are in sync.

int Tagent::type [private]
 

double Tagent::vx [private]
 

velocity of the agent

double Tagent::vy [private]
 

velocity of the agent

double Tagent::x [private]
 

current position of the agent

double Tagent::y [private]
 

current position of the agent

O --- O




(c) 1995-2004 by Christian Gloor [contact]