Castor3D 0.16.0
Multiplatform 3D engine
|
#include <PassComponent.hpp>
Public Member Functions | |
Construction / Destruction. | |
C3D_API | PassComponent (Pass &pass, castor::String type, castor::StringArray deps={}) |
Constructor. | |
virtual C3D_API | ~PassComponent () noexcept=default |
C3D_API PassComponentUPtr | clone (Pass &pass) const |
virtual C3D_API void | onAddToPass () const |
Called when the component is added to the pass. | |
Common virtual functions. | |
C3D_API bool | writeText (castor::String const &tabs, castor::Path const &folder, castor::String const &subfolder, castor::StringStream &file) const |
Writes the component content to text. | |
C3D_API void | fillBuffer (PassBuffer &buffer) const |
Fills the pass buffer with this pass data. | |
virtual C3D_API void | accept (ConfigurationVisitorBase &vis) |
ConfigurationVisitorBase acceptance function. | |
virtual C3D_API void | update () |
Images. | |
C3D_API void | fillChannel (TextureConfiguration &configuration, uint32_t mask) const |
Fills the texture configuration for use with this component. | |
virtual C3D_API void | fillConfig (TextureConfiguration &config, ConfigurationVisitorBase &vis) const |
ConfigurationVisitorBase acceptance function, for a specific texture configuration. | |
Getters. | |
virtual C3D_API bool | hasColour () const |
virtual C3D_API castor::HdrRgbColour const & | getColour () const |
virtual C3D_API void | setColour (castor::HdrRgbColour v) |
virtual C3D_API PassComponentFlag | getPassFlags () const |
castor::String const & | getType () const |
castor::StringArray const & | getDependencies () const |
PassComponentPlugin const & | getPlugin () const |
PassComponentID | getId () const |
void | setColour (castor::RgbColour const &v, float gamma=2.2f) |
void | setColour (castor::Coords3f const &v) |
void | setColour (castor::Point3f const &v) |
Public Member Functions inherited from castor::OwnedBy< Pass > | |
Pass * | getOwner () const |
Protected Attributes | |
castor::String | m_type |
castor::StringArray | m_dependencies |
PassComponentID | m_id |
PassComponentPlugin const & | m_plugin |
std::atomic_bool & | m_dirty |
shader::PassMaterialShader * | m_materialShader {} |
Additional Inherited Members | |
Protected Member Functions inherited from castor::OwnedBy< Pass > | |
OwnedBy (Pass &owner) | |
Constructor. | |
C3D_API castor3d::PassComponent::PassComponent | ( | Pass & | pass, |
castor::String | type, | ||
castor::StringArray | deps = {} ) |
Constructor.
[in] | pass | The parent pass. |
[in] | type | The component type. |
[in] | deps | The components this one depends on. |
|
virtualdefaultnoexcept |
|
inlinevirtual |
ConfigurationVisitorBase acceptance function.
vis | The ... visitor. |
Reimplemented in castor3d::BlendComponent, castor3d::FractalMappingComponent, castor3d::NormalComponent, castor3d::PassHeaderComponent, castor3d::PickableComponent, castor3d::TwoSidedComponent, castor3d::UntileMappingComponent, castor3d::AmbientComponent, castor3d::AttenuationComponent, castor3d::ClearcoatComponent, castor3d::EmissiveComponent, castor3d::IridescenceComponent, castor3d::LightingModelComponent, castor3d::MetalnessComponent, castor3d::RoughnessComponent, castor3d::SheenComponent, castor3d::SpecularComponent, castor3d::SpecularFactorComponent, castor3d::SubsurfaceScatteringComponent, castor3d::ThicknessComponent, castor3d::TransmissionComponent, castor3d::TransmittanceComponent, castor3d::AlphaTestComponent, castor3d::ColourComponent, castor3d::HeightComponent, castor3d::OpacityComponent, castor3d::ReflectionComponent, and castor3d::RefractionComponent.
[in,out] | pass | Receives the cloned component. |
C3D_API void castor3d::PassComponent::fillBuffer | ( | PassBuffer & | buffer | ) | const |
Fills the pass buffer with this pass data.
[in,out] | buffer | The pass buffer. |
C3D_API void castor3d::PassComponent::fillChannel | ( | TextureConfiguration & | configuration, |
uint32_t | mask ) const |
Fills the texture configuration for use with this component.
configuration | The texture configuration. |
mask | The mask value. |
|
inlinevirtual |
ConfigurationVisitorBase acceptance function, for a specific texture configuration.
config | The texture configuration. |
vis | The ... visitor. |
Reimplemented in castor3d::PassMapComponent.
|
inlinevirtual |
Reimplemented in castor3d::ColourComponent.
References CU_Require, and hasColour().
|
inline |
References m_dependencies.
|
inline |
References m_id.
Referenced by getPassFlags(), castor3d::BlendComponent::getPassFlags(), castor3d::FractalMappingComponent::getPassFlags(), castor3d::NormalComponent::getPassFlags(), castor3d::PickableComponent::getPassFlags(), castor3d::UntileMappingComponent::getPassFlags(), castor3d::SubsurfaceScatteringComponent::getPassFlags(), castor3d::AlphaTestComponent::getPassFlags(), and castor3d::HeightComponent::getPassFlags().
|
inlinevirtual |
Reimplemented in castor3d::BlendComponent, castor3d::FractalMappingComponent, castor3d::NormalComponent, castor3d::PickableComponent, castor3d::UntileMappingComponent, castor3d::SubsurfaceScatteringComponent, castor3d::AlphaTestComponent, and castor3d::HeightComponent.
References castor3d::eNone, getId(), and castor3d::makePassComponentFlag().
|
inline |
References m_plugin.
|
inline |
References m_type.
|
inlinevirtual |
Reimplemented in castor3d::ColourComponent.
Referenced by getColour(), and setColour().
|
inlinevirtual |
Called when the component is added to the pass.
|
inline |
|
inlinevirtual |
Reimplemented in castor3d::ColourComponent, and castor3d::ColourComponent.
References CU_Require, and hasColour().
Referenced by setColour(), setColour(), and setColour().
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in castor3d::SubsurfaceScatteringComponent.
C3D_API bool castor3d::PassComponent::writeText | ( | castor::String const & | tabs, |
castor::Path const & | folder, | ||
castor::String const & | subfolder, | ||
castor::StringStream & | file ) const |
Writes the component content to text.
[in] | tabs | The current tabulation level. |
[in] | folder | The resources folder. |
[in] | subfolder | The resources subfolder. |
[in,out] | file | The output file. |
|
protected |
Referenced by getDependencies().
|
protected |
Referenced by castor3d::BaseDataPassComponentT< DataT >::setData().
|
protected |
Referenced by getId().
|
protected |
|
protected |
Referenced by getPlugin().
|
protected |
Referenced by getType().