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

#include <guiquad.h>

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

Public Member Functions

 GUIQuad (const Common::UString &texture, float x1, float y1, float x2, float y2, float tX1=0.0f, float tY1=0.0f, float tX2=1.0f, float tY2=1.0f)
 
 GUIQuad (Graphics::GUIElement::GUIElementType type, const Common::UString &texture, float x1, float y1, float x2, float y2, float tX1=0.0f, float tY1=0.0f, float tX2=1.0f, float tY2=1.0f)
 
 GUIQuad (TextureHandle texture, float x1, float y1, float x2, float y2, float tX1=0.0f, float tY1=0.0f, float tX2=1.0f, float tY2=1.0f)
 
 ~GUIQuad ()
 
void getPosition (float &x, float &y, float &z) const
 Get the current position of the quad. More...
 
void setPosition (float x, float y, float z=-FLT_MAX)
 Set the current position of the quad. More...
 
void setRotation (float angle)
 Set the current rotation of the quad in degrees. More...
 
void getColor (float &r, float &g, float &b, float &a) const
 Get the current color of the quad. More...
 
void setColor (float r, float g, float b, float a)
 Set the current color of the quad. More...
 
void setTexture (const Common::UString &texture)
 Set the current texture of the quad. More...
 
void setTexture (TextureHandle texture)
 Set the current texture of the quad. More...
 
void setScissor (int x, int y, int width, int height)
 Set the scissor test parameters. More...
 
float getWidth () const
 Return the quad's width. More...
 
float getHeight () const
 Return the quad's height. More...
 
void setWidth (float w)
 Set the quad's width. More...
 
void setHeight (float h)
 Set the quad's height. More...
 
void setXOR (bool enabled)
 Enable/Disable XOR mode. More...
 
void setScissor (bool enabled)
 Enable/Disable Scissor Test. More...
 
bool isIn (float x, float y) const
 Is the point within the quad? More...
 
void calculateDistance ()
 Calculate the object's distance. More...
 
