Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Public Attributes | Friends | List of all members
castor3d::TextureUnit Class Reference

#include <TextureUnit.hpp>

Inheritance diagram for castor3d::TextureUnit:
Inheritance graph
[legend]
Collaboration diagram for castor3d::TextureUnit:
Collaboration graph
[legend]

Public Member Functions

 TextureUnit (TextureUnit const &)=delete
 
TextureUnitoperator= (TextureUnit const &)=delete
 
C3D_API TextureUnit (TextureUnit &&rhs) noexcept
 
C3D_API TextureUnitoperator= (TextureUnit &&rhs) noexcept=delete
 
C3D_API TextureUnit (Engine &engine, TextureUnitData &data)
 Constructor.
 
C3D_API ~TextureUnit () noexcept override
 Destructor.
 
C3D_API bool initialise ()
 Creates the texture in the render system.
 
C3D_API void cleanup () noexcept
 Cleans up the texture.
 
C3D_API void setSampler (SamplerObs sampler)
 Sets the sampler.
 
C3D_API void setTexture (Texture const *texture)
 Sets the texture.
 
C3D_API TextureAnimationcreateAnimation ()
 Creates the animation.
 
C3D_API void removeAnimation ()
 Removes the animation.
 
C3D_API TextureAnimationgetAnimation ()
 
C3D_API TextureAnimation const & getAnimation () const
 
C3D_API VkImageType getType () const
 
C3D_API castor::String toString () const
 
C3D_API TextureFlagsSet getFlags () const
 
C3D_API bool isInitialised () const
 
C3D_API bool isTransformAnimated () const
 
C3D_API bool isTileAnimated () const
 
C3D_API ashes::Sampler const & getSampler () const
 
C3D_API RenderTargetRPtr getRenderTarget () const
 
C3D_API castor::String getTextureName () const
 
C3D_API castor::Path getTexturePath () const
 
C3D_API bool isTextureStatic () const
 
C3D_API VkFormat getTexturePixelFormat () const
 
C3D_API castor::Point3ui getTextureImageTiles () const
 
C3D_API bool hasTextureImageBuffer () const
 
C3D_API castor::PxBufferBase const & getTextureImageBuffer () const
 
C3D_API VkExtent3D getTextureDimensions () const
 
C3D_API uint32_t getTextureMipmapCount () const
 
TextureConfiguration const & getConfiguration () const noexcept
 
bool isTextured () const noexcept
 
bool isRenderTarget () const noexcept
 
ashes::WriteDescriptorSet getDescriptor () const noexcept
 
uint32_t getId () const noexcept
 
bool hasDevice () const noexcept
 
RenderDevice const & getDevice () const noexcept
 
bool hasAnimation () const noexcept
 
TextureTransform const & getTransform () const noexcept
 
TextureSourceInfo const & getSourceInfo () const noexcept
 
uint32_t getTexcoordSet () const noexcept
 
TextureUnitDatagetData () const noexcept
 
castor::Image const & getCPUImage () const noexcept
 
ashes::Image const & getGPUImage () const noexcept
 
bool failed () const noexcept
 
C3D_API void setConfiguration (TextureConfiguration value)
 
C3D_API void setTransform (castor::Point3f const &translate, castor::Angle const &rotate, castor::Point3f const &scale)
 
C3D_API void setTransform (TextureTransform const &transform)
 
C3D_API void setAnimationTransform (castor::Point3f const &translate, castor::Angle const &rotate, castor::Point3f const &scale)
 
C3D_API void setTexcoordSet (uint32_t value)
 
void setId (uint32_t value)
 
void reportFailure ()
 
- Public Member Functions inherited from castor3d::AnimableT< Engine >
virtual C3D_API ~AnimableT () noexcept=default
 
void cleanupAnimations ()
 Empties the animations map.
 
bool hasAnimation () const
 
bool hasAnimation (castor::String const &name) const
 
Animation const & getAnimation (castor::String const &name) const
 Retrieves an animation.
 
AnimationgetAnimation (castor::String const &name)
 Retrieves an animation.
 
void addAnimation (AnimationPtr animation)
 Adds an animation.
 
AnimationsMap const & getAnimations () const
 
- Public Member Functions inherited from castor::OwnedBy< Owner >
Owner * getOwner () const
 

Static Public Member Functions

static C3D_API void addParsers (castor::AttributeParsers &result, castor::UInt32StrMap const &textureChannels)
 

Public Attributes

OnTextureUnitChanged onChanged
 
