|
Colobot
|
#include <src/graphics/engine/planet.h>
Classes | |
| struct | Planet |
| Planet texture definition. More... | |
Public Member Functions | |
| CPlanet (CEngine *engine) | |
| void | Flush () |
| Removes all the planets. | |
| bool | EventProcess (const Event &event) |
| Management of an event. | |
| void | Create (PlanetType type, Math::Point start, float dim, float speed, float dir, const std::string &name, Math::Point uv1, Math::Point uv2, bool transparent) |
| Creates a new planet. | |
| bool | PlanetExist () |
| Indicates if there is at least one planet. | |
| void | LoadTexture () |
| Load all the textures for the planets. | |
| void | Draw () |
| Draws all the planets. | |
| void | SetVisiblePlanetType (PlanetType type) |
| Set which planet types to display. | |
Protected Member Functions | |
| bool | EventFrame (const Event &event) |
| Makes the planets evolve. | |
Protected Attributes | |
| CEngine * | m_engine = nullptr |
| float | m_time = 0.0f |
| PlanetType | m_visibleType = PlanetType::Sky |
| std::vector< Planet > | m_planets |
Planet manager.
Draws the planets orbiting in the sky.
Planets are drawn in 2D mode, at coordinates calculated from camera position.
| void Gfx::CPlanet::Flush | ( | ) |
Removes all the planets.
| bool Gfx::CPlanet::EventProcess | ( | const Event & | event | ) |
Management of an event.
| void Gfx::CPlanet::Create | ( | PlanetType | type, |
| Math::Point | start, | ||
| float | dim, | ||
| float | speed, | ||
| float | dir, | ||
| const std::string & | name, | ||
| Math::Point | uv1, | ||
| Math::Point | uv2, | ||
| bool | transparent | ||
| ) |
Creates a new planet.
| bool Gfx::CPlanet::PlanetExist | ( | ) |
Indicates if there is at least one planet.
| void Gfx::CPlanet::LoadTexture | ( | ) |
Load all the textures for the planets.
| void Gfx::CPlanet::Draw | ( | ) |
Draws all the planets.
| void Gfx::CPlanet::SetVisiblePlanetType | ( | PlanetType | type | ) |
Set which planet types to display.
|
protected |
Makes the planets evolve.