Ammo Class Reference

the variables and methods that a bullet contains put in this file More...

#include <Ammo.h>

Collaboration diagram for Ammo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Ammo (UserAgent *_parent, Models *_model, ngl::Vec3 _pos, std::string _meshName, ngl::Vec3 _velocity)
 ctor
 ~Ammo ()
 dtor
void setTarget (const ngl::Vec3 _pos)
 set the target pos for the bullet
ngl::Vec3 getPos ()
 get the target pos of the bullet
void draw (ngl::TransformStack *_tx, ngl::Camera *_cam)
 draw the scene
void update ()
 method to update
void setLifeStatus ()
 set the life status of the bullet
bool getLifeStatus ()
 get the life status of the bullet
UserAgentgetparent ()
 get the parent from which it is shot

Protected Attributes

UserAgentm_parent
 the variable to pointer parent
Modelsm_model
 a pointer to hold the models variable
ngl::Vec3 m_velocity
 variable to hold the velocity of bullet
ngl::Vec3 m_pos
 variable to hold the position
std::string m_meshName
 variale to hold the mesh to draw
ngl::Vec3 m_target
 a variable to hold the target pos
bool m_bulletLife
 a bool to hold the life of the bullet

Detailed Description

the variables and methods that a bullet contains put in this file

Definition at line 22 of file Ammo.h.


Constructor & Destructor Documentation

Ammo::Ammo ( UserAgent _parent,
Models _model,
ngl::Vec3  _pos,
std::string  _meshName,
ngl::Vec3  _velocity 
)

ctor

Parameters:
[in] the parent from which the bullet is shot
[in] the model variable for meshes
[in] the initial position from which the bullet is shot
[in] the type of the agent
[in] the velocity with which it is shot
Ammo::~Ammo (  ) 

dtor


Member Function Documentation

void Ammo::draw ( ngl::TransformStack *  _tx,
ngl::Camera *  _cam 
)

draw the scene

Parameters:
[in] _tx the transform stack of the current scene
[in] _cam the current camera
bool Ammo::getLifeStatus (  )  [inline]

get the life status of the bullet

Definition at line 64 of file Ammo.h.

References m_bulletLife.

00064 {return m_bulletLife;}

UserAgent* Ammo::getparent (  )  [inline]

get the parent from which it is shot

Definition at line 68 of file Ammo.h.

References m_parent.

00068 {return m_parent;}

ngl::Vec3 Ammo::getPos (  )  [inline]

get the target pos of the bullet

Definition at line 46 of file Ammo.h.

References m_pos.

00046 {return m_pos;}

void Ammo::setLifeStatus (  )  [inline]

set the life status of the bullet

Definition at line 60 of file Ammo.h.

References m_bulletLife.

00060 {m_bulletLife = false;}

void Ammo::setTarget ( const ngl::Vec3  _pos  ) 

set the target pos for the bullet

Parameters:
[in] the target _pos
void Ammo::update (  ) 

method to update


Member Data Documentation

bool Ammo::m_bulletLife [protected]

a bool to hold the life of the bullet

Definition at line 98 of file Ammo.h.

std::string Ammo::m_meshName [protected]

variale to hold the mesh to draw

Definition at line 90 of file Ammo.h.

Models* Ammo::m_model [protected]

a pointer to hold the models variable

Definition at line 78 of file Ammo.h.

UserAgent* Ammo::m_parent [protected]

the variable to pointer parent

Definition at line 74 of file Ammo.h.

ngl::Vec3 Ammo::m_pos [protected]

variable to hold the position

Definition at line 86 of file Ammo.h.

ngl::Vec3 Ammo::m_target [protected]

a variable to hold the target pos

Definition at line 94 of file Ammo.h.

ngl::Vec3 Ammo::m_velocity [protected]

variable to hold the velocity of bullet

Definition at line 82 of file Ammo.h.


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

Generated on 16 Aug 2013 for Multi-AgentSystem by  doxygen 1.6.1