API Documentation
PbsMaterial.h
1 // PbsMaterial.h
3 //
5 
6 namespace nkAstraeus
7 {
14  class PbsMaterial final : public Material
15  {
16  public :
17 
23  PbsMaterial (System* system) noexcept ;
27  virtual ~PbsMaterial () ;
28 
29  // Getters
77  float getMetalness () const ;
81  float getRoughnessGlossiness () const ;
85  float getAlpha () const ;
193  bool getReconstructBinormals () const ;
222 
223  // Setters
272  void setLightDirection (const nkMaths::Vector& value) ;
280  void setLightColor (const nkMaths::Vector& value) ;
286  void setAlbedoColor (const nkMaths::Vector& value) ;
292  void setSpecularColor (const nkMaths::Vector& value) ;
298  void setEmissiveColor (const nkMaths::Vector& value) ;
306  void setEnvironmentColor (const nkMaths::Vector& value) ;
315  void setMetalness (float value) ;
325  void setRoughnessGlossiness (float value) ;
335  void setAlpha (float value) ;
441  void setEnvironmentTexture (nkGraphics::Texture* value, THREE_CHANNEL_PACK channels = THREE_CHANNEL_PACK::RGB, bool prefilteredEnv = false) ;
487  void setPbsModel (PBS_MODEL value) ;
515  void setReconstructBinormals (bool value) ;
524  void setMixAlbedoColorAndTexture (bool value) ;
533  void setMixSpecularColorAndTexture (bool value) ;
542  void setMixEmissiveColorAndTexture (bool value) ;
579  void setMixAlphaFactorAndTexture (bool value) ;
580 
581  // Load
582  virtual bool load () override ;
583  virtual void unload () override ;
584 
585  // Import / export
586  virtual void exportClassToTree (nkExport::Node* rootNode) override ;
587  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
588 
589  public :
590 
591  // Statics
602  static nkMemory::UniquePtr<PbsMaterial> create (System* system = nullptr) ;
603  } ;
604 }
nkAstraeus::PbsMaterial::getEnvironmentTextureChannels
THREE_CHANNEL_PACK getEnvironmentTextureChannels() const
nkAstraeus::PbsMaterial::getSpecularTextureChannels
THREE_CHANNEL_PACK getSpecularTextureChannels() const
nkAstraeus::PbsMaterial::getMixMetalnessFactorAndTexture
bool getMixMetalnessFactorAndTexture() const
nkAstraeus::PbsMaterial::getMetalnessTexture
nkGraphics::Texture * getMetalnessTexture() const
nkAstraeus::PbsMaterial::getEmissiveTexture
nkGraphics::Texture * getEmissiveTexture() const
nkAstraeus::PbsMaterial::setLightColor
void setLightColor(const nkMaths::Vector &value)
nkAstraeus::PbsMaterial::getNormalAttributeName
nkMemory::StringView getNormalAttributeName() const
nkAstraeus::PbsMaterial::getMixEmissiveColorAndTexture
bool getMixEmissiveColorAndTexture() const
nkAstraeus::PbsMaterial::getMetalnessTextureChannels
ONE_CHANNEL_PACK getMetalnessTextureChannels() const
nkAstraeus::PbsMaterial::setIrradianceTextureIsCubeByDefault
void setIrradianceTextureIsCubeByDefault(bool value)
nkGraphics::Camera
Offers all controls to model a camera.
Definition: Camera.h:14
nkAstraeus::PbsMaterial::setLightDirection
void setLightDirection(const nkMaths::Vector &value)
nkAstraeus::PbsMaterial::getEmissiveColor
nkMaths::Vector getEmissiveColor() const
nkAstraeus::PbsMaterial::getIrradianceTextureIsCubeByDefault
bool getIrradianceTextureIsCubeByDefault() const
nkAstraeus::PbsMaterial::getAlbedoTextureChannels
THREE_CHANNEL_PACK getAlbedoTextureChannels() const
nkAstraeus::PbsMaterial::~PbsMaterial
virtual ~PbsMaterial()
nkGraphics::Texture
A texture used for rendering, hosted on GPU.
Definition: Texture.h:35
nkAstraeus::PbsMaterial::getRoughnessGlossinessTexture
nkGraphics::Texture * getRoughnessGlossinessTexture() const
nkAstraeus::PbsMaterial::getLightColor
nkMaths::Vector getLightColor() const
nkAstraeus::PbsMaterial::setMetalness
void setMetalness(float value)
nkAstraeus::PbsMaterial::setMixMetalnessFactorAndTexture
void setMixMetalnessFactorAndTexture(bool value)
nkAstraeus::PbsMaterial::getNormalMapTexture
nkGraphics::Texture * getNormalMapTexture() const
nkAstraeus::PbsMaterial::setEmissiveColor
void setEmissiveColor(const nkMaths::Vector &value)
nkAstraeus::PbsMaterial
A Physically Based Shading material.
Definition: PbsMaterial.h:15
nkAstraeus::THREE_CHANNEL_PACK
THREE_CHANNEL_PACK
Enumeration of texture channels, packed by three. The channel order is encoded in each value,...
Definition: ThreeChannelPack.h:13
nkAstraeus::PbsMaterial::getOcclusionTextureChannels
ONE_CHANNEL_PACK getOcclusionTextureChannels() const
nkAstraeus::PbsMaterial::setMixAlbedoColorAndTexture
void setMixAlbedoColorAndTexture(bool value)
nkAstraeus::PbsMaterial::getAlbedoColor
nkMaths::Vector getAlbedoColor() const
nkAstraeus::PbsMaterial::getNormalMapTextureChannels
THREE_CHANNEL_PACK getNormalMapTextureChannels() const
nkAstraeus::ShadowMapParameters
Exposes parameters for the shadow map setup in materials and effects supporting it.
Definition: ShadowMapParameters.h:12
nkAstraeus::PbsMaterial::getRoughnessGlossiness
float getRoughnessGlossiness() const
nkAstraeus::PbsMaterial::getAlbedoTexture
nkGraphics::Texture * getAlbedoTexture() const
nkAstraeus::System
The main entry point for nkAstraeus engine.
Definition: System.h:15
nkAstraeus::PbsMaterial::getShadowMapCamera
nkGraphics::Camera * getShadowMapCamera() const
nkAstraeus::PbsMaterial::getRoughnessGlossinessTextureChannels
ONE_CHANNEL_PACK getRoughnessGlossinessTextureChannels() const
nkAstraeus::PbsMaterial::PbsMaterial
PbsMaterial(System *system) noexcept
nkAstraeus::PbsMaterial::exportClassToTree
virtual void exportClassToTree(nkExport::Node *rootNode) override
nkAstraeus::PbsMaterial::setEnvironmentColor
void setEnvironmentColor(const nkMaths::Vector &value)
nkAstraeus::PbsMaterial::getLightDirection
nkMaths::Vector getLightDirection() const
nkAstraeus::PbsMaterial::getIrradianceTextureChannels
THREE_CHANNEL_PACK getIrradianceTextureChannels() const
nkAstraeus::PbsMaterial::setEmissiveTexture
void setEmissiveTexture(nkGraphics::Texture *value, THREE_CHANNEL_PACK channels=THREE_CHANNEL_PACK::RGB)
nkAstraeus::PbsMaterial::setOcclusionTexture
void setOcclusionTexture(nkGraphics::Texture *value, ONE_CHANNEL_PACK channel=ONE_CHANNEL_PACK::A)
nkAstraeus::PbsMaterial::getMixSpecularColorAndTexture
bool getMixSpecularColorAndTexture() const
nkAstraeus::PbsMaterial::getTexCoordAttributeName
nkMemory::StringView getTexCoordAttributeName() const
nkAstraeus::PbsMaterial::getEnvironmentTexture
nkGraphics::Texture * getEnvironmentTexture() const
nkAstraeus::PbsMaterial::setRoughnessGlossinessTexture
void setRoughnessGlossinessTexture(nkGraphics::Texture *value, ONE_CHANNEL_PACK channel=ONE_CHANNEL_PACK::A)
nkAstraeus::PbsMaterial::getBinormalAttributeName
nkMemory::StringView getBinormalAttributeName() const
nkAstraeus::PbsMaterial::setMixSpecularColorAndTexture
void setMixSpecularColorAndTexture(bool value)
nkAstraeus::PbsMaterial::setIrradianceTexture
void setIrradianceTexture(nkGraphics::Texture *value, THREE_CHANNEL_PACK channels=THREE_CHANNEL_PACK::RGB)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkAstraeus::PbsMaterial::getAlphaTexture
nkGraphics::Texture * getAlphaTexture() const
nkAstraeus::PbsMaterial::setTexCoordAttributeName
void setTexCoordAttributeName(nkMemory::StringView value)
nkAstraeus::PbsMaterial::getMixEnvironmentColorAndTexture
bool getMixEnvironmentColorAndTexture() const
nkAstraeus::PbsMaterial::getPbsModel
PBS_MODEL getPbsModel() const
nkAstraeus::PbsMaterial::setAlpha
void setAlpha(float value)
nkAstraeus::PbsMaterial::setEnvironmentTextureIsCubeByDefault
void setEnvironmentTextureIsCubeByDefault(bool value)
nkAstraeus::ONE_CHANNEL_PACK::A
@ A
Alpha channel.
nkAstraeus::PbsMaterial::create
static nkMemory::UniquePtr< PbsMaterial > create(System *system=nullptr)
nkAstraeus::PbsMaterial::getMixAlbedoColorAndTexture
bool getMixAlbedoColorAndTexture() const
nkAstraeus::PBS_MODEL
PBS_MODEL
Lists the available PBS models available.
Definition: PbsModel.h:12
nkAstraeus::PbsMaterial::getMetalness
float getMetalness() const
nkAstraeus
Encompasses all API of component NilkinsAstraeus.
Definition: BlurComplexEffect.h:7
nkAstraeus::PbsMaterial::getIrradianceTexture
nkGraphics::Texture * getIrradianceTexture() const
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkAstraeus::PbsMaterial::setBinormalAttributeName
void setBinormalAttributeName(nkMemory::StringView value)
nkAstraeus::PbsMaterial::getSpecularColor
nkMaths::Vector getSpecularColor() const
nkAstraeus::PbsMaterial::getAlpha
float getAlpha() const
nkAstraeus::PbsMaterial::setMixEnvironmentColorAndTexture
void setMixEnvironmentColorAndTexture(bool value)
nkAstraeus::PbsMaterial::getEmissiveTextureChannels
THREE_CHANNEL_PACK getEmissiveTextureChannels() const
nkAstraeus::PbsMaterial::getPositionAttributeName
nkMemory::StringView getPositionAttributeName() const
nkAstraeus::PbsMaterial::getMixRoughnessGlossinessFactorAndTexture
bool getMixRoughnessGlossinessFactorAndTexture() const
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkAstraeus::PbsMaterial::setAlbedoTexture
void setAlbedoTexture(nkGraphics::Texture *value, THREE_CHANNEL_PACK channels=THREE_CHANNEL_PACK::RGB)
nkAstraeus::PbsMaterial::setMixAlphaFactorAndTexture
void setMixAlphaFactorAndTexture(bool value)
nkAstraeus::PbsMaterial::setRoughnessGlossiness
void setRoughnessGlossiness(float value)
nkAstraeus::PbsMaterial::setAlbedoColor
void setAlbedoColor(const nkMaths::Vector &value)
nkAstraeus::PbsMaterial::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkAstraeus::PbsMaterial::getShadowMapTexture
nkGraphics::Texture * getShadowMapTexture() const
nkAstraeus::PbsMaterial::getMixAlphaFactorAndTexture
bool getMixAlphaFactorAndTexture() const
nkAstraeus::PbsMaterial::setEnvironmentTexture
void setEnvironmentTexture(nkGraphics::Texture *value, THREE_CHANNEL_PACK channels=THREE_CHANNEL_PACK::RGB, bool prefilteredEnv=false)
nkAstraeus::PbsMaterial::getShadowMapParameters
const ShadowMapParameters & getShadowMapParameters() const
nkAstraeus::PbsMaterial::getSpecularTexture
nkGraphics::Texture * getSpecularTexture() const
nkAstraeus::ONE_CHANNEL_PACK
ONE_CHANNEL_PACK
Enumeration of texture channels, one by one.
Definition: OneChannelPack.h:12
nkAstraeus::PbsMaterial::getTangentAttributeName
nkMemory::StringView getTangentAttributeName() const
nkAstraeus::PbsMaterial::getOcclusionTexture
nkGraphics::Texture * getOcclusionTexture() const
nkAstraeus::PbsMaterial::getEnvironmentTextureIsCubeByDefault
bool getEnvironmentTextureIsCubeByDefault() const
nkAstraeus::PbsMaterial::load
virtual bool load() override
nkAstraeus::PbsMaterial::setPbsModel
void setPbsModel(PBS_MODEL value)
nkAstraeus::PbsMaterial::getReconstructBinormals
bool getReconstructBinormals() const
nkAstraeus::PbsMaterial::setMixEmissiveColorAndTexture
void setMixEmissiveColorAndTexture(bool value)
nkAstraeus::PbsMaterial::setSpecularColor
void setSpecularColor(const nkMaths::Vector &value)
nkAstraeus::Material
Base class for all materials in the component.
Definition: Material.h:16
nkAstraeus::PbsMaterial::setSpecularTexture
void setSpecularTexture(nkGraphics::Texture *value, THREE_CHANNEL_PACK channels=THREE_CHANNEL_PACK::RGB)
nkAstraeus::PbsMaterial::unload
virtual void unload() override
nkAstraeus::PbsMaterial::setShadowMapTexture
void setShadowMapTexture(nkGraphics::Texture *value, nkGraphics::Camera *shadowCamera, const ShadowMapParameters &parameters=ShadowMapParameters())
nkAstraeus::THREE_CHANNEL_PACK::RGB
@ RGB
Red, green, blue channels.
nkAstraeus::PbsMaterial::getEnvironmentColor
nkMaths::Vector getEnvironmentColor() const
nkAstraeus::PbsMaterial::setNormalMapTexture
void setNormalMapTexture(nkGraphics::Texture *value, THREE_CHANNEL_PACK channels=THREE_CHANNEL_PACK::RGB)
nkAstraeus::PbsMaterial::setTangentAttributeName
void setTangentAttributeName(nkMemory::StringView value)
nkAstraeus::PbsMaterial::setReconstructBinormals
void setReconstructBinormals(bool value)
nkMaths::Vector
A 4-component vector class, with floats.
Definition: Vector.h:12
nkAstraeus::PbsMaterial::setMixRoughnessGlossinessFactorAndTexture
void setMixRoughnessGlossinessFactorAndTexture(bool value)
nkAstraeus::PbsMaterial::getAlphaTextureChannels
ONE_CHANNEL_PACK getAlphaTextureChannels() const
nkAstraeus::PbsMaterial::setMetalnessTexture
void setMetalnessTexture(nkGraphics::Texture *value, ONE_CHANNEL_PACK channel=ONE_CHANNEL_PACK::A)
nkAstraeus::PbsMaterial::setAlphaTexture
void setAlphaTexture(nkGraphics::Texture *value, ONE_CHANNEL_PACK channel=ONE_CHANNEL_PACK::A)
nkAstraeus::PbsMaterial::setPositionAttributeName
void setPositionAttributeName(nkMemory::StringView value)
nkAstraeus::PbsMaterial::setNormalAttributeName
void setNormalAttributeName(nkMemory::StringView value)