ScummVM API documentation
Stark::Gfx::RenderEntry Class Reference

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::ItemVisualgetOwner () const
 
const Common::StringgetName () const
 
VisualImageXMGgetImage () const
 
VisualTextgetText () 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
 

Member Function Documentation

◆ getPosition()

Common::Point Stark::Gfx::RenderEntry::getPosition ( ) const
inline

Gets the position

◆ getOwner()

Resources::ItemVisual* Stark::Gfx::RenderEntry::getOwner ( ) const
inline

Gets the owner-object

◆ getName()

const Common::String& Stark::Gfx::RenderEntry::getName ( ) const
inline

Gets the entry's name

◆ getImage()

VisualImageXMG* Stark::Gfx::RenderEntry::getImage ( ) const

Obtain the underlying image visual, if any

◆ getText()

VisualText* Stark::Gfx::RenderEntry::getText ( ) const

Obtain the underlying text visual, if any

◆ containsPoint()

bool Stark::Gfx::RenderEntry::containsPoint ( const Common::Point position,
Common::Point relativePosition,
const Common::Rect cursorRect 
) const

Mouse picking test for 2D items

Parameters
positiongame window coordinates to test
relativePositionsuccessful hit item relative coordinates
cursorRectcursor rectangle to be used to test small world items
Returns
successful hit

◆ intersectRay()

bool Stark::Gfx::RenderEntry::intersectRay ( const Math::Ray &  ray) const

Mouse picking test for 3D items

◆ compare()

static bool Stark::Gfx::RenderEntry::compare ( const RenderEntry x,
const RenderEntry y 
)
static

Compare two render entries by their sort keys

◆ getBoundingRect()

Common::Rect Stark::Gfx::RenderEntry::getBoundingRect ( ) const

Compute the 2D screen space bounding rect for the item, in original game view coordinates.


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