Public Member Functions | |
| RenderEntry (Resources::ItemVisual *owner, const Common::String &name) | |
| void | render (const LightEntryArray &lights=LightEntryArray()) |
| void | setVisual (Visual *visual) |
| void | setPosition (const Common::Point &position) |
| void | setPosition3D (const Math::Vector3d &position, float direction) |
| void | setSortKey (float sortKey) |
| void | setClickable (bool clickable) |
| Common::Point | getPosition () const |
| Resources::ItemVisual * | getOwner () const |
| const Common::String & | getName () const |
| VisualImageXMG * | getImage () const |
| VisualText * | getText () const |
| bool | containsPoint (const Common::Point &position, Common::Point &relativePosition, const Common::Rect &cursorRect) const |
| bool | intersectRay (const Math::Ray &ray) const |
| Common::Rect | getBoundingRect () const |
Static Public Member Functions | |
| static bool | compare (const RenderEntry *x, const RenderEntry *y) |
Protected Attributes | |
| Common::String | _name |
| Resources::ItemVisual * | _owner |
| Visual * | _visual |
| Common::Point | _position |
| Math::Vector3d | _position3D |
| float | _direction3D |
| float | _sortKey |
| bool | _clickable |
|
inline |
Gets the position
|
inline |
Gets the owner-object
|
inline |
Gets the entry's name
| VisualImageXMG* Stark::Gfx::RenderEntry::getImage | ( | ) | const |
Obtain the underlying image visual, if any
| VisualText* Stark::Gfx::RenderEntry::getText | ( | ) | const |
Obtain the underlying text visual, if any
| bool Stark::Gfx::RenderEntry::containsPoint | ( | const Common::Point & | position, |
| Common::Point & | relativePosition, | ||
| const Common::Rect & | cursorRect | ||
| ) | const |
Mouse picking test for 2D items
| position | game window coordinates to test |
| relativePosition | successful hit item relative coordinates |
| cursorRect | cursor rectangle to be used to test small world items |
| bool Stark::Gfx::RenderEntry::intersectRay | ( | const Math::Ray & | ray | ) | const |
Mouse picking test for 3D items
|
static |
Compare two render entries by their sort keys
| Common::Rect Stark::Gfx::RenderEntry::getBoundingRect | ( | ) | const |
Compute the 2D screen space bounding rect for the item, in original game view coordinates.