xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::Sonic::AreaBackground Class Reference

#include <areabackground.h>

Inheritance diagram for Engines::Sonic::AreaBackground:
Inheritance graph
[legend]
Collaboration diagram for Engines::Sonic::AreaBackground:
Collaboration graph
[legend]

Public Member Functions

 AreaBackground (const Common::UString &name)
 
 ~AreaBackground ()
 
uint32 getImageWidth () const
 
uint32 getImageHeight () const
 
void calculateDistance ()
 Calculate the object's distance. More...
 
void render (Graphics::RenderPass pass)
 Render the object. More...
 
- Public Member Functions inherited from Graphics::GUIElement
 GUIElement (GUIElementType type)
 
 ~GUIElement ()
 
- Public Member Functions inherited from Graphics::Renderable
 Renderable (RenderableType type)
 
 ~Renderable ()
 
bool operator< (const Queueable &q) const
 
virtual void advanceTime (float dt)
 Advance time (used by renderables with animations). More...
 
virtual void renderImmediate (const glm::mat4 &parentTransform)
 For shader based systems, don't sort anything, render this right_now. More...
 
virtual void queueRender (const glm::mat4 &parentTransform)
 Queue the object for later rendering. More...
 
double getDistance () const
 Get the distance of the object from the viewer. More...
 
uint32 getID () const
 Get the object's unique ID. More...
 
bool isClickable () const
 Is the object clickable? More...
 
void setClickable (bool clickable)
 Set the object's clickable state. More...
 
const Common::UStringgetTag () const
 Get the object's tag. More...
 
void setTag (const Common::UString &tag)
 Set the object's tag. More...
 
bool isVisible () const
 Is the object visible? More...
 
virtual void show ()
 Show the object. More...
 
virtual void hide ()
 Hide the object. More...
 
virtual bool isIn (float x, float y) const
 Is that point within the object? More...
 
virtual bool isIn (float x, float y, float z) const
 Is that point within the object? More...
 
virtual bool isIn (float x1, float y1, float z1, float x2, float y2, float z2) const
 Does the line from x1.y1.z1 to x2.y2.z2 intersect with the object? More...
 
- Public Member Functions inherited from Graphics::Queueable
 Queueable ()
 
virtual ~Queueable ()
 
- Public Member Functions inherited from Events::Notifyable
 Notifyable ()
 
virtual ~Notifyable ()
 

Private Member Functions

void loadTexture (const Common::UString &name)
 
void setPosition (float x, float y)
 
void notifyCameraMoved ()
 

Private Attributes

Graphics::Aurora::TextureHandle _texture
 
float _textureX1
 
float _textureY1
 
float _textureX2
 
float _textureY2
 

Additional Inherited Members

- Public Types inherited from Graphics::GUIElement
enum  GUIElementType { kGUIElementFront = kRenderableTypeGUIFront, kGUIElementBack = kRenderableTypeGUIBack, kGUIElementConsole = kRenderableTypeConsole }
 
- Protected Member Functions inherited from Graphics::Renderable
void resort ()
 
void lockFrame ()
 
void unlockFrame ()
 
void lockFrameIfVisible ()
 
void unlockFrameIfVisible ()
 
- 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)
 
- Protected Attributes inherited from Graphics::Renderable
QueueType _queueExists
 
QueueType _queueVisible
 
uint32 _id
 
bool _clickable
 
Common::UString _tag
 
double _distance
 The distance of the object from the viewer. More...
 

Detailed Description

Definition at line 42 of file areabackground.h.

Constructor & Destructor Documentation

◆ AreaBackground()

Engines::Sonic::AreaBackground::AreaBackground ( const Common::UString name)

Definition at line 53 of file areabackground.cpp.

References Graphics::Renderable::_distance, FLT_MAX, loadTexture(), and setPosition().

Here is the call graph for this function:

◆ ~AreaBackground()

Engines::Sonic::AreaBackground::~AreaBackground ( )

Definition at line 62 of file areabackground.cpp.

References Graphics::Renderable::hide().

Here is the call graph for this function:

Member Function Documentation

◆ calculateDistance()

void Engines::Sonic::AreaBackground::calculateDistance ( )
virtual

Calculate the object's distance.

Implements Graphics::Renderable.

Definition at line 74 of file areabackground.cpp.

◆ getImageHeight()

uint32 Engines::Sonic::AreaBackground::getImageHeight ( ) const

Definition at line 70 of file areabackground.cpp.

References _texture, Graphics::Aurora::Texture::getHeight(), and Graphics::Aurora::TextureHandle::getTexture().

Here is the call graph for this function:

◆ getImageWidth()

uint32 Engines::Sonic::AreaBackground::getImageWidth ( ) const

Definition at line 66 of file areabackground.cpp.

References _texture, Graphics::Aurora::TextureHandle::getTexture(), and Graphics::Aurora::Texture::getWidth().

Here is the call graph for this function:

◆ loadTexture()

void Engines::Sonic::AreaBackground::loadTexture ( const Common::UString name)
private

◆ notifyCameraMoved()

void Engines::Sonic::AreaBackground::notifyCameraMoved ( )
privatevirtual

Reimplemented from Events::Notifyable.

Definition at line 135 of file areabackground.cpp.

References CameraMan, and setPosition().

Here is the call graph for this function:

◆ render()

void Engines::Sonic::AreaBackground::render ( Graphics::RenderPass  pass)
virtual

◆ setPosition()

void Engines::Sonic::AreaBackground::setPosition ( float  x,
float  y 
)
private

Member Data Documentation

◆ _texture

Graphics::Aurora::TextureHandle Engines::Sonic::AreaBackground::_texture
private

Definition at line 55 of file areabackground.h.

Referenced by getImageHeight(), getImageWidth(), loadTexture(), render(), and setPosition().

◆ _textureX1

float Engines::Sonic::AreaBackground::_textureX1
private

Definition at line 57 of file areabackground.h.

Referenced by render(), and setPosition().

◆ _textureX2

float Engines::Sonic::AreaBackground::_textureX2
private

Definition at line 59 of file areabackground.h.

Referenced by render(), and setPosition().

◆ _textureY1

float Engines::Sonic::AreaBackground::_textureY1
private

Definition at line 58 of file areabackground.h.

Referenced by render(), and setPosition().

◆ _textureY2

float Engines::Sonic::AreaBackground::_textureY2
private

Definition at line 60 of file areabackground.h.

Referenced by render(), and setPosition().


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