#include <Explosive.h>
Public Member Functions | |
Explosive (Game *game, H3DNode parent, Physics *physics, const int id, H3DRes modelRes, const Vec3 position, const Vec3 rotation, const float scale) | |
~Explosive () | |
void | update (const float timeStep) |
Vec3 | getPosition () |
bool | castRayAndCorrectPosition (Vec3 &calculatedCurrentPosition, Vec3 &collisionPoint) |
This class provides a explosive model in respect to graphics and physics. Please note that the current implementation shows up only as a barrel of gasoline.
Definition at line 16 of file Explosive.h.
Explosive::Explosive | ( | Game * | game, | |
H3DNode | parent, | |||
Physics * | physics, | |||
const int | id, | |||
H3DRes | modelRes, | |||
const Vec3 | position, | |||
const Vec3 | rotation, | |||
const float | scale | |||
) |
This class provides both physics and graphics simulation of an explosive body, like a gasoline barrel. An Explosive is designed to
modelRes | ||
world |
Definition at line 19 of file Explosive.cpp.
Explosive::~Explosive | ( | ) |
Definition at line 64 of file Explosive.cpp.
bool Explosive::castRayAndCorrectPosition | ( | Vec3 & | calculatedCurrentPosition, | |
Vec3 & | collisionPoint | |||
) |
Corrects the vertical position of the physics body in respect to the terrain.
calculatedCurrentPosition | the position on the world | |
collisionPoint | the actual point where the explosive body should cross the world | |
physics | needed for physics calculation |
Definition at line 178 of file Explosive.cpp.
Vec3 Explosive::getPosition | ( | ) |
Definition at line 146 of file Explosive.cpp.
void Explosive::update | ( | const float | timeStep | ) |
updates the graphics and physics state for explosive entities
timeStep |
Definition at line 72 of file Explosive.cpp.