YAPOG  0.0.1
Yet Another Pokemon Online Game
yap::Texture Class Reference

Base graphical element. Overlay of SFML Sprite. More...

#include <Texture.hpp>

Inheritance diagram for yap::Texture:
Collaboration diagram for yap::Texture:

List of all members.

Public Member Functions

 Texture ()
 Texture (const ID &id)
 Texture (const String &name)
 Texture (const String &name, const sf::IntRect &rect)
virtual ~Texture ()
void LoadFromFile (const String &name)
void SetRect (const sf::IntRect &rect)
const IDGetID () const
void SetID (const ID &id)
ISpatial members.
virtual const Vector2GetPosition () const
 Gets the coordinates in pixels of the origin of this ISpatial from the global origin.
virtual const Vector2GetSize () const
 Gets the size in pixels of this ISpatial.
virtual const Vector2GetTopLeft () const
virtual const Vector2GetBottomRight () const
virtual const Vector2GetCenter () const
virtual const FloatRectGetRectangle () const
virtual void Move (const Vector2 &offset)
virtual void Scale (const Vector2 &factor)
virtual void SetPosition (const Vector2 &position)
virtual void SetSize (const Vector2 &size)
IDrawable members.
virtual void Draw (IDrawingContext &context)
virtual bool IsVisible () const
virtual void Show (bool isVisible)
virtual void ChangeColor (const sf::Color &color)
ICloneable members.
virtual TextureClone () const
- Public Member Functions inherited from yap::ISpatial
virtual ~ISpatial ()
- Public Member Functions inherited from yap::IDrawable
virtual ~IDrawable ()
- Public Member Functions inherited from yap::IIDLoadable
virtual ~IIDLoadable ()
- Public Member Functions inherited from yap::ICloneable
virtual ~ICloneable ()

Protected Member Functions

 Texture (const Texture &copy)

Private Member Functions

 DISALLOW_ASSIGN (Texture)

Private Attributes

SpatialInfo spatialInfo_
sf::Texture * innerTexture_
sf::Sprite sprite_
bool isVisible_
ID id_

Static Private Attributes

static const bool DEFAULT_VISIBLE_STATE = true

Detailed Description

Base graphical element. Overlay of SFML Sprite.

Definition at line 21 of file Texture.hpp.


Constructor & Destructor Documentation

yap::Texture::Texture ( )

Definition at line 9 of file Texture.cpp.

Here is the caller graph for this function:

yap::Texture::Texture ( const ID id)
explicit

Definition at line 18 of file Texture.cpp.

yap::Texture::Texture ( const String name)
explicit

Definition at line 27 of file Texture.cpp.

Here is the call graph for this function:

yap::Texture::Texture ( const String name,
const sf::IntRect &  rect 
)

Definition at line 37 of file Texture.cpp.

Here is the call graph for this function:

yap::Texture::~Texture ( )
virtual

Definition at line 48 of file Texture.cpp.

yap::Texture::Texture ( const Texture copy)
protected

Definition at line 165 of file Texture.cpp.


Member Function Documentation

void yap::Texture::ChangeColor ( const sf::Color &  color)
virtual

Implements yap::IDrawable.

Definition at line 155 of file Texture.cpp.

Here is the caller graph for this function:

Texture * yap::Texture::Clone ( ) const
virtual

Implements yap::ICloneable.

Definition at line 160 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

yap::Texture::DISALLOW_ASSIGN ( Texture  )
private
void yap::Texture::Draw ( IDrawingContext context)
virtual

Implements yap::IDrawable.

Definition at line 137 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const Vector2 & yap::Texture::GetBottomRight ( ) const
virtual

Implements yap::ISpatial.

Definition at line 92 of file Texture.cpp.

Here is the call graph for this function:

const Vector2 & yap::Texture::GetCenter ( ) const
virtual

Implements yap::ISpatial.

Definition at line 97 of file Texture.cpp.

Here is the call graph for this function:

const ID & yap::Texture::GetID ( ) const

Definition at line 67 of file Texture.cpp.

const Vector2 & yap::Texture::GetPosition ( ) const
virtual

Gets the coordinates in pixels of the origin of this ISpatial from the global origin.

Returns:
The coordinates in pixels of the origin of this ISpatial from the global origin.

Implements yap::ISpatial.

Definition at line 77 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const sf::FloatRect & yap::Texture::GetRectangle ( ) const
virtual

Implements yap::ISpatial.

Definition at line 102 of file Texture.cpp.

Here is the call graph for this function:

const Vector2 & yap::Texture::GetSize ( ) const
virtual

Gets the size in pixels of this ISpatial.

Returns:
The size in pixels of this ISpatial.

Implements yap::ISpatial.

Definition at line 82 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const Vector2 & yap::Texture::GetTopLeft ( ) const
virtual

Implements yap::ISpatial.

Definition at line 87 of file Texture.cpp.

Here is the call graph for this function:

bool yap::Texture::IsVisible ( ) const
virtual

Implements yap::IDrawable.

Definition at line 145 of file Texture.cpp.

void yap::Texture::LoadFromFile ( const String name)

Definition at line 52 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Texture::Move ( const Vector2 offset)
virtual

Implements yap::ISpatial.

Definition at line 107 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Texture::Scale ( const Vector2 factor)
virtual

Implements yap::ISpatial.

Definition at line 114 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Texture::SetID ( const ID id)

Definition at line 72 of file Texture.cpp.

Here is the caller graph for this function:

void yap::Texture::SetPosition ( const Vector2 position)
virtual

Implements yap::ISpatial.

Definition at line 124 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Texture::SetRect ( const sf::IntRect &  rect)

Definition at line 60 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Texture::SetSize ( const Vector2 size)
virtual

Implements yap::ISpatial.

Definition at line 129 of file Texture.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Texture::Show ( bool  isVisible)
virtual

Implements yap::IDrawable.

Definition at line 150 of file Texture.cpp.


Member Data Documentation

const bool yap::Texture::DEFAULT_VISIBLE_STATE = true
staticprivate

Definition at line 81 of file Texture.hpp.

ID yap::Texture::id_
private

Definition at line 89 of file Texture.hpp.

sf::Texture* yap::Texture::innerTexture_
private

Definition at line 84 of file Texture.hpp.

bool yap::Texture::isVisible_
private

Definition at line 87 of file Texture.hpp.

SpatialInfo yap::Texture::spatialInfo_
private

Definition at line 83 of file Texture.hpp.

sf::Sprite yap::Texture::sprite_
private

Definition at line 85 of file Texture.hpp.


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