![]() |
Blue Brain BioExplorer
|
#include <OptiXMaterial.h>
Public Member Functions | |
OptiXMaterial ()=default | |
~OptiXMaterial () | |
void | commit () final |
Called after material change. More... | |
bool | isTextured () const |
::optix::Material | getOptixMaterial () |
auto | getTextureSampler (const TextureType type) const |
auto & | getTextureSamplers () |
void | setValueRange (const Vector2f &valueRange) |
![]() | |
PLATFORM_API | Material (const PropertyMap &properties={}) |
Constructs a Material object. More... | |
PLATFORM_API const std::string & | getName () const |
Returns the name of the material. More... | |
PLATFORM_API void | setName (const std::string &value) |
Sets the name of the material. More... | |
PLATFORM_API void | setDiffuseColor (const Vector3d &value) |
Sets the color of the diffuse component of the material. More... | |
PLATFORM_API const Vector3d & | getDiffuseColor () const |
Returns the color of the diffuse component of the material. More... | |
PLATFORM_API void | setSpecularColor (const Vector3d &value) |
Sets the color of the specular component of the material. More... | |
PLATFORM_API const Vector3d & | getSpecularColor () const |
Returns the color of the specular component of the material. More... | |
PLATFORM_API void | setSpecularExponent (const double value) |
Sets the specular exponent of the material. More... | |
PLATFORM_API double | getSpecularExponent () const |
Returns the specular exponent of the material. More... | |
PLATFORM_API void | setReflectionIndex (const double value) |
Sets the reflection index of the material. More... | |
PLATFORM_API double | getReflectionIndex () const |
Returns the reflection index of the material. More... | |
PLATFORM_API void | setOpacity (const double value) |
Sets the opacity of the material. More... | |
PLATFORM_API double | getOpacity () const |
Returns the opacity of the material. More... | |
PLATFORM_API void | setRefractionIndex (const double value) |
Sets the refraction index of the material. More... | |
PLATFORM_API double | getRefractionIndex () const |
Returns the refraction index of the material. More... | |
PLATFORM_API void | setEmission (double value) |
Sets the emission of the material. More... | |
PLATFORM_API double | getEmission () const |
Returns the emission of the material. More... | |
PLATFORM_API void | setGlossiness (const double value) |
Sets the glossiness of the material. More... | |
PLATFORM_API double | getGlossiness () const |
Returns the glossiness of the material. More... | |
PLATFORM_API void | setShadingMode (const MaterialShadingMode value) |
Sets the shading mode of the material. More... | |
PLATFORM_API MaterialShadingMode | getShadingMode () const |
Returns the shading mode of the material. More... | |
PLATFORM_API void | setUserParameter (const double value) |
Sets the user parameter of the material. More... | |
PLATFORM_API double | getUserParameter () const |
Returns the user parameter of the material. More... | |
PLATFORM_API void | setCastUserData (const bool value) |
Sets the cast user data of the material. More... | |
PLATFORM_API double | getCastUserData () const |
Returns the cast user data of the material. More... | |
PLATFORM_API void | setClippingMode (const MaterialClippingMode value) |
Sets the clipping mode of the material. More... | |
PLATFORM_API MaterialClippingMode | getClippingMode () const |
Returns the clipping mode of the material. More... | |
PLATFORM_API void | setChameleonMode (const MaterialChameleonMode value) |
Sets the chameleon mode of the material. More... | |
PLATFORM_API MaterialChameleonMode | getChameleonMode () const |
Returns the chameleon mode of the material. More... | |
PLATFORM_API void | setNodeId (const int32_t value) |
Sets the cast user data of the material. More... | |
PLATFORM_API int32_t | getNodeId () const |
Returns the cast user data of the material. More... | |
PLATFORM_API const TextureDescriptors & | getTextureDescriptors () const |
Returns the texture descriptors of the material. More... | |
PLATFORM_API void | setTexture (const std::string &fileName, const TextureType type) |
Sets the texture of the material for the specified texture type. More... | |
PLATFORM_API void | removeTexture (const TextureType type) |
Removes the texture of the material for the specified texture type. More... | |
PLATFORM_API Texture2DPtr | getTexture (const TextureType type) const |
Returns the texture of the material for the specified texture type. More... | |
PLATFORM_API bool | hasTexture (const TextureType type) const |
Checks if the material has a texture for the specified texture type. More... | |
PLATFORM_API void | clearTextures () |
Clears all textures from the material object. More... | |
![]() | |
void | setCurrentType (const std::string &type) |
const std::string & | getCurrentType () const |
template<typename T > | |
void | updateProperty (const std::string &name, const T &value, const bool triggerCallback=true) |
bool | hasProperty (const std::string &name) const |
template<typename T > | |
T | getProperty (const std::string &name) const |
template<typename T > | |
T | getPropertyOrValue (const std::string &name, T val) const |
void | setProperties (const PropertyMap &properties) |
void | setProperties (const std::string &type, const PropertyMap &properties) |
void | updateProperties (const PropertyMap &properties) |
const auto & | getPropertyMap () const |
const auto & | getPropertyMap (const std::string &type) const |
strings | getTypes () const |
void | clonePropertiesFrom (const PropertyObject &obj) |
![]() | |
BaseObject ()=default | |
virtual | ~BaseObject ()=default |
BaseObject (const BaseObject &) | |
BaseObject & | operator= (const BaseObject &rhs) |
bool | isModified () const |
void | resetModified () |
void | markModified (const bool triggerCallback=true) |
void | onModified (const ModifiedCallback &callback) |
void | clearModifiedCallback () |
Additional Inherited Members | |
![]() | |
using | ModifiedCallback = std::function< void(const BaseObject &)> |
![]() | |
bool | _loadTexture (const std::string &fileName, const TextureType type) |
Loads the texture for the specified texture type. More... | |
![]() | |
template<typename T > | |
void | _updateValue (T &member, const T &newValue, const bool triggerCallback=true) |
template<class T > | |
bool | _isEqual (const T &a, const T &b, typename std::enable_if< std::is_floating_point< T >::value >::type *=0) |
template<class T > | |
bool | _isEqual (const T &a, const T &b, typename std::enable_if<!std::is_floating_point< T >::value >::type *=0) |
![]() | |
std::string | _name {"undefined"} |
Vector3d | _diffuseColor {1., 1., 1.} |
Vector3d | _specularColor {1., 1., 1.} |
double | _specularExponent {10.} |
double | _reflectionIndex {0.} |
double | _opacity {1.} |
double | _refractionIndex {1.} |
double | _emission {0.} |
double | _glossiness {1.} |
TexturesMap | _textures |
TextureDescriptors | _textureDescriptors |
double | _userParameter {1.} |
MaterialShadingMode | _shadingMode {MaterialShadingMode::undefined_shading_mode} |
bool | _castUserData {false} |
MaterialClippingMode | _clippingMode {MaterialClippingMode::no_clipping} |
int32_t | _nodeId |
MaterialChameleonMode | _chameleonMode {MaterialChameleonMode::undefined_chameleon_mode} |
![]() | |
std::string | _currentType |
std::map< std::string, PropertyMap > | _properties |
Definition at line 39 of file OptiXMaterial.h.
|
default |
core::engine::optix::OptiXMaterial::~OptiXMaterial | ( | ) |
Definition at line 39 of file OptiXMaterial.cpp.
|
finalvirtual |
Called after material change.
Implements core::Material.
Definition at line 52 of file OptiXMaterial.cpp.
|
inline |
Definition at line 48 of file OptiXMaterial.h.
|
inline |
Definition at line 49 of file OptiXMaterial.h.
|
inline |
Definition at line 50 of file OptiXMaterial.h.
bool core::engine::optix::OptiXMaterial::isTextured | ( | ) | const |
Definition at line 47 of file OptiXMaterial.cpp.
|
inline |
Definition at line 52 of file OptiXMaterial.h.