xoreos
0.0.5
|
An object that can be displayed by the graphics manager. More...
#include <renderable.h>
Public Member Functions | |
Renderable (RenderableType type) | |
~Renderable () | |
bool | operator< (const Queueable &q) const |
virtual void | calculateDistance ()=0 |
Calculate the object's distance. More... | |
virtual void | advanceTime (float dt) |
Advance time (used by renderables with animations). More... | |
virtual void | render (RenderPass pass)=0 |
Render the object. 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::UString & | getTag () 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 () |
Protected Member Functions | |
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 | |
QueueType | _queueExists |
QueueType | _queueVisible |
uint32 | _id |
bool | _clickable |
Common::UString | _tag |
double | _distance |
The distance of the object from the viewer. More... | |
An object that can be displayed by the graphics manager.
Definition at line 42 of file renderable.h.
Graphics::Renderable::Renderable | ( | RenderableType | type | ) |
Definition at line 33 of file renderable.cpp.
References _id, _queueExists, _queueVisible, Graphics::Queueable::addToQueue(), GfxMan, Graphics::kQueueGUIBackObject, Graphics::kQueueGUIConsoleObject, Graphics::kQueueGUIFrontObject, Graphics::kQueueVideo, Graphics::kQueueVisibleGUIBackObject, Graphics::kQueueVisibleGUIConsoleObject, Graphics::kQueueVisibleGUIFrontObject, Graphics::kQueueVisibleVideo, Graphics::kQueueVisibleWorldObject, Graphics::kQueueWorldObject, Graphics::kRenderableTypeConsole, Graphics::kRenderableTypeGUIBack, Graphics::kRenderableTypeGUIFront, Graphics::kRenderableTypeObject, and Graphics::kRenderableTypeVideo.
Graphics::Renderable::~Renderable | ( | ) |
Definition at line 69 of file renderable.cpp.
References _queueExists, hide(), and Graphics::Queueable::removeFromQueue().
|
virtual |
Advance time (used by renderables with animations).
Reimplemented in Graphics::Aurora::Model.
Definition at line 79 of file renderable.cpp.
|
pure virtual |
Calculate the object's distance.
Implemented in Graphics::Aurora::Model, Engines::NWN::DialogBox, Video::VideoDecoder, Engines::ConsoleWindow, Graphics::Aurora::GUIQuad, Graphics::Aurora::Text, Engines::NWN::Portrait, Engines::NWN::Scrollbar, Graphics::Aurora::Walkmesh, Graphics::Aurora::GeometryObject, Engines::Jade::GUIBackground, Engines::KotOR::GUIBackground, Graphics::Aurora::FadeQuad, Graphics::Aurora::CubeSide, Engines::Sonic::AreaBackground, Graphics::Aurora::BorderQuad, Engines::Trigger, Graphics::Aurora::KotORDialogFrame, and Graphics::Aurora::SubSceneQuad.
double Graphics::Renderable::getDistance | ( | ) | const |
Get the distance of the object from the viewer.
Definition at line 82 of file renderable.cpp.
References _distance.
uint32 Graphics::Renderable::getID | ( | ) | const |
Get the object's unique ID.
Definition at line 86 of file renderable.cpp.
References _id.
Referenced by Engines::Jade::Area::getObjectAt(), Engines::DragonAge2::Area::getObjectAt(), Engines::DragonAge::Area::getObjectAt(), Engines::Sonic::Area::getObjectAt(), Engines::Witcher::Area::getObjectAt(), Engines::KotOR2::Area::getObjectAt(), Engines::NWN2::Area::getObjectAt(), Engines::NWN::Area::getObjectAt(), and Engines::KotOR::Area::getObjectAt().
const Common::UString & Graphics::Renderable::getTag | ( | ) | const |
Get the object's tag.
Definition at line 98 of file renderable.cpp.
References _tag.
Referenced by Engines::GUI::getWidgetAt().
|
virtual |
Hide the object.
Reimplemented in Engines::NWN::DialogBox, Graphics::Aurora::Model, Engines::ConsoleWindow, Engines::KotOR2::Trigger, and Engines::KotOR::Trigger.
Definition at line 123 of file renderable.cpp.
References _queueVisible, and Graphics::Queueable::removeFromQueue().
Referenced by Video::VideoDecoder::abort(), Video::VideoDecoder::deinit(), Engines::KotOR::Situated::hide(), Engines::KotOR2::Situated::hide(), Engines::KotOR::Room::hide(), Engines::KotOR2::Room::hide(), Engines::ConsoleWindow::hide(), Graphics::Aurora::Model::hide(), Engines::NWN::DialogBox::hide(), Engines::KotORJadeWidget::hide(), Engines::NWN::WidgetScrollbar::hide(), Engines::NWN::PortraitWidget::hide(), Engines::Sonic::Game::showChapter1(), Engines::Sonic::Game::showLicenseSplash(), Engines::Sonic::Game::showMainMenu(), Engines::Sonic::Game::showQuote(), Engines::Sonic::Game::showTitle(), Engines::Sonic::AreaBackground::~AreaBackground(), Graphics::Aurora::CubeSide::~CubeSide(), Graphics::Aurora::FPS::~FPS(), Engines::Jade::GUIBackground::~GUIBackground(), Engines::KotOR::GUIBackground::~GUIBackground(), Graphics::Aurora::GUIQuad::~GUIQuad(), ~Renderable(), Engines::NWN::Scrollbar::~Scrollbar(), and Graphics::Aurora::Text::~Text().
bool Graphics::Renderable::isClickable | ( | ) | const |
Is the object clickable?
Definition at line 90 of file renderable.cpp.
References _clickable.
Referenced by Graphics::GraphicsManager::getGUIObjectAt(), and Graphics::GraphicsManager::getWorldObjectAt().
|
virtual |
Is that point within the object?
Reimplemented in Engines::NWN::DialogBox, Graphics::Aurora::Model, Graphics::Aurora::Text, Graphics::Aurora::GUIQuad, Engines::NWN::Portrait, Engines::ConsoleWindow, and Engines::NWN::Scrollbar.
Definition at line 127 of file renderable.cpp.
Referenced by Graphics::GraphicsManager::getGUIObjectAt(), and Graphics::GraphicsManager::getWorldObjectAt().
|
virtual |
Is that point within the object?
Reimplemented in Graphics::Aurora::Model, and Engines::ConsoleWindow.
Definition at line 131 of file renderable.cpp.
|
virtual |
Does the line from x1.y1.z1 to x2.y2.z2 intersect with the object?
Reimplemented in Graphics::Aurora::Model.
Definition at line 135 of file renderable.cpp.
bool Graphics::Renderable::isVisible | ( | ) | const |
Is the object visible?
Definition at line 106 of file renderable.cpp.
References _queueVisible, and Graphics::Queueable::isInQueue().
Referenced by Engines::NWN::DialogBox::finishReplies(), Engines::ConsoleWindow::hidePrompt(), lockFrameIfVisible(), Engines::NWN::DialogBox::setEntry(), Graphics::Aurora::Model::setState(), Engines::ConsoleWindow::showPrompt(), and unlockFrameIfVisible().
|
protected |
Definition at line 141 of file renderable.cpp.
References GfxMan.
Referenced by Graphics::Aurora::ModelNode::lockFrame(), and Graphics::Aurora::Model::setState().
|
protected |
Definition at line 149 of file renderable.cpp.
References GfxMan, and isVisible().
Referenced by Graphics::Aurora::ModelNode::lockFrameIfVisible(), Graphics::Aurora::Text::set(), Graphics::Aurora::GUIQuad::setColor(), Graphics::Aurora::Text::setColor(), Graphics::Aurora::Model::setEnvironmentMap(), Graphics::Aurora::GUIQuad::setHeight(), Graphics::Aurora::Model::setOrientation(), Graphics::Aurora::BorderQuad::setPosition(), Graphics::Aurora::GeometryObject::setPosition(), Graphics::Aurora::GUIQuad::setPosition(), Graphics::Aurora::Text::setPosition(), Graphics::Aurora::Model::setPosition(), Graphics::Aurora::GeometryObject::setRotation(), Graphics::Aurora::Model::setScale(), Graphics::Aurora::GUIQuad::setScissor(), Graphics::Aurora::Text::setSize(), Graphics::Aurora::Text::setText(), Graphics::Aurora::GUIQuad::setTexture(), Graphics::Aurora::GUIQuad::setWidth(), and Graphics::Aurora::GUIQuad::setXOR().
|
virtual |
Reimplemented from Graphics::Queueable.
Definition at line 75 of file renderable.cpp.
References _distance.
|
inlinevirtual |
Queue the object for later rendering.
Reimplemented in Graphics::Aurora::Model.
Definition at line 62 of file renderable.h.
Referenced by Graphics::GraphicsManager::renderWorldShader().
|
pure virtual |
Render the object.
Implemented in Graphics::Aurora::Model, Engines::NWN::DialogBox, Video::VideoDecoder, Engines::ConsoleWindow, Graphics::Aurora::Model_Sonic, Engines::NWN::FadeModel, Graphics::Aurora::GUIQuad, Graphics::Aurora::Text, Engines::NWN::Portrait, Engines::NWN::NewGameFog, Engines::NWN::Scrollbar, Graphics::Aurora::Walkmesh, Graphics::Aurora::GeometryObject, Engines::Jade::GUIBackground, Engines::KotOR::GUIBackground, Graphics::Aurora::FadeQuad, Graphics::Aurora::CubeSide, Graphics::Aurora::BorderQuad, Engines::Sonic::AreaBackground, Engines::Trigger, Graphics::Aurora::FPS, Graphics::Aurora::KotORDialogFrame, Graphics::Aurora::SubSceneQuad, Graphics::Aurora::HighlightableGUIQuad, and Graphics::Aurora::HighlightableText.
Referenced by Graphics::GraphicsManager::playVideo(), Graphics::GraphicsManager::renderGUI(), and Graphics::GraphicsManager::renderWorld().
|
inlinevirtual |
For shader based systems, don't sort anything, render this right_now.
Reimplemented in Graphics::Aurora::Model, Engines::NWN::NewGameFog, Graphics::Aurora::Text, and Engines::NWN::Portrait.
Definition at line 59 of file renderable.h.
Referenced by Graphics::GraphicsManager::renderGUIShader().
|
protected |
Definition at line 110 of file renderable.cpp.
References _queueVisible, and Graphics::Queueable::sortQueue().
Referenced by Graphics::Aurora::Model::setOrientation(), Graphics::Aurora::GeometryObject::setPosition(), Graphics::Aurora::GUIQuad::setPosition(), Graphics::Aurora::Text::setPosition(), Engines::NWN::Portrait::setPosition(), Engines::NWN::DialogBox::setPosition(), Graphics::Aurora::Model::setPosition(), Graphics::Aurora::GeometryObject::setRotation(), and Graphics::Aurora::Model::setScale().
void Graphics::Renderable::setClickable | ( | bool | clickable | ) |
Set the object's clickable state.
Definition at line 94 of file renderable.cpp.
References _clickable.
Referenced by Engines::ConsoleWindow::ConsoleWindow(), Engines::NWN::PortraitWidget::PortraitWidget(), Engines::NWN::WidgetButton::WidgetButton(), Engines::NWN::WidgetCheckBox::WidgetCheckBox(), Engines::NWN::WidgetClose::WidgetClose(), Engines::NWN::WidgetListBox::WidgetListBox(), Engines::NWN::WidgetScrollbar::WidgetScrollbar(), and Engines::NWN::WidgetSlider::WidgetSlider().
void Graphics::Renderable::setTag | ( | const Common::UString & | tag | ) |
Set the object's tag.
Definition at line 102 of file renderable.cpp.
References _tag.
Referenced by Engines::ConsoleWindow::ConsoleWindow(), Graphics::Aurora::FPS::init(), Engines::NWN::ModelWidget::ModelWidget(), Engines::NWN::PortraitWidget::PortraitWidget(), Engines::NWN::ModelWidget::setTag(), Engines::NWN::PortraitWidget::setTag(), and Engines::NWN::WidgetScrollbar::WidgetScrollbar().
|
virtual |
Show the object.
Reimplemented in Engines::NWN::DialogBox, Graphics::Aurora::Model, Engines::ConsoleWindow, Engines::KotOR2::Trigger, and Engines::KotOR::Trigger.
Definition at line 114 of file renderable.cpp.
References _queueVisible, Graphics::Queueable::addToQueue(), Graphics::Queueable::lockQueue(), Graphics::Queueable::sortQueue(), and Graphics::Queueable::unlockQueue().
Referenced by Graphics::Aurora::CubeSide::CubeSide(), Graphics::Aurora::FadeQuad::fadeIn(), Graphics::Aurora::FadeQuad::fadeOut(), Engines::KotOR::Situated::show(), Engines::KotOR2::Situated::show(), Engines::KotOR::Room::show(), Engines::KotOR2::Room::show(), Engines::ConsoleWindow::show(), Graphics::Aurora::Model::show(), Engines::NWN::DialogBox::show(), Engines::KotORJadeWidget::show(), Engines::NWN::WidgetScrollbar::show(), Engines::NWN::PortraitWidget::show(), Engines::Sonic::Game::showChapter1(), Engines::Sonic::Game::showLicenseSplash(), Engines::Sonic::Game::showMainMenu(), Engines::Sonic::Game::showQuote(), Engines::Sonic::Game::showTitle(), and Video::VideoDecoder::start().
|
protected |
Definition at line 145 of file renderable.cpp.
References GfxMan.
Referenced by Graphics::Aurora::Model::setState(), and Graphics::Aurora::ModelNode::unlockFrame().
|
protected |
Definition at line 154 of file renderable.cpp.
References GfxMan, and isVisible().
Referenced by Graphics::Aurora::Text::set(), Graphics::Aurora::GUIQuad::setColor(), Graphics::Aurora::Text::setColor(), Graphics::Aurora::Model::setEnvironmentMap(), Graphics::Aurora::GUIQuad::setHeight(), Graphics::Aurora::Model::setOrientation(), Graphics::Aurora::BorderQuad::setPosition(), Graphics::Aurora::GeometryObject::setPosition(), Graphics::Aurora::GUIQuad::setPosition(), Graphics::Aurora::Text::setPosition(), Graphics::Aurora::Model::setPosition(), Graphics::Aurora::GeometryObject::setRotation(), Graphics::Aurora::Model::setScale(), Graphics::Aurora::GUIQuad::setScissor(), Graphics::Aurora::Text::setSize(), Graphics::Aurora::Text::setText(), Graphics::Aurora::GUIQuad::setTexture(), Graphics::Aurora::GUIQuad::setWidth(), Graphics::Aurora::GUIQuad::setXOR(), and Graphics::Aurora::ModelNode::unlockFrameIfVisible().
|
protected |
Definition at line 98 of file renderable.h.
Referenced by isClickable(), and setClickable().
|
protected |
The distance of the object from the viewer.
Definition at line 101 of file renderable.h.
Referenced by Engines::Sonic::AreaBackground::AreaBackground(), Graphics::Aurora::BorderQuad::BorderQuad(), Graphics::Aurora::CubeSide::calculateDistance(), Graphics::Aurora::GeometryObject::calculateDistance(), Engines::NWN::Scrollbar::calculateDistance(), Engines::ConsoleWindow::calculateDistance(), Engines::NWN::DialogBox::calculateDistance(), Graphics::Aurora::Model::calculateDistance(), getDistance(), Graphics::Aurora::BorderQuad::getPosition(), Graphics::Aurora::GUIQuad::getPosition(), Graphics::Aurora::Text::getPosition(), Engines::NWN::Portrait::getPosition(), Engines::KotOR::GUIBackground::GUIBackground(), Engines::Jade::GUIBackground::GUIBackground(), Graphics::Aurora::GUIQuad::GUIQuad(), operator<(), Graphics::Aurora::SubSceneQuad::setDistance(), Graphics::Aurora::BorderQuad::setPosition(), Graphics::Aurora::GUIQuad::setPosition(), Graphics::Aurora::Text::setPosition(), Engines::NWN::Portrait::setPosition(), Graphics::Aurora::SubSceneQuad::SubSceneQuad(), and Graphics::Aurora::Text::Text().
|
protected |
Definition at line 96 of file renderable.h.
Referenced by getID(), Video::Bink::BinkVideoTrack::readColors(), and Renderable().
|
protected |
Definition at line 93 of file renderable.h.
Referenced by Renderable(), and ~Renderable().
|
protected |
Definition at line 94 of file renderable.h.
Referenced by hide(), isVisible(), Renderable(), resort(), and show().
|
protected |
Definition at line 99 of file renderable.h.