Colobot
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Gfx::CPlanet Class Reference

Planet manager. More...

#include <planet.h>

Classes

struct  Planet
 Planet texture definition. More...
 

Public Member Functions

 CPlanet (CEngine *engine)
 
void Flush ()
 Removes all the planets. More...
 
bool EventProcess (const Event &event)
 Management of an event. More...
 
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. More...
 
bool PlanetExist ()
 Indicates if there is at least one planet. More...
 
void LoadTexture ()
 Load all the textures for the planets. More...
 
void Draw ()
 Draws all the planets. More...
 
void SetVisiblePlanetType (PlanetType type)
 Set which planet types to display. More...
 

Protected Member Functions

bool EventFrame (const Event &event)
 Makes the planets evolve. More...
 

Protected Attributes

CEnginem_engine = nullptr
 
float m_time = 0.0f
 
PlanetType m_visibleType = PlanetType::Sky
 
std::vector< Planetm_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

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.

bool Gfx::CPlanet::EventFrame ( const Event event)
protected

Makes the planets evolve.


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