OnTextureUnitChanged onIdChanged
 

Friends

class TextureRenderer
 

Additional Inherited Members

- Protected Types inherited from castor3d::AnimableT< Engine >
using Animation
 
using AnimationPtr
 
using AnimationsMap
 
- Protected Member Functions inherited from castor3d::AnimableT< Engine >
void doRemoveAnimation (castor::String const &name)
 Removes an animation.
 
AnimationTypedoGetAnimation (castor::String const &name)
 Retrieves an animation.
 
AnimationType const & doGetAnimation (castor::String const &name) const
 Retrieves an animation.
 
 AnimableT (Engine &owner)
 
C3D_API AnimableT (AnimableT &&rhs) noexcept=default
 
C3D_API AnimableT (AnimableT const &rhs)=delete
 
C3D_API AnimableToperator= (AnimableT &&rhs) noexcept=delete
 
C3D_API AnimableToperator= (AnimableT const &rhs)=delete
 
- Protected Member Functions inherited from castor::OwnedBy< Owner >
 OwnedBy (Owner &owner)
 Constructor.
 
- Protected Attributes inherited from castor3d::AnimableT< Engine >
AnimationsMap m_animations
 

Constructor & Destructor Documentation

◆ TextureUnit() [1/3]

castor3d::TextureUnit::TextureUnit ( TextureUnit const & )
delete

◆ TextureUnit() [2/3]

C3D_API castor3d::TextureUnit::TextureUnit ( TextureUnit && rhs)
noexcept

◆ TextureUnit() [3/3]

C3D_API castor3d::TextureUnit::TextureUnit ( Engine & engine,
TextureUnitData & data )
explicit

Constructor.

Parameters
engineThe engine.
dataThe texture informations.

◆ ~TextureUnit()

C3D_API castor3d::TextureUnit::~TextureUnit ( )
overridenoexcept

Destructor.

Member Function Documentation

◆ addParsers()

static C3D_API void castor3d::TextureUnit::addParsers ( castor::AttributeParsers & result,
castor::UInt32StrMap const & textureChannels )
static

name Parsers.

◆ cleanup()

C3D_API void castor3d::TextureUnit::cleanup ( )
noexcept

Cleans up the texture.

◆ createAnimation()

C3D_API TextureAnimation & castor3d::TextureUnit::createAnimation ( )

Creates the animation.

name Animation.

Returns
The animation

◆ failed()

bool castor3d::TextureUnit::failed ( ) const
inlinenoexcept

◆ getAnimation() [1/2]

C3D_API TextureAnimation & castor3d::TextureUnit::getAnimation ( )
Returns
The animation.

◆ getAnimation() [2/2]

C3D_API TextureAnimation const & castor3d::TextureUnit::getAnimation ( ) const
Returns
The animation.

◆ getConfiguration()

TextureConfiguration const & castor3d::TextureUnit::getConfiguration ( ) const
inlinenoexcept

◆ getCPUImage()

castor::Image const & castor3d::TextureUnit::getCPUImage ( ) const
inlinenoexcept

◆ getData()

TextureUnitData & castor3d::TextureUnit::getData ( ) const
inlinenoexcept

◆ getDescriptor()

ashes::WriteDescriptorSet castor3d::TextureUnit::getDescriptor ( ) const
inlinenoexcept

◆ getDevice()

RenderDevice const & castor3d::TextureUnit::getDevice ( ) const
inlinenoexcept

References CU_Require, and hasDevice().

Here is the call graph for this function:

◆ getFlags()

C3D_API TextureFlagsSet castor3d::TextureUnit::getFlags ( ) const

◆ getGPUImage()

ashes::Image const & castor3d::TextureUnit::getGPUImage ( ) const
inlinenoexcept

References CU_Require.

◆ getId()

uint32_t castor3d::TextureUnit::getId ( ) const
inlinenoexcept

◆ getRenderTarget()

C3D_API RenderTargetRPtr castor3d::TextureUnit::getRenderTarget ( ) const

◆ getSampler()

C3D_API ashes::Sampler const & castor3d::TextureUnit::getSampler ( ) const

◆ getSourceInfo()

TextureSourceInfo const & castor3d::TextureUnit::getSourceInfo ( ) const
inlinenoexcept

◆ getTexcoordSet()

uint32_t castor3d::TextureUnit::getTexcoordSet ( ) const
inlinenoexcept

◆ getTextureDimensions()

C3D_API VkExtent3D castor3d::TextureUnit::getTextureDimensions ( ) const

◆ getTextureImageBuffer()

C3D_API castor::PxBufferBase const & castor3d::TextureUnit::getTextureImageBuffer ( ) const

◆ getTextureImageTiles()

C3D_API castor::Point3ui castor3d::TextureUnit::getTextureImageTiles ( ) const

◆ getTextureMipmapCount()

C3D_API uint32_t castor3d::TextureUnit::getTextureMipmapCount ( ) const

◆ getTextureName()

C3D_API castor::String castor3d::TextureUnit::getTextureName ( ) const

◆ getTexturePath()

C3D_API castor::Path castor3d::TextureUnit::getTexturePath ( ) const

◆ getTexturePixelFormat()

C3D_API VkFormat castor3d::TextureUnit::getTexturePixelFormat ( ) const

◆ getTransform()

TextureTransform const & castor3d::TextureUnit::getTransform ( ) const
inlinenoexcept

◆ getType()

C3D_API VkImageType castor3d::TextureUnit::getType ( ) const

name Getters.

◆ hasAnimation()

bool castor3d::TextureUnit::hasAnimation ( ) const
inlinenoexcept

References cuT, and hasAnimation().

Referenced by hasAnimation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasDevice()

bool castor3d::TextureUnit::hasDevice ( ) const
inlinenoexcept

Referenced by getDevice().

Here is the caller graph for this function:

◆ hasTextureImageBuffer()

C3D_API bool castor3d::TextureUnit::hasTextureImageBuffer ( ) const

◆ initialise()

C3D_API bool castor3d::TextureUnit::initialise ( )

Creates the texture in the render system.

◆ isInitialised()

C3D_API bool castor3d::TextureUnit::isInitialised ( ) const

◆ isRenderTarget()

bool castor3d::TextureUnit::isRenderTarget ( ) const
inlinenoexcept

◆ isTextured()

bool castor3d::TextureUnit::isTextured ( ) const
inlinenoexcept

◆ isTextureStatic()

C3D_API bool castor3d::TextureUnit::isTextureStatic ( ) const

◆ isTileAnimated()

C3D_API bool castor3d::TextureUnit::isTileAnimated ( ) const

◆ isTransformAnimated()

C3D_API bool castor3d::TextureUnit::isTransformAnimated ( ) const

◆ operator=() [1/2]

C3D_API TextureUnit & castor3d::TextureUnit::operator= ( TextureUnit && rhs)
deletenoexcept

◆ operator=() [2/2]

TextureUnit & castor3d::TextureUnit::operator= ( TextureUnit const & )
delete

◆ removeAnimation()

C3D_API void castor3d::TextureUnit::removeAnimation ( )

Removes the animation.

◆ reportFailure()

void castor3d::TextureUnit::reportFailure ( )
inline

◆ setAnimationTransform()

C3D_API void castor3d::TextureUnit::setAnimationTransform ( castor::Point3f const & translate,
castor::Angle const & rotate,
castor::Point3f const & scale )

◆ setConfiguration()

C3D_API void castor3d::TextureUnit::setConfiguration ( TextureConfiguration value)

name Mutators.

◆ setId()

void castor3d::TextureUnit::setId ( uint32_t value)
inline

References onIdChanged.

◆ setSampler()

C3D_API void castor3d::TextureUnit::setSampler ( SamplerObs sampler)

Sets the sampler.

Parameters
[in]samplerThe sampler.

◆ setTexcoordSet()

C3D_API void castor3d::TextureUnit::setTexcoordSet ( uint32_t value)

◆ setTexture()

C3D_API void castor3d::TextureUnit::setTexture ( Texture const * texture)

Sets the texture.

Parameters
[in]textureThe texture.

◆ setTransform() [1/2]

C3D_API void castor3d::TextureUnit::setTransform ( castor::Point3f const & translate,
castor::Angle const & rotate,
castor::Point3f const & scale )

◆ setTransform() [2/2]

C3D_API void castor3d::TextureUnit::setTransform ( TextureTransform const & transform)

◆ toString()

C3D_API castor::String castor3d::TextureUnit::toString ( ) const

Friends And Related Symbol Documentation

◆ TextureRenderer

friend class TextureRenderer
friend

Member Data Documentation

◆ onChanged

OnTextureUnitChanged castor3d::TextureUnit::onChanged

◆ onIdChanged

OnTextureUnitChanged castor3d::TextureUnit::onIdChanged

Referenced by setId().


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