Dualie
Loading...
Searching...
No Matches
dl::Transformable Class Reference

A base class for anything that has a position on the screen. More...

#include <Transformable.hpp>

Inheritance diagram for dl::Transformable:
Collaboration diagram for dl::Transformable:

Public Member Functions

virtual void setPosition (const dl::Vector2f &position)
 Sets the position of the transformable.
 
void setPosition (float x, float y)
 Sets the position of the transformable.
 
virtual void move (const dl::Vector2f &offset)
 Moves the transformable offset number of pixels.
 
void move (float xOffset, float yOffset)
 Moves the transformable offset number of pixels.
 
const dl::Vector2fgetPosition () const
 

Protected Attributes

dl::Vector2f m_position
 

Detailed Description

A base class for anything that has a position on the screen.

Member Function Documentation

◆ getPosition()

const dl::Vector2f & dl::Transformable::getPosition ( ) const
Returns
The transformable's position

◆ move() [1/2]

void dl::Transformable::move ( const dl::Vector2f & offset)
virtual

Moves the transformable offset number of pixels.

Parameters
offsetThe offset to move

Reimplemented in dl::Sprite.

◆ move() [2/2]

void dl::Transformable::move ( float xOffset,
float yOffset )

Moves the transformable offset number of pixels.

Parameters
xOffsetThe offset to move (X)
yOffsetThe offset to move (Y)

◆ setPosition() [1/2]

void dl::Transformable::setPosition ( const dl::Vector2f & position)
virtual

Sets the position of the transformable.

Parameters
positionThe position to set

Reimplemented in dl::Sprite.

◆ setPosition() [2/2]

void dl::Transformable::setPosition ( float x,
float y )

Sets the position of the transformable.

Parameters
xThe position to set (X)
yThe position to set (Y)

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