Kanzi 4.0.0-beta2
kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount > Class Template Reference

Implementation of base Mipmap Generation Concept class for derived classes. More...

#include <kanzi/core.ui/graphics3d/mipmap_generation_concept_impl.hpp>

Inheritance diagram for kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >:
[legend]

Classes

class  MipmapAttachment
 Container for data related to rendering into a single mipmap attachment. More...
 
class  MipmapFramebufferLevel
 Mipmap framebuffer level. More...
 
class  MipmapRenderData
 Defines the data required when custom mipmap material has been specified. More...
 

Public Member Functions

MaterialSharedPtr getColorMipmapMaterial0 () const
 Gets the value of the ColorMipmapMaterial0Property property.
 
MaterialSharedPtr getColorMipmapMaterial1 () const
 Gets the value of the ColorMipmapMaterial1Property property.
 
MaterialSharedPtr getColorMipmapMaterial2 () const
 Gets the value of the ColorMipmapMaterial2Property property.
 
MaterialSharedPtr getColorMipmapMaterial3 () const
 Gets the value of the ColorMipmapMaterial3Property property.
 
MaterialSharedPtr getCubemapMipmapMaterial () const
 Gets the value of the CubemapMipmapMaterialProperty property.
 
float getCurrentMipmapLevel () const
 Gets the value of the CurrentMipmapLevelProperty property.
 
MaterialSharedPtr getDepthMipmapMaterial () const
 Gets the value of the DepthMipmapMaterialProperty property.
 
TextureSharedPtr getMipmapSourceTexture () const
 Gets the value of the MipmapSourceTextureProperty property.
 
void setColorMipmapMaterial0 (MaterialSharedPtr value)
 Sets the value of the ColorMipmapMaterial0Property property.
 
void setColorMipmapMaterial1 (MaterialSharedPtr value)
 Sets the value of the ColorMipmapMaterial1Property property.
 
void setColorMipmapMaterial2 (MaterialSharedPtr value)
 Sets the value of the ColorMipmapMaterial2Property property.
 
void setColorMipmapMaterial3 (MaterialSharedPtr value)
 Sets the value of the ColorMipmapMaterial3Property property.
 
void setCubemapMipmapMaterial (MaterialSharedPtr value)
 Sets the value of the CubemapMipmapMaterialProperty property.
 
void setCurrentMipmapLevel (float value)
 Sets the value of the CurrentMipmapLevelProperty property.
 
void setDepthMipmapMaterial (MaterialSharedPtr value)
 Sets the value of the DepthMipmapMaterialProperty property.
 
void setMipmapSourceTexture (TextureSharedPtr value)
 Sets the value of the MipmapSourceTextureProperty property.
 

Static Public Member Functions

static string faceIndexToString (size_t faceIndex)
 Converts face index to string.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static string makeMipmapFramebufferLabel (string_view name, size_t faceIndex, size_t mipmapLevel)
 Creates a mipmap level name.
 
- Static Public Member Functions inherited from kanzi::MipmapGenerationConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Member Functions

MipmapRenderDataensureMipmapData ()
 Allocates the mipmap render data if it's not allocated yet.
 
void eraseMipmapAttachmentData (size_t attachmentIndex)
 Erases a mipmap attachment.
 
TDerivedClassgetThisObject ()
 Gets the pointer to this object (CRTP).
 
const TDerivedClassgetThisObject () const
 Gets the pointer to this object (CRTP) (const version).
 
 MipmapGenerationConceptImpl (Domain *domain, string_view name)
 Constructor.
 
void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Object::onPropertyChanged() implementation.
 

Protected Attributes

unique_ptr< MipmapRenderDatam_mipmapRenderData
 Mipmap generation data.
 

Additional Inherited Members

