Public Member Functions | |
CSWPySubmarine (std::string strName, double fLength) | |
virtual void | initialize () |
virtual void | update () |
virtual bool | processEvent (boost::shared_ptr< CSWEvent > pEvent) |
virtual void | finalize () |
boost::shared_ptr< ARSTD::CommandProcessor > | getCommandProcessor () |
boost::shared_ptr< CSWEngine > | getMainEngine () |
boost::shared_ptr< CSWEngine > | getBowsJetOar () |
boost::shared_ptr< CSWEngine > | getInclinationJetOar () |
boost::shared_ptr< CSWEngine > | getAxialInclinationJetOar () |
boost::shared_ptr< CSWEngine > | getBuoyancyTank () |
boost::shared_ptr< CSWControlCenter > | getControlCenter () |
boost::shared_ptr< CSWWeaponBattery > | getFrontLeftWeaponBattery () |
boost::shared_ptr< CSWWeaponBattery > | getFrontRightWeaponBattery () |
boost::shared_ptr< CSWWeaponBattery > | getBackWeaponBattery () |
const double & | getHealth () const |
void | setColor (const Vector4D &vecColor) |
const Vector4D & | getColor () |
Vector3D | makeLocalDirection (const Vector3D &vecWorldTDirection) |
Vector3D | makeGlobalDirection (const Vector3D &vecObjectTDirection) |
Vector3D | makeLocalPosition (const Vector3D &vecWorldTPosition) |
Vector3D | makeGlobalPosition (const Vector3D &vecObjectTPosition) |
CSWPySubmarine::CSWPySubmarine | ( | std::string | strName, | |
double | fLength | |||
) |
Constructs a new submarine.
strName | The name of the new submarine. | |
fLength | The length of the new submarine. |
virtual void CSWPySubmarine::initialize | ( | ) | [virtual] |
This method should be overriden if initializations must be done. Here all sensors return correct values. Its ensured that this method is called before any other method (except constructor) is called.
Reimplemented from CSWObject.
virtual void CSWPySubmarine::update | ( | ) | [virtual] |
This method must be overriden in the specialized class. This methode is called periodically about every 10ms. The main function should be checking sensors, seting up commands or something like that. The specialized class can implement everything here, but the execution time must not exceed 6ms in average. If it does the object will be kicked from the world!
Reimplemented from CSWSubmarine.
virtual bool CSWPySubmarine::processEvent | ( | boost::shared_ptr< CSWEvent > | pEvent | ) | [virtual] |
This method must be overriden in the specialized class. This methode is called if an event has been received by the object that should be processed. Returning true reports the eventmanager that the event passed to the object has successfully processed and delete it. When returning false the event will be delivered the next time again until it expires or processed successfully. The main function should be reacting to events e.g. seting up commands or something like that. The specialized class can implement everything here, but the execution time must not exceed 6ms in average. If it does the object will be kicked from the world!
pEvent | The incoming event that should be processed. |
Reimplemented from CSWSubmarine.
virtual void CSWPySubmarine::finalize | ( | ) | [virtual] |
This method should be overriden if finalizations must be done. Its ensured that this method is called directly before destructing.
Reimplemented from CSWObject.
boost::shared_ptr<ARSTD::CommandProcessor> CSWPySubmarine::getCommandProcessor | ( | ) | [virtual] |
Returns the command processor. The behavior is like in real life your 1st commander. You (the captain) makes a list of commands that must be done. This list is given to the commander. He cares about the correct execution. Ones you give him the list of commands you are able to do other things while your commander do the execution.
Reimplemented from CSWSubmarine.
boost::shared_ptr<CSWEngine> CSWPySubmarine::getMainEngine | ( | ) |
boost::shared_ptr<CSWEngine> CSWPySubmarine::getBowsJetOar | ( | ) |
boost::shared_ptr<CSWEngine> CSWPySubmarine::getInclinationJetOar | ( | ) |
boost::shared_ptr<CSWEngine> CSWPySubmarine::getAxialInclinationJetOar | ( | ) |
Returns the axial inclination jet oar.
Reimplemented from CSWSubmarine.
boost::shared_ptr<CSWEngine> CSWPySubmarine::getBuoyancyTank | ( | ) |
boost::shared_ptr<CSWControlCenter> CSWPySubmarine::getControlCenter | ( | ) |
boost::shared_ptr<CSWWeaponBattery> CSWPySubmarine::getFrontLeftWeaponBattery | ( | ) |
Returns the front left weapon battery.
Reimplemented from CSWSubmarine.
boost::shared_ptr<CSWWeaponBattery> CSWPySubmarine::getFrontRightWeaponBattery | ( | ) |
Returns the front right weapon battery.
Reimplemented from CSWSubmarine.
boost::shared_ptr<CSWWeaponBattery> CSWPySubmarine::getBackWeaponBattery | ( | ) |
const double& CSWPySubmarine::getHealth | ( | ) | const [virtual] |
Returns the current health of the submarine.
Reimplemented from CSWDamDynSolCol.
void CSWPySubmarine::setColor | ( | const Vector4D & | vecColor | ) | [virtual] |
Sets the color of the submarine.
vecColor | The new red-green-blue-alpha - color. each color component in range [0, 1]. |
Reimplemented from CSWDynSolCol.
const Vector4D& CSWPySubmarine::getColor | ( | ) | [virtual] |
Returns the color of the object.
Reimplemented from CSWDynSolCol.
Vector3D CSWPySubmarine::makeLocalDirection | ( | const Vector3D & | vecWorldTDirection | ) |
Transforms a direction given in world coordinate system into the local system.
vecWorldTDirection | The direction in world coordinate system. |
Reimplemented from CSWSubmarine.
Vector3D CSWPySubmarine::makeGlobalDirection | ( | const Vector3D & | vecObjectTDirection | ) |
Transforms a direction given in local coordinate system into the world coordinate system.
vecObjectTDirection | The direction in local coordinate system. |
Reimplemented from CSWSubmarine.
Vector3D CSWPySubmarine::makeLocalPosition | ( | const Vector3D & | vecWorldTPosition | ) |
Transforms a position given in world coordinate system into the local system.
vecWorldTPosition | The position in world coordinate system. |
Reimplemented from CSWSubmarine.
Vector3D CSWPySubmarine::makeGlobalPosition | ( | const Vector3D & | vecObjectTPosition | ) |
Transforms a position given in local coordinate system into the world coordinate system.
vecObjectTPosition | The position in local coordinate system. |
Reimplemented from CSWSubmarine.