The base class for any object that can be drawn to the screen.
More...
#include <Drawable.hpp>
|
void | viewShouldAffect (bool effective) |
| Set whether the current view should affect the position of the drawable. Otherwise, its position on the screen will be absolute.
|
|
void | setDepth (float depth) |
| Sets the depth of the drawable for 3d. This simply corresponds to the X offset calculated for the 2 separate top screens. Larger objects will require a deeper depth for the 3d effect to be noticable. A positive value will cause the drawable to sink into the screen, while a negative value will cause it to pop out.
|
|
const float & | getDepth () const |
|
virtual void | draw (const dl::Vector2f &viewOffset)=0 |
| Draws the drawable to the screen.
|
|
|
bool | m_bViewDoesAffect = true |
|
float | m_depth = 0.0f |
|
The base class for any object that can be drawn to the screen.
◆ draw()
virtual void dl::Drawable::draw |
( |
const dl::Vector2f & | viewOffset | ) |
|
|
pure virtual |
◆ getDepth()
const float & dl::Drawable::getDepth |
( |
| ) |
const |
- Returns
- The depth of the drawable
◆ setDepth()
void dl::Drawable::setDepth |
( |
float | depth | ) |
|
Sets the depth of the drawable for 3d. This simply corresponds to the X offset calculated for the 2 separate top screens. Larger objects will require a deeper depth for the 3d effect to be noticable. A positive value will cause the drawable to sink into the screen, while a negative value will cause it to pop out.
- Parameters
-
depth | The depth of the object |
◆ viewShouldAffect()
void dl::Drawable::viewShouldAffect |
( |
bool | effective | ) |
|
Set whether the current view should affect the position of the drawable. Otherwise, its position on the screen will be absolute.
- Parameters
-
effective | Whether the view will be effective on this drawable |
The documentation for this class was generated from the following files:
- include/Dualie/Graphics/Drawable.hpp
- src/Dualie/Graphics/Drawable.cpp