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

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

Inheritance diagram for Nz::SkyboxBackground:
Nz::AbstractBackground Nz::RefCounted

Public Member Functions

 SkyboxBackground (TextureRef cubemapTexture=TextureRef())
 Constructs a SkyboxBackground object with a cubemap 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 Vector3fGetMovementOffset () const
 Gets the movement offset. More...
 
float GetMovementScale () const
 Gets the movement scale. More...
 
const TextureRefGetTexture () const
 Gets the texture of the background. More...
 
TextureSampler & GetTextureSampler ()
 Gets the texture sampler of the background. More...
 
const TextureSampler & GetTextureSampler () const
 Gets the texture sampler of the background. More...
 
void SetMovementOffset (const Vector3f &offset)
 Sets the movement offset. More...
 
void SetMovementScale (float scale)
 Sets the movement scale. More...
 
void SetTexture (TextureRef cubemapTexture)
 Sets the texture of the background. More...
 
void SetTextureSampler (const TextureSampler &sampler)
 Sets the texture sampler 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 SkyboxBackgroundRef New (Args &&... args)
 Creates a new skybox background from the arguments. More...
 

Friends

class Graphics
 

Detailed Description

Graphics class that represents a background with a cubemap texture.

Constructor & Destructor Documentation

◆ SkyboxBackground()

Nz::SkyboxBackground::SkyboxBackground ( TextureRef  cubemapTexture = TextureRef())

Constructs a SkyboxBackground object with a cubemap texture.

Parameters
cubemapTextureCubemap texture

Member Function Documentation

◆ Draw()

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

Draws this relatively to the viewer.

Parameters
viewerViewer for the background

Implements Nz::AbstractBackground.

◆ GetBackgroundType()

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

Gets the background type.

Returns
Type of background

Implements Nz::AbstractBackground.

◆ GetMovementOffset()

const Vector3f & Nz::SkyboxBackground::GetMovementOffset ( ) const
inline

Gets the movement offset.

Returns
Offset of the movement

◆ GetMovementScale()

float Nz::SkyboxBackground::GetMovementScale ( ) const
inline

Gets the movement scale.

Returns
Scale of the movement

◆ GetTexture()

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

Gets the texture of the background.

Returns
Texture of the background

◆ GetTextureSampler() [1/2]

TextureSampler & Nz::SkyboxBackground::GetTextureSampler ( )
inline

Gets the texture sampler of the background.

Returns
A reference to the texture sampler of the background

◆ GetTextureSampler() [2/2]

const TextureSampler & Nz::SkyboxBackground::GetTextureSampler ( ) const
inline

Gets the texture sampler of the background.

Returns
A constant reference to the texture sampler of the background

◆ New()

template<typename... Args>
SkyboxBackgroundRef Nz::SkyboxBackground::New ( Args &&...  args)
static

Creates a new skybox background from the arguments.

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

◆ SetMovementOffset()

void Nz::SkyboxBackground::SetMovementOffset ( const Vector3f offset)
inline

Sets the movement offset.

Parameters
offsetOffset of the movement

◆ SetMovementScale()

void Nz::SkyboxBackground::SetMovementScale ( float  scale)
inline

Sets the movement scale.

Parameters
scaleScale of the movement

◆ SetTexture()

void Nz::SkyboxBackground::SetTexture ( TextureRef  cubemapTexture)
inline

Sets the texture of the background.

Parameters
cubemapTextureTexture of the background

◆ SetTextureSampler()

void Nz::SkyboxBackground::SetTextureSampler ( const TextureSampler &  sampler)
inline

Sets the texture sampler of the background.

Parameters
samplerTexture sampler of the background

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