void render (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, 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 ()
 

Private Attributes

TextureHandle _texture
 
float _r
 
float _g
 
float _b
 
float _a
 
float _angle
 
float _x1
 
float _y1
 
float _x2
 
float _y2
 
float _tX1
 
float _tY1
 
float _tX2
 
float _tY2
 
int _scissorX
 
int _scissorY
 
int _scissorWidth
 
int _scissorHeight
 
bool _xor
 
bool _scissor
 
bool _additiveBlending
 

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 guiquad.h.

Constructor & Destructor Documentation

◆ GUIQuad() [1/3]

Graphics::Aurora::GUIQuad::GUIQuad ( const Common::UString texture,
float  x1,
float  y1,
float  x2,
float  y2,
float  tX1 = 0.0f,
float  tY1 = 0.0f,
float  tX2 = 1.0f,
float  tY2 = 1.0f 
)

◆ GUIQuad() [2/3]

Graphics::Aurora::GUIQuad::GUIQuad ( Graphics::GUIElement::GUIElementType  type,
const Common::UString texture,
float  x1,
float  y1,
float  x2,
float  y2,
float  tX1 = 0.0f,
float  tY1 = 0.0f,
float  tX2 = 1.0f,
float  tY2 = 1.0f 
)

◆ GUIQuad() [3/3]

Graphics::Aurora::GUIQuad::GUIQuad ( TextureHandle  texture,
float  x1,
float  y1,
float  x2,
float  y2,
float  tX1 = 0.0f,
float  tY1 = 0.0f,
float  tX2 = 1.0f,
float  tY2 = 1.0f 
)

Definition at line 93 of file guiquad.cpp.

References Graphics::Renderable::_distance, and FLT_MAX.

◆ ~GUIQuad()

Graphics::Aurora::GUIQuad::~GUIQuad ( )

Definition at line 106 of file guiquad.cpp.

References Graphics::Renderable::hide().

Here is the call graph for this function:

Member Function Documentation

◆ calculateDistance()

void Graphics::Aurora::GUIQuad::calculateDistance ( )
virtual

Calculate the object's distance.

Implements Graphics::Renderable.

Definition at line 237 of file guiquad.cpp.

◆ getColor()

void Graphics::Aurora::GUIQuad::getColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const

Get the current color of the quad.

Definition at line 135 of file guiquad.cpp.

References _a, _b, _g, and _r.

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

Here is the caller graph for this function:

◆ getHeight()

float Graphics::Aurora::GUIQuad::getHeight ( ) const

Return the quad's height.

Definition at line 192 of file guiquad.cpp.

References _y1, _y2, and ABS().

Here is the call graph for this function:

◆ getPosition()

void Graphics::Aurora::GUIQuad::getPosition ( float &  x,
float &  y,
float &  z 
) const

Get the current position of the quad.

Definition at line 110 of file guiquad.cpp.

References Graphics::Renderable::_distance, _x1, _x2, _y1, _y2, and MIN().

Here is the call graph for this function:

◆ getWidth()

float Graphics::Aurora::GUIQuad::getWidth ( ) const

Return the quad's width.

Definition at line 188 of file guiquad.cpp.

References _x1, _x2, and ABS().

Here is the call graph for this function:

◆ isIn()

bool Graphics::Aurora::GUIQuad::isIn ( float  x,
float  y 
) const
virtual

Is the point within the quad?

Reimplemented from Graphics::Renderable.

Definition at line 228 of file guiquad.cpp.

References _x1, _x2, _y1, and _y2.

◆ render()

void Graphics::Aurora::GUIQuad::render ( RenderPass  pass)
virtual

◆ setColor()

void Graphics::Aurora::GUIQuad::setColor ( float  r,
float  g,
float  b,
float  a 
)

Set the current color of the quad.

Definition at line 143 of file guiquad.cpp.

References _a, _b, _g, _r, Graphics::Renderable::lockFrameIfVisible(), and Graphics::Renderable::unlockFrameIfVisible().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setHeight()

void Graphics::Aurora::GUIQuad::setHeight ( float  h)

Set the quad's height.

Definition at line 204 of file guiquad.cpp.

References _y1, _y2, Graphics::Renderable::lockFrameIfVisible(), and Graphics::Renderable::unlockFrameIfVisible().

Here is the call graph for this function:

◆ setPosition()

void Graphics::Aurora::GUIQuad::setPosition ( float  x,
float  y,
float  z = -FLT_MAX 
)

◆ setRotation()

void Graphics::Aurora::GUIQuad::setRotation ( float  angle)

Set the current rotation of the quad in degrees.

Definition at line 131 of file guiquad.cpp.

References _angle.

◆ setScissor() [1/2]

void Graphics::Aurora::GUIQuad::setScissor ( int  x,
int  y,
int  width,
int  height 
)

Set the scissor test parameters.

Definition at line 181 of file guiquad.cpp.

References _scissorHeight, _scissorWidth, _scissorX, and _scissorY.

◆ setScissor() [2/2]

void Graphics::Aurora::GUIQuad::setScissor ( bool  enabled)

Enable/Disable Scissor Test.

Definition at line 220 of file guiquad.cpp.

References _scissor, Graphics::Renderable::lockFrameIfVisible(), and Graphics::Renderable::unlockFrameIfVisible().

Here is the call graph for this function:

◆ setTexture() [1/2]

void Graphics::Aurora::GUIQuad::setTexture ( const Common::UString texture)

Set the current texture of the quad.

Definition at line 154 of file guiquad.cpp.

References _a, _b, _g, _r, _texture, Graphics::Aurora::TextureHandle::clear(), Common::UString::empty(), Graphics::Renderable::lockFrameIfVisible(), TextureMan, and Graphics::Renderable::unlockFrameIfVisible().

Here is the call graph for this function:

◆ setTexture() [2/2]

void Graphics::Aurora::GUIQuad::setTexture ( TextureHandle  texture)

Set the current texture of the quad.

Definition at line 173 of file guiquad.cpp.

References _texture, Graphics::Renderable::lockFrameIfVisible(), and Graphics::Renderable::unlockFrameIfVisible().

Here is the call graph for this function:

◆ setWidth()

void Graphics::Aurora::GUIQuad::setWidth ( float  w)

Set the quad's width.

Definition at line 196 of file guiquad.cpp.

References _x1, _x2, Graphics::Renderable::lockFrameIfVisible(), and Graphics::Renderable::unlockFrameIfVisible().

Here is the call graph for this function:

◆ setXOR()

void Graphics::Aurora::GUIQuad::setXOR ( bool  enabled)

Enable/Disable XOR mode.

Definition at line 212 of file guiquad.cpp.

References _xor, Graphics::Renderable::lockFrameIfVisible(), and Graphics::Renderable::unlockFrameIfVisible().

Here is the call graph for this function:

Member Data Documentation

◆ _a

float Graphics::Aurora::GUIQuad::_a
private

Definition at line 98 of file guiquad.h.

Referenced by getColor(), GUIQuad(), render(), setColor(), and setTexture().

◆ _additiveBlending

bool Graphics::Aurora::GUIQuad::_additiveBlending
private

Definition at line 119 of file guiquad.h.

Referenced by GUIQuad(), and render().

◆ _angle

float Graphics::Aurora::GUIQuad::_angle
private

Definition at line 100 of file guiquad.h.

Referenced by render(), and setRotation().

◆ _b

float Graphics::Aurora::GUIQuad::_b
private

Definition at line 97 of file guiquad.h.

Referenced by getColor(), GUIQuad(), render(), setColor(), and setTexture().

◆ _g

float Graphics::Aurora::GUIQuad::_g
private

Definition at line 96 of file guiquad.h.

Referenced by getColor(), GUIQuad(), render(), setColor(), and setTexture().

◆ _r

float Graphics::Aurora::GUIQuad::_r
private

Definition at line 95 of file guiquad.h.

Referenced by getColor(), GUIQuad(), render(), setColor(), and setTexture().

◆ _scissor

bool Graphics::Aurora::GUIQuad::_scissor
private

Definition at line 118 of file guiquad.h.

Referenced by render(), and setScissor().

◆ _scissorHeight

int Graphics::Aurora::GUIQuad::_scissorHeight
private

Definition at line 115 of file guiquad.h.

Referenced by render(), and setScissor().

◆ _scissorWidth

int Graphics::Aurora::GUIQuad::_scissorWidth
private

Definition at line 114 of file guiquad.h.

Referenced by render(), and setScissor().

◆ _scissorX

int Graphics::Aurora::GUIQuad::_scissorX
private

Definition at line 112 of file guiquad.h.

Referenced by render(), and setScissor().

◆ _scissorY

int Graphics::Aurora::GUIQuad::_scissorY
private

Definition at line 113 of file guiquad.h.

Referenced by render(), and setScissor().

◆ _texture

TextureHandle Graphics::Aurora::GUIQuad::_texture
private

Definition at line 93 of file guiquad.h.

Referenced by GUIQuad(), render(), and setTexture().

◆ _tX1

float Graphics::Aurora::GUIQuad::_tX1
private

Definition at line 107 of file guiquad.h.

Referenced by render().

◆ _tX2

float Graphics::Aurora::GUIQuad::_tX2
private

Definition at line 109 of file guiquad.h.

Referenced by render().

◆ _tY1

float Graphics::Aurora::GUIQuad::_tY1
private

Definition at line 108 of file guiquad.h.

Referenced by render().

◆ _tY2

float Graphics::Aurora::GUIQuad::_tY2
private

Definition at line 110 of file guiquad.h.

Referenced by render().

◆ _x1

float Graphics::Aurora::GUIQuad::_x1
private

Definition at line 102 of file guiquad.h.

Referenced by getPosition(), getWidth(), isIn(), render(), setPosition(), and setWidth().

◆ _x2

float Graphics::Aurora::GUIQuad::_x2
private

Definition at line 104 of file guiquad.h.

Referenced by getPosition(), getWidth(), isIn(), render(), setPosition(), and setWidth().

◆ _xor

bool Graphics::Aurora::GUIQuad::_xor
private

Definition at line 117 of file guiquad.h.

Referenced by render(), and setXOR().

◆ _y1

float Graphics::Aurora::GUIQuad::_y1
private

Definition at line 103 of file guiquad.h.

Referenced by getHeight(), getPosition(), isIn(), render(), setHeight(), and setPosition().

◆ _y2

float Graphics::Aurora::GUIQuad::_y2
private

Definition at line 105 of file guiquad.h.

Referenced by getHeight(), getPosition(), isIn(), render(), setHeight(), and setPosition().


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