Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
SpaceSkybox Class Reference

#include <SpaceSkybox.hpp>

+ Inheritance diagram for SpaceSkybox:
+ Collaboration diagram for SpaceSkybox:

Public Member Functions

 SpaceSkybox ()=default
 
 ~SpaceSkybox () override=default
 
void init () override
 
void update (float deltaTime) override
 
void draw (const Camera3D &camera) override
 
void unload () override
 
- Public Member Functions inherited from IBackground
virtual ~IBackground ()=default
 

Private Member Functions

void _generateNightTexture ()
 
void _generateDayTexture ()
 
Mesh _generateCustomSphere (float radius, int rings, int slices)
 

Private Attributes

Model _sphereModel = {}
 
Texture2D _nightTexture = {}
 
Texture2D _dayTexture = {}
 
float _timeOfDay = 0.0f
 

Detailed Description

Definition at line 6 of file SpaceSkybox.hpp.

Constructor & Destructor Documentation

◆ SpaceSkybox()

SpaceSkybox::SpaceSkybox ( )
default

◆ ~SpaceSkybox()

SpaceSkybox::~SpaceSkybox ( )
overridedefault

Member Function Documentation

◆ _generateCustomSphere()

Mesh SpaceSkybox::_generateCustomSphere ( float  radius,
int  rings,
int  slices 
)
private

Definition at line 111 of file SpaceSkybox.cpp.

Referenced by init().

+ Here is the caller graph for this function:

◆ _generateDayTexture()

void SpaceSkybox::_generateDayTexture ( )
private

Definition at line 53 of file SpaceSkybox.cpp.

References _dayTexture.

Referenced by init().

+ Here is the caller graph for this function:

◆ _generateNightTexture()

void SpaceSkybox::_generateNightTexture ( )
private

Definition at line 17 of file SpaceSkybox.cpp.

References _nightTexture.

Referenced by init().

+ Here is the caller graph for this function:

◆ draw()

void SpaceSkybox::draw ( const Camera3D &  camera)
overridevirtual

Implements IBackground.

Definition at line 82 of file SpaceSkybox.cpp.

References _dayTexture, _nightTexture, _sphereModel, and _timeOfDay.

◆ init()

void SpaceSkybox::init ( )
overridevirtual

Implements IBackground.

Definition at line 9 of file SpaceSkybox.cpp.

References _generateCustomSphere(), _generateDayTexture(), _generateNightTexture(), and _sphereModel.

+ Here is the call graph for this function:

◆ unload()

void SpaceSkybox::unload ( )
overridevirtual

Implements IBackground.

Definition at line 104 of file SpaceSkybox.cpp.

References _dayTexture, _nightTexture, and _sphereModel.

◆ update()

void SpaceSkybox::update ( float  deltaTime)
overridevirtual

Implements IBackground.

Definition at line 72 of file SpaceSkybox.cpp.

References _sphereModel, and _timeOfDay.

Member Data Documentation

◆ _dayTexture

Texture2D SpaceSkybox::_dayTexture = {}
private

Definition at line 19 of file SpaceSkybox.hpp.

Referenced by _generateDayTexture(), draw(), and unload().

◆ _nightTexture

Texture2D SpaceSkybox::_nightTexture = {}
private

Definition at line 18 of file SpaceSkybox.hpp.

Referenced by _generateNightTexture(), draw(), and unload().

◆ _sphereModel

Model SpaceSkybox::_sphereModel = {}
private

Definition at line 17 of file SpaceSkybox.hpp.

Referenced by draw(), init(), unload(), and update().

◆ _timeOfDay

float SpaceSkybox::_timeOfDay = 0.0f
private

Definition at line 21 of file SpaceSkybox.hpp.

Referenced by draw(), and update().


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