Define the interface of an object.
More...
#include <i_object.h>
|
virtual | ~IObject (void) |
| Destructor.
|
|
virtual bool | isDead (void) const =0 |
| Verify if the object is dead (not be able to draw). More...
|
|
virtual bool | hasBrain (void) const =0 |
| Verify if the object contains a neural network. More...
|
|
virtual std::string | getType (void) const =0 |
| Get the ky (type) of the object in the environment. More...
|
|
virtual void | setPosition (sf::Vector2f const &position)=0 |
| Set the current position of the object. More...
|
|
virtual void | setIsDead (bool condition)=0 |
| Set the current state of the object. More...
|
|
virtual void | setElapsedTime (sf::Time &time)=0 |
| Set the elapsed time between the previous and the current update. More...
|
|
virtual IObject * | Clone (void)=0 |
| Clone the current object. More...
|
|
virtual void | Update (void)=0 |
| Update the object.
|
|
|
virtual void | draw (sf::RenderTarget &target, sf::RenderStates states) const =0 |
| Allow the object to be drawn on the window. More...
|
|
Define the interface of an object.
virtual IObject* Graphics::IObject::Clone |
( |
void |
| ) |
|
|
pure virtual |
Clone the current object.
- Returns
- success : IObject
-
error : NULL
virtual void Graphics::IObject::draw |
( |
sf::RenderTarget & |
target, |
|
|
sf::RenderStates |
states |
|
) |
| const |
|
protectedpure virtual |
Allow the object to be drawn on the window.
- Parameters
-
target | : Contains the render target. |
states | : Contains the current state of the render target. |
virtual std::string Graphics::IObject::getType |
( |
void |
| ) |
const |
|
pure virtual |
Get the ky (type) of the object in the environment.
- Returns
- std::string
virtual bool Graphics::IObject::hasBrain |
( |
void |
| ) |
const |
|
pure virtual |
Verify if the object contains a neural network.
- Returns
- true : if the object has a neural network.
-
false : if the object doesn't have not a neural netowrk.
virtual bool Graphics::IObject::isDead |
( |
void |
| ) |
const |
|
pure virtual |
Verify if the object is dead (not be able to draw).
- Returns
- true : if the object is dead.
-
false : if the object is not dead.
virtual void Graphics::IObject::setElapsedTime |
( |
sf::Time & |
time | ) |
|
|
pure virtual |
Set the elapsed time between the previous and the current update.
- Parameters
-
time | : Contains the delta time. |
virtual void Graphics::IObject::setIsDead |
( |
bool |
condition | ) |
|
|
pure virtual |
Set the current state of the object.
- Parameters
-
condition | : Contains if the object is dead or not. |
virtual void Graphics::IObject::setPosition |
( |
sf::Vector2f const & |
position | ) |
|
|
pure virtual |
Set the current position of the object.
- Parameters
-
position | : Contains the new position of the object. |
The documentation for this class was generated from the following file:
- /home/robin_f/Programming/Git/CPP/LoveBrains/include/Graphics/i_object.h