Ammo Class Reference
the variables and methods that a bullet contains put in this file
More...
#include <Ammo.h>
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
|
UserAgent * | getparent () |
| get the parent from which it is shot
|
Protected Attributes |
UserAgent * | m_parent |
| the variable to pointer parent
|
Models * | m_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 |
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 parent from which it is shot
Definition at line 68 of file Ammo.h.
References 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.
void Ammo::setLifeStatus |
( |
|
) |
[inline] |
void Ammo::setTarget |
( |
const ngl::Vec3 |
_pos |
) |
|
set the target pos for the bullet
- Parameters:
-
Member Data Documentation
a bool to hold the life of the bullet
Definition at line 98 of file Ammo.h.
variale to hold the mesh to draw
Definition at line 90 of file Ammo.h.
a pointer to hold the models variable
Definition at line 78 of file Ammo.h.
the variable to pointer parent
Definition at line 74 of file Ammo.h.
variable to hold the position
Definition at line 86 of file Ammo.h.
a variable to hold the target pos
Definition at line 94 of file Ammo.h.
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: