Castor3D  ..
Classes | Public Member Functions | List of all members
Castor3D::Sampler Class Referenceabstract

Defines a sampler for a texture. More...

+ Inheritance diagram for Castor3D::Sampler:
+ Collaboration diagram for Castor3D::Sampler:

Classes

class  BinaryParser
 Sampler loader. More...
 
class  TextLoader
 Sampler loader. More...
 

Public Member Functions

C3D_API Sampler (Engine &p_engine, Castor::String const &p_name=Castor::cuEmptyString)
 Constructor. More...
 
virtual C3D_API ~Sampler ()
 Destructor. More...
 
virtual C3D_API bool Initialise ()=0
 Initialises the sampler. More...
 
virtual C3D_API void Cleanup ()=0
 Cleanups the sampler. More...
 
virtual C3D_API bool Bind (uint32_t p_index) const =0
 Applies the sampler. More...
 
virtual C3D_API void Unbind (uint32_t p_index) const =0
 Removes the sampler. More...
 
eINTERPOLATION_MODE GetInterpolationMode (eINTERPOLATION_FILTER p_eFilter) const
 Retrieves the interpolation mode for given filter. More...
 
void SetInterpolationMode (eINTERPOLATION_FILTER p_eFilter, eINTERPOLATION_MODE p_mode)
 Defines the interpolation mode for given filter. More...
 
eWRAP_MODE GetWrappingMode (eTEXTURE_UVW p_eUVW) const
 Retrieves the wrapping mode for given dimension. More...
 
void SetWrappingMode (eTEXTURE_UVW p_eUVW, eWRAP_MODE p_mode)
 Defines the wrapping mode for given dimension. More...
 
real GetMaxAnisotropy () const
 Retrieves the maximal anisotropy filtering value. More...
 
void SetMaxAnisotropy (real p_rValue)
 Defines the maximal anisotropy filtering value. More...
 
real GetMinLod () const
 Retrieves the minimal LOD level. More...
 
void SetMinLod (real p_rLod)
 Defines the minimal LOD level. More...
 
real GetMaxLod () const
 Retrieves the maximal LOD level. More...
 
void SetMaxLod (real p_rLod)
 Defines the maximal LOD level. More...
 
real GetLodBias () const
 Retrieves the LOD bias. More...
 
void SetLodBias (real p_rLod)
 Defines the LOD bias. More...
 
Castor::Colour const & GetBorderColour () const
 Retrieves the texture border colour. More...
 
void SetBorderColour (Castor::Colour const &p_crColour)
 Defines the texture border colour. More...
 
Castor::String const & GetName () const
 Retrieves the sampler name. More...
 
void SetName (Castor::String const &p_name)
 Defines the sampler name. More...
 

Detailed Description

Defines a sampler for a texture.

Author
Sylvain DOREMUS
Date
25/03/2013
Version
0.7.0

Constructor & Destructor Documentation

◆ Sampler()

C3D_API Castor3D::Sampler::Sampler ( Engine p_engine,
Castor::String const &  p_name = Castor::cuEmptyString 
)

Constructor.

Parameters
[in]p_nameThe sampler name
[in]p_engineThe core engine

◆ ~Sampler()

virtual C3D_API Castor3D::Sampler::~Sampler ( )
virtual

Destructor.

Member Function Documentation

◆ Bind()

virtual C3D_API bool Castor3D::Sampler::Bind ( uint32_t  p_index) const
pure virtual

Applies the sampler.

Parameters
[in]p_indexThe sampler index
Returns
true if ok

◆ Cleanup()

virtual C3D_API void Castor3D::Sampler::Cleanup ( )
pure virtual

Cleanups the sampler.

◆ GetBorderColour()

Castor::Colour const& Castor3D::Sampler::GetBorderColour ( ) const
inline

Retrieves the texture border colour.

Returns
The colour

◆ GetInterpolationMode()

eINTERPOLATION_MODE Castor3D::Sampler::GetInterpolationMode ( eINTERPOLATION_FILTER  p_eFilter) const
inline

Retrieves the interpolation mode for given filter.

Parameters
[in]p_eFilterThe concerned filter
Returns
The interpolation mode

◆ GetLodBias()

real Castor3D::Sampler::GetLodBias ( ) const
inline

Retrieves the LOD bias.

Returns
The level

◆ GetMaxAnisotropy()

real Castor3D::Sampler::GetMaxAnisotropy ( ) const
inline

Retrieves the maximal anisotropy filtering value.

Returns
The value

◆ GetMaxLod()

real Castor3D::Sampler::GetMaxLod ( ) const
inline

Retrieves the maximal LOD level.

Returns
The level

◆ GetMinLod()

real Castor3D::Sampler::GetMinLod ( ) const
inline

Retrieves the minimal LOD level.

Returns
The level

◆ GetName()

Castor::String const& Castor3D::Sampler::GetName ( ) const
inline

Retrieves the sampler name.

Returns
The name

◆ GetWrappingMode()

eWRAP_MODE Castor3D::Sampler::GetWrappingMode ( eTEXTURE_UVW  p_eUVW) const
inline

Retrieves the wrapping mode for given dimension.

Parameters
[in]p_eUVWThe dimension
Returns
The wrapping mode

◆ Initialise()

virtual C3D_API bool Castor3D::Sampler::Initialise ( )
pure virtual

Initialises the sampler.

Returns
true if ok

◆ SetBorderColour()

void Castor3D::Sampler::SetBorderColour ( Castor::Colour const &  p_crColour)
inline

Defines the texture border colour.

Parameters
[in]p_crColourThe new value

◆ SetInterpolationMode()

void Castor3D::Sampler::SetInterpolationMode ( eINTERPOLATION_FILTER  p_eFilter,
eINTERPOLATION_MODE  p_mode 
)
inline

Defines the interpolation mode for given filter.

Parameters
[in]p_eFilterThe concerned filter
[in]p_modeThe wanted mode

◆ SetLodBias()

void Castor3D::Sampler::SetLodBias ( real  p_rLod)
inline

Defines the LOD bias.

Parameters
[in]p_rLodThe new value

◆ SetMaxAnisotropy()

void Castor3D::Sampler::SetMaxAnisotropy ( real  p_rValue)
inline

Defines the maximal anisotropy filtering value.

Parameters
[in]p_rValueThe new value

◆ SetMaxLod()

void Castor3D::Sampler::SetMaxLod ( real  p_rLod)
inline

Defines the maximal LOD level.

Parameters
[in]p_rLodThe new value

◆ SetMinLod()

void Castor3D::Sampler::SetMinLod ( real  p_rLod)
inline

Defines the minimal LOD level.

Parameters
[in]p_rLodThe new value

◆ SetName()

void Castor3D::Sampler::SetName ( Castor::String const &  p_name)
inline

Defines the sampler name.

Parameters
[in]p_nameThe name

◆ SetWrappingMode()

void Castor3D::Sampler::SetWrappingMode ( eTEXTURE_UVW  p_eUVW,
eWRAP_MODE  p_mode 
)
inline

Defines the wrapping mode for given dimension.

Parameters
[in]p_eUVWThe dimension
[in]p_modeThe wrapping mode

◆ Unbind()

virtual C3D_API void Castor3D::Sampler::Unbind ( uint32_t  p_index) const
pure virtual

Removes the sampler.

Parameters
[in]p_indexThe sampler index

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