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

#include <geometryobject.h>

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

Public Member Functions

 GeometryObject (const VertexBuffer &vBuf, const IndexBuffer &iBuf)
 
 ~GeometryObject ()
 
void getPosition (float &x, float &y, float &z) const
 Get the current position of the model. More...
 
void getRotation (float &x, float &y, float &z) const
 Get the current rotation of the model. More...
 
void setPosition (float x, float y, float z)
 Set the current position of the model. More...
 
void setRotation (float x, float y, float z)
 Set the current rotation of the model. More...
 
void move (float x, float y, float z)
 Move the model, relative to its current position. More...
 
void rotate (float x, float y, float z)
 Rotate the model, relative to its current rotation. More...
 
void calculateDistance ()
 Calculate the object's distance. More...
 
void render (RenderPass pass)
 Render the object. More...
 
- 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 ()
 

Private Attributes

VertexBuffer _vertexBuffer
 
IndexBuffer _indexBuffer
 
float _position [3]
 
float _rotation [3]
 

Additional Inherited Members

- 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 36 of file geometryobject.h.

Constructor & Destructor Documentation

◆ GeometryObject()

Graphics::Aurora::GeometryObject::GeometryObject ( const VertexBuffer vBuf,
const IndexBuffer iBuf 
)

Definition at line 34 of file geometryobject.cpp.

References _position, and _rotation.

◆ ~GeometryObject()

Graphics::Aurora::GeometryObject::~GeometryObject ( )

Definition at line 45 of file geometryobject.cpp.

Member Function Documentation

◆ calculateDistance()

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

Calculate the object's distance.

Implements Graphics::Renderable.

Definition at line 96 of file geometryobject.cpp.

References Graphics::Renderable::_distance.

Referenced by setPosition(), and setRotation().

Here is the caller graph for this function:

◆ getPosition()

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

Get the current position of the model.

Definition at line 48 of file geometryobject.cpp.

References _position.

◆ getRotation()

void Graphics::Aurora::GeometryObject::getRotation ( float &  x,
float &  y,
float &  z 
) const

Get the current rotation of the model.

Definition at line 54 of file geometryobject.cpp.

References _rotation.

◆ move()

void Graphics::Aurora::GeometryObject::move ( float  x,
float  y,
float  z 
)

Move the model, relative to its current position.

Definition at line 88 of file geometryobject.cpp.

References _position, and setPosition().

Here is the call graph for this function:

◆ render()

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

Render the object.

Implements Graphics::Renderable.

Definition at line 100 of file geometryobject.cpp.

References _indexBuffer, _position, _rotation, _vertexBuffer, Graphics::VertexBuffer::draw(), Graphics::kRenderPassTransparent, pass, and TextureMan.

Here is the call graph for this function:

◆ rotate()

void Graphics::Aurora::GeometryObject::rotate ( float  x,
float  y,
float  z 
)

Rotate the model, relative to its current rotation.

Definition at line 92 of file geometryobject.cpp.

References _rotation, and setRotation().

Here is the call graph for this function:

◆ setPosition()

void Graphics::Aurora::GeometryObject::setPosition ( float  x,
float  y,
float  z 
)

Set the current position of the model.

Definition at line 60 of file geometryobject.cpp.

References _position, calculateDistance(), Graphics::Renderable::lockFrameIfVisible(), Graphics::Renderable::resort(), and Graphics::Renderable::unlockFrameIfVisible().

Referenced by move().

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

◆ setRotation()

void Graphics::Aurora::GeometryObject::setRotation ( float  x,
float  y,
float  z 
)

Set the current rotation of the model.

Definition at line 74 of file geometryobject.cpp.

References _rotation, calculateDistance(), Graphics::Renderable::lockFrameIfVisible(), Graphics::Renderable::resort(), and Graphics::Renderable::unlockFrameIfVisible().

Referenced by rotate().

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

Member Data Documentation

◆ _indexBuffer

IndexBuffer Graphics::Aurora::GeometryObject::_indexBuffer
private

Definition at line 64 of file geometryobject.h.

Referenced by render().

◆ _position

float Graphics::Aurora::GeometryObject::_position[3]
private

Definition at line 66 of file geometryobject.h.

Referenced by GeometryObject(), getPosition(), move(), render(), and setPosition().

◆ _rotation

float Graphics::Aurora::GeometryObject::_rotation[3]
private

Definition at line 67 of file geometryobject.h.

Referenced by GeometryObject(), getRotation(), render(), rotate(), and setRotation().

◆ _vertexBuffer

VertexBuffer Graphics::Aurora::GeometryObject::_vertexBuffer
private

Definition at line 63 of file geometryobject.h.

Referenced by render().


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