![]() |
Castle Battle
1.0
|
Ball represent the projectile of the cannon. More...
#include <ball.h>
Public Member Functions | |
Ball (IrrlichtDevice *device, scene::ISceneManager *smgr, video::IVideoDriver *driver, Physics *physics, core::vector3df position) | |
Default constructor will instance both irrlicht and bullet objects at specified position. More... | |
~Ball () | |
void | setCamera (scene::ICameraSceneNode *camera, core::vector3df rotation=core::vector3df(0, 0, 0)) |
Set camera to the ball, at specified rotation. More... | |
bool | moveCamera () |
Move camera,. More... | |
void | deleteCamera () |
Remove active camera and substitue with a parent camera. More... | |
Public Attributes | |
scene::ISceneManager * | smgr |
btRigidBody * | btBall |
Bullet btRigitBody instance of the projectile. More... | |
scene::ISceneNode * | irrBall |
Irrlicht instance of the projectile. More... | |
f32 | radius = 0.3f |
Radius of the projectile. More... | |
core::vector3df | cameraStartPosition |
Start position of the camera. More... | |
Camera * | camera |
Camera of related to the ball. More... | |
IrrlichtDevice * | device |
Irrlicht device. More... | |
scene::ICameraSceneNode * | parentCamera |
Parent camera of the ball, in particular is the cannon camera. More... | |
core::array< core::vector3df > | points |
Points of the ball while moving in air. More... | |
Ball represent the projectile of the cannon.
Ball::Ball | ( | IrrlichtDevice * | device, |
scene::ISceneManager * | smgr, | ||
video::IVideoDriver * | driver, | ||
Physics * | physics, | ||
core::vector3df | position | ||
) |
Default constructor will instance both irrlicht and bullet objects at specified position.
void Ball::deleteCamera | ( | ) |
Remove active camera and substitue with a parent camera.
bool Ball::moveCamera | ( | ) |
Move camera,.
void Ball::setCamera | ( | scene::ICameraSceneNode * | camera, |
core::vector3df | rotation = core::vector3df(0,0,0) |
||
) |
Set camera to the ball, at specified rotation.
btRigidBody* Ball::btBall |
Bullet btRigitBody instance of the projectile.
core::vector3df Ball::cameraStartPosition |
Start position of the camera.
IrrlichtDevice* Ball::device |
Irrlicht device.
scene::ISceneNode* Ball::irrBall |
Irrlicht instance of the projectile.
scene::ICameraSceneNode* Ball::parentCamera |
Parent camera of the ball, in particular is the cannon camera.
core::array<core::vector3df> Ball::points |
Points of the ball while moving in air.
It is used for a special effect. For now it is not used
f32 Ball::radius = 0.3f |
Radius of the projectile.
scene::ISceneManager* Ball::smgr |