P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
SfmlSprite Class Reference

Sfml Sprite class - references a SfmlTexture, does not own it. Deleting the sprite never touches the texture. More...

#include <SfmlSprite.hpp>

Inheritance diagram for SfmlSprite:
Collaboration diagram for SfmlSprite:

Public Member Functions

 SfmlSprite (SfmlTexture &texture)
 ~SfmlSprite () override=default
bool isReady () const override
 notice if the sprite is ready
Rect< float > getBounds () const override
 give the bounds of the sprite
void setCrop (Rect< float > rect) override
 Crop the sprite with a rectangle.
Vector2f getPosition () const override
 Get the Position object.
void setPosition (Vector2f position) override
 Set the Position object.
float getRotation () const override
 Get the Rotation object.
void setRotation (float angle, bool isRad=false) override
 Set the Rotation object.
Vector2f getSize () const override
 Get the Sprite size.
void setSize (Vector2f size) override
 Set the Sprite size.
Public Member Functions inherited from graphic::ISprite
virtual ~ISprite ()=default
 Destroy the ISprite object.

Friends

class SfmlWindow

Detailed Description

Sfml Sprite class - references a SfmlTexture, does not own it. Deleting the sprite never touches the texture.

Constructor & Destructor Documentation

◆ SfmlSprite()

SfmlSprite::SfmlSprite ( SfmlTexture & texture)
inline

◆ ~SfmlSprite()

SfmlSprite::~SfmlSprite ( )
overridedefault

Member Function Documentation

◆ getBounds()

Rect< float > SfmlSprite::getBounds ( ) const
inlineoverridevirtual

give the bounds of the sprite

Returns
Vector4f

Implements graphic::ISprite.

◆ getPosition()

Vector2f SfmlSprite::getPosition ( ) const
inlineoverridevirtual

Get the Position object.

Returns
Vector2f

Implements graphic::ISprite.

◆ getRotation()

float SfmlSprite::getRotation ( ) const
inlineoverridevirtual

Get the Rotation object.

Returns
float

Implements graphic::ISprite.

◆ getSize()

Vector2f SfmlSprite::getSize ( ) const
inlineoverridevirtual

Get the Sprite size.

Returns
Vector4f

Implements graphic::ISprite.

◆ isReady()

bool SfmlSprite::isReady ( ) const
inlineoverridevirtual

notice if the sprite is ready

Returns
bool

Implements graphic::ISprite.

◆ setCrop()

void SfmlSprite::setCrop ( Rect< float > rect)
inlineoverridevirtual

Crop the sprite with a rectangle.

Parameters
rect

Implements graphic::ISprite.

◆ setPosition()

void SfmlSprite::setPosition ( Vector2f position)
inlineoverridevirtual

Set the Position object.

Parameters
position

Implements graphic::ISprite.

◆ setRotation()

void SfmlSprite::setRotation ( float angle,
bool isRad = false )
inlineoverridevirtual

Set the Rotation object.

Parameters
angle
isRad

Implements graphic::ISprite.

◆ setSize()

void SfmlSprite::setSize ( Vector2f size)
inlineoverridevirtual

Set the Sprite size.

Parameters
size

Implements graphic::ISprite.

◆ SfmlWindow

friend class SfmlWindow
friend

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