xoreos  0.0.5
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Graphics::Aurora::Cube Class Reference

A simple, rotating cube. More...

#include <cube.h>

Inheritance diagram for Graphics::Aurora::Cube:
Inheritance graph
[legend]
Collaboration diagram for Graphics::Aurora::Cube:
Collaboration graph
[legend]

Public Member Functions

 Cube (const Common::UString &texture)
 
 ~Cube ()
 
- Public Member Functions inherited from Graphics::GLContainer
 GLContainer ()
 
 ~GLContainer ()
 
void rebuild ()
 
void destroy ()
 
- Public Member Functions inherited from Graphics::Queueable
 Queueable ()
 
virtual ~Queueable ()
 
virtual bool operator< (const Queueable &q) const
 

Protected Member Functions

void doRebuild ()
 
void doDestroy ()
 
- Protected Member Functions inherited from Graphics::Queueable
bool isInQueue (QueueType queue) const
 
void addToQueue (QueueType queue)
 
void removeFromQueue (QueueType queue)
 
void lockQueue (QueueType queue)
 
void unlockQueue (QueueType queue)
 
void sortQueue (QueueType queue)
 

Private Member Functions

void applyTransformation (int n)
 
void applyTransformation (int n, glm::mat4 &m)
 
void setTexture ()
 
void callList ()
 
void newFrame ()
 
void reloadTextures ()
 

Private Attributes

CubeSide_sides [6]
 
bool _firstTime
 
uint32 _lastRotateTime
 
float _rotation
 
ListID _list
 
TextureHandle _texture
 

Friends

class CubeSide
 

Detailed Description

A simple, rotating cube.

Definition at line 64 of file cube.h.

Constructor & Destructor Documentation

◆ Cube()

Graphics::Aurora::Cube::Cube ( const Common::UString texture)

Definition at line 82 of file cube.cpp.

References _sides, _texture, CubeSide, RequestMan, and TextureMan.

◆ ~Cube()

Graphics::Aurora::Cube::~Cube ( )

Definition at line 91 of file cube.cpp.

References _list, _sides, GfxMan, Graphics::kQueueGLContainer, and Graphics::Queueable::removeFromQueue().

Here is the call graph for this function:

Member Function Documentation

◆ applyTransformation() [1/2]

void Graphics::Aurora::Cube::applyTransformation ( int  n)
private

Definition at line 152 of file cube.cpp.

References _rotation.

Referenced by Graphics::Aurora::CubeSide::calculateDistance(), and Graphics::Aurora::CubeSide::render().

Here is the caller graph for this function:

◆ applyTransformation() [2/2]

void Graphics::Aurora::Cube::applyTransformation ( int  n,
glm::mat4 &  m 
)
private

Definition at line 187 of file cube.cpp.

References _rotation, and Common::deg2rad().

Here is the call graph for this function:

◆ callList()

void Graphics::Aurora::Cube::callList ( )
private

Definition at line 226 of file cube.cpp.

References _list.

Referenced by Graphics::Aurora::CubeSide::render().

Here is the caller graph for this function:

◆ doDestroy()

void Graphics::Aurora::Cube::doDestroy ( )
protectedvirtual

Implements Graphics::GLContainer.

Definition at line 131 of file cube.cpp.

References _list.

◆ doRebuild()

void Graphics::Aurora::Cube::doRebuild ( )
protectedvirtual

Implements Graphics::GLContainer.

Definition at line 101 of file cube.cpp.

References _list.

◆ newFrame()

void Graphics::Aurora::Cube::newFrame ( )
private

Definition at line 140 of file cube.cpp.

References _lastRotateTime, _rotation, and EventMan.

Referenced by Graphics::Aurora::CubeSide::render().

Here is the caller graph for this function:

◆ reloadTextures()

void Graphics::Aurora::Cube::reloadTextures ( )
private

◆ setTexture()

void Graphics::Aurora::Cube::setTexture ( )
private

Definition at line 222 of file cube.cpp.

References _texture, and TextureMan.

Referenced by Graphics::Aurora::CubeSide::render().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ CubeSide

friend class CubeSide
friend

Definition at line 94 of file cube.h.

Referenced by Cube().

Member Data Documentation

◆ _firstTime

bool Graphics::Aurora::Cube::_firstTime
private

Definition at line 77 of file cube.h.

◆ _lastRotateTime

uint32 Graphics::Aurora::Cube::_lastRotateTime
private

Definition at line 79 of file cube.h.

Referenced by newFrame().

◆ _list

ListID Graphics::Aurora::Cube::_list
private

Definition at line 82 of file cube.h.

Referenced by callList(), doDestroy(), doRebuild(), and ~Cube().

◆ _rotation

float Graphics::Aurora::Cube::_rotation
private

Definition at line 80 of file cube.h.

Referenced by applyTransformation(), and newFrame().

◆ _sides

CubeSide* Graphics::Aurora::Cube::_sides[6]
private

Definition at line 75 of file cube.h.

Referenced by Cube(), and ~Cube().

◆ _texture

TextureHandle Graphics::Aurora::Cube::_texture
private

Definition at line 84 of file cube.h.

Referenced by Cube(), Graphics::Aurora::CubeSide::render(), and setTexture().


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