- Static Public Attributes inherited from kanzi::MipmapGenerationConcept
static PropertyType< ResourceSharedPtrColorMipmapMaterial0Property
 Sets the material to use to generate the mipmaps for the first color result texture (Result Texture 0) of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrColorMipmapMaterial1Property
 Sets the material to use to generate the mipmaps for the second color result texture (Result Texture 1) of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrColorMipmapMaterial2Property
 Sets the material to use to generate the mipmaps for the third color result texture (Result Texture 2) of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrColorMipmapMaterial3Property
 Sets the material to use to generate the mipmaps for the fourth color result texture (Result Texture 3) of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrCubemapMipmapMaterialProperty
 Sets the material to use to generate the mipmaps for the Result Texture of a CubeMapRenderPass.
 
static PropertyType< floatCurrentMipmapLevelProperty
 Reports the mipmap level that Kanzi is generating.
 
static PropertyType< ResourceSharedPtrDepthMipmapMaterialProperty
 Sets the material to use to generate the mipmaps for the Result Depth Texture of a CompositionTargetRenderPass.
 
static PropertyType< ResourceSharedPtrMipmapSourceTextureProperty
 Reports the texture that contains the render target texture for which Kanzi creates mipmaps.
 

Detailed Description

template<typename TBaseClass, typename TDerivedClass, size_t FaceCount>
class kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >

Implementation of base Mipmap Generation Concept class for derived classes.

Template Parameters
TBaseClassType of the base class, derived from RenderPass.
TDerivedClassType of the derived class that holds the Mipmap Generation properties.
Since
Kanzi 4.0.0

Constructor & Destructor Documentation

◆ MipmapGenerationConceptImpl()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapGenerationConceptImpl ( Domain * domain,
string_view name )
explicitprotected

Constructor.

Parameters
domainDomain to use.
nameName of the object being created.

Member Function Documentation

◆ faceIndexToString()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
static string kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::faceIndexToString ( size_t faceIndex)
inlinestatic

Converts face index to string.

Parameters
faceIndexFace index.
Returns
String representation.

◆ makeMipmapFramebufferLabel()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
static string kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::makeMipmapFramebufferLabel ( string_view name,
size_t faceIndex,
size_t mipmapLevel )
inlinestatic

Creates a mipmap level name.

Parameters
nameName of framebuffer.
faceIndexIndex of the texture face.
mipmapLevelMipmap level.
Returns
Object label.

◆ makeEditorInfo()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
static PropertyTypeEditorInfoSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::makeEditorInfo ( )
inlinestatic

◆ setCubemapMipmapMaterial()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::setCubemapMipmapMaterial ( MaterialSharedPtr value)
inline

Sets the value of the CubemapMipmapMaterialProperty property.

Parameters
valueThe new value of the CubemapMipmapMaterial property.
See also
getCubemapMipmapMaterial()

◆ getCubemapMipmapMaterial()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MaterialSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getCubemapMipmapMaterial ( ) const
inline

Gets the value of the CubemapMipmapMaterialProperty property.

Returns
The value of the CubemapMipmapMaterial property.
See also
setCubemapMipmapMaterial()

◆ setColorMipmapMaterial0()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::setColorMipmapMaterial0 ( MaterialSharedPtr value)
inline

Sets the value of the ColorMipmapMaterial0Property property.

Parameters
valueThe new value of the ColorMipmapMaterial0 property.
See also
getColorMipmapMaterial0()

◆ getColorMipmapMaterial0()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MaterialSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getColorMipmapMaterial0 ( ) const
inline

Gets the value of the ColorMipmapMaterial0Property property.

Returns
The value of the ColorMipmapMaterial0 property.
See also
setColorMipmapMaterial0()

◆ setColorMipmapMaterial1()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::setColorMipmapMaterial1 ( MaterialSharedPtr value)
inline

Sets the value of the ColorMipmapMaterial1Property property.

Parameters
valueThe new value of the ColorMipmapMaterial1 property.
See also
getColorMipmapMaterial1()

◆ getColorMipmapMaterial1()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MaterialSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getColorMipmapMaterial1 ( ) const
inline

Gets the value of the ColorMipmapMaterial1Property property.

Returns
The value of the ColorMipmapMaterial1 property.
See also
setColorMipmapMaterial1()

◆ setColorMipmapMaterial2()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::setColorMipmapMaterial2 ( MaterialSharedPtr value)
inline

Sets the value of the ColorMipmapMaterial2Property property.

Parameters
valueThe new value of the ColorMipmapMaterial2 property.
See also
getColorMipmapMaterial2()

◆ getColorMipmapMaterial2()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MaterialSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getColorMipmapMaterial2 ( ) const
inline

Gets the value of the ColorMipmapMaterial2Property property.

Returns
The value of the ColorMipmapMaterial2 property.
See also
setColorMipmapMaterial2()

◆ setColorMipmapMaterial3()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::setColorMipmapMaterial3 ( MaterialSharedPtr value)
inline

Sets the value of the ColorMipmapMaterial3Property property.

Parameters
valueThe new value of the ColorMipmapMaterial3 property.
See also
getColorMipmapMaterial3()

◆ getColorMipmapMaterial3()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MaterialSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getColorMipmapMaterial3 ( ) const
inline

Gets the value of the ColorMipmapMaterial3Property property.

Returns
The value of the ColorMipmapMaterial3 property.
See also
setColorMipmapMaterial3()

◆ setDepthMipmapMaterial()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::setDepthMipmapMaterial ( MaterialSharedPtr value)
inline

Sets the value of the DepthMipmapMaterialProperty property.

Parameters
valueThe new value of the DepthMipmapMaterial property.
See also
getDepthMipmapMaterial()

◆ getDepthMipmapMaterial()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MaterialSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getDepthMipmapMaterial ( ) const
inline

Gets the value of the DepthMipmapMaterialProperty property.

Returns
The value of the DepthMipmapMaterial property.
See also
setDepthMipmapMaterial()

◆ setCurrentMipmapLevel()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::setCurrentMipmapLevel ( float value)
inline

Sets the value of the CurrentMipmapLevelProperty property.

Parameters
valueThe new value of the CurrentMipmapLevel property.
See also
getCurrentMipmapLevel()

◆ getCurrentMipmapLevel()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
float kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getCurrentMipmapLevel ( ) const
inline

Gets the value of the CurrentMipmapLevelProperty property.

Returns
The value of the CurrentMipmapLevel property.
See also
setCurrentMipmapLevel()

◆ setMipmapSourceTexture()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::setMipmapSourceTexture ( TextureSharedPtr value)
inline

Sets the value of the MipmapSourceTextureProperty property.

Parameters
valueThe new value of the MipmapSourceTexture property.
See also
getMipmapSourceTexture()

◆ getMipmapSourceTexture()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
TextureSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getMipmapSourceTexture ( ) const
inline

Gets the value of the MipmapSourceTextureProperty property.

Returns
The value of the MipmapTexture property.

◆ getThisObject() [1/2]

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
TDerivedClass * kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getThisObject ( )
inlineprotected

Gets the pointer to this object (CRTP).

Returns
This pointer.

◆ getThisObject() [2/2]

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
const TDerivedClass * kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::getThisObject ( ) const
inlineprotected

Gets the pointer to this object (CRTP) (const version).

Returns
This pointer.

◆ ensureMipmapData()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapRenderData & kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::ensureMipmapData ( )
protected

Allocates the mipmap render data if it's not allocated yet.

Returns
Reference to mipmap render data.

◆ eraseMipmapAttachmentData()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::eraseMipmapAttachmentData ( size_t attachmentIndex)
protected

Erases a mipmap attachment.

If there are no attachments remaining, erases the mipmap render data entirely.

Parameters
attachmentIndexAttachment index.

◆ onPropertyChanged()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::onPropertyChanged ( AbstractPropertyType propertyType,
PropertyNotificationReason reason )
overrideprotected

Object::onPropertyChanged() implementation.

Member Data Documentation

◆ m_mipmapRenderData

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
unique_ptr<MipmapRenderData> kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::m_mipmapRenderData
protected

Mipmap generation data.


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