Loading...
Searching...
No Matches
Gfx::CPlanet Class Reference

Planet manager. More...

`#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

## Detailed Description

Planet manager.

Draws the planets orbiting in the sky.

Planets are drawn in 2D mode, at coordinates calculated from camera position.

## Member Function Documentation

## Flush()

void Gfx::CPlanet::Flush | ( |  | ) |

Removes all the planets.

## EventProcess()

bool Gfx::CPlanet::EventProcess | ( | const Event & | event | ) |

Management of an event.

## Create()

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.

## PlanetExist()

bool Gfx::CPlanet::PlanetExist | ( |  | ) |

Indicates if there is at least one planet.

## LoadTexture()

void Gfx::CPlanet::LoadTexture | ( |  | ) |

Load all the textures for the planets.

## Draw()

void Gfx::CPlanet::Draw | ( |  | ) |

Draws all the planets.

## SetVisiblePlanetType()

void Gfx::CPlanet::SetVisiblePlanetType | ( | PlanetType | type | ) |

Set which planet types to display.

## EventFrame()

bool Gfx::CPlanet::EventFrame | ( | const Event & | event | ) |

protected

Makes the planets evolve.

The documentation for this class was generated from the following files:

- src/graphics/engine/planet.h
- src/graphics/engine/planet.cpp