Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::TextureBackground Class Reference

Graphics class that represents a background with a texture. More...

Inheritance diagram for Nz::TextureBackground:
Nz::AbstractBackground Nz::RefCounted

Public Member Functions

 TextureBackground (TextureRef texture=TextureRef())
 Constructs a TextureBackground object with a texture. More...
 
void Draw (const AbstractViewer *viewer) const override
 Draws this relatively to the viewer. More...
 
BackgroundType GetBackgroundType () const override
 Gets the background type. More...
 
const TextureRefGetTexture () const
 Gets the texture of the background. More...
 
void SetTexture (TextureRef texture)
 Sets the texture of the background. More...
 
- Public Member Functions inherited from Nz::AbstractBackground
 AbstractBackground (const AbstractBackground &)=default
 
 AbstractBackground (AbstractBackground &&)=delete
 
AbstractBackgroundoperator= (const AbstractBackground &)=default
 
AbstractBackgroundoperator= (AbstractBackground &&)=delete
 
- Public Member Functions inherited from Nz::RefCounted
 RefCounted (bool persistent=true)
 Constructs a RefCounted object with a persistance aspect. More...
 
 RefCounted (const RefCounted &)=delete
 
 RefCounted (RefCounted &&)=default
 
virtual ~RefCounted ()
 Destructs the object. More...
 
void AddReference () const
 Adds a reference to the object.
 
unsigned int GetReferenceCount () const
 Gets the number of references to the object. More...
 
bool IsPersistent () const
 Checks whether the object is persistent. More...
 
bool RemoveReference () const
 Removes a reference to the object. More...
 
bool SetPersistent (bool persistent=true, bool checkReferenceCount=false)
 Sets the persistence of the object. More...
 
RefCountedoperator= (const RefCounted &)=delete
 
RefCountedoperator= (RefCounted &&)=default
 

Static Public Member Functions

template<typename... Args>
static TextureBackgroundRef New (Args &&... args)
 Creates a new texture background from the arguments. More...
 

Detailed Description

Graphics class that represents a background with a texture.

Constructor & Destructor Documentation

◆ TextureBackground()

Nz::TextureBackground::TextureBackground ( TextureRef  texture = TextureRef())

Constructs a TextureBackground object with a texture.

Parameters
textureTexture

Member Function Documentation

◆ Draw()

void Nz::TextureBackground::Draw ( const AbstractViewer viewer) const
overridevirtual

Draws this relatively to the viewer.

Parameters
viewerViewer for the background

Implements Nz::AbstractBackground.

◆ GetBackgroundType()

BackgroundType Nz::TextureBackground::GetBackgroundType ( ) const
overridevirtual

Gets the background type.

Returns
Type of background

Implements Nz::AbstractBackground.

◆ GetTexture()

const TextureRef & Nz::TextureBackground::GetTexture ( ) const
inline

Gets the texture of the background.

Returns
Texture of the background

◆ New()

template<typename... Args>
TextureBackgroundRef Nz::TextureBackground::New ( Args &&...  args)
static

Creates a new texture background from the arguments.

Returns
A reference to the newly created texture background
Parameters
argsArguments for the texture background

◆ SetTexture()

void Nz::TextureBackground::SetTexture ( TextureRef  texture)
inline

Sets the texture of the background.

Parameters
textureTexture of the background

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