Simulant  21.12-349
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
smlt::MaterialPropertyOverrider Class Reference
Inheritance diagram for smlt::MaterialPropertyOverrider:
smlt::MaterialObject smlt::Material smlt::MaterialPass

Classes

struct  PropertyValue
 

Public Member Functions

 MaterialPropertyOverrider (const MaterialPropertyOverrider *parent)
 
void set_property_value (const char *name, const bool &value)
 
void set_property_value (const char *name, const float &value)
 
void set_property_value (const char *name, const int32_t &value)
 
void set_property_value (const char *name, const Colour &value)
 
void set_property_value (const char *name, const Vec4 &value)
 
void set_property_value (const char *name, const Vec3 &value)
 
void set_property_value (const char *name, const Vec2 &value)
 
void set_property_value (const char *name, const Mat3 &value)
 
void set_property_value (const char *name, const Mat4 &value)
 
void set_property_value (const char *name, const TexturePtr &value)
 
bool property_value (const MaterialPropertyNameHash hsh, const bool *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const float *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const int32_t *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const Colour *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const Vec2 *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const Vec3 *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const Vec4 *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const Mat3 *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const Mat4 *&out) const
 
bool property_value (const MaterialPropertyNameHash hsh, const TexturePtr *&out) const
 
template<typename T >
void set_property_value (const std::string &str, const T &v)
 
template<typename T >
bool property_value (const std::string &str, const T *&out) const
 
template<typename T >
bool property_value (const char *name, const T *&out) const
 
bool clear_override (const char *name)
 
bool property_type (const char *property_name, MaterialPropertyType *type) const
 

Protected Member Functions

virtual void on_override (MaterialPropertyNameHash hsh, const char *name, MaterialPropertyType type)
 
virtual void on_clear_override (MaterialPropertyNameHash hsh)
 
bool check_existance (const MaterialPropertyNameHash hsh) const
 
bool check_existance (const char *property_name) const
 
bool clear_override (const unsigned hsh)
 

Protected Attributes

const MaterialPropertyOverriderparent_ = nullptr
 
std::unordered_map< MaterialPropertyNameHash, MaterialPropertyType > all_overrides_
 
std::vector< PropertyValue< int32_t > > int_properties_
 
std::vector< PropertyValue< float > > float_properties_
 
std::vector< PropertyValue< bool > > bool_properties_
 
std::vector< PropertyValue< Vec2 > > vec2_properties_
 
std::vector< PropertyValue< Vec3 > > vec3_properties_
 
std::vector< PropertyValue< Vec4 > > vec4_properties_
 
std::vector< PropertyValue< Mat3 > > mat3_properties_
 
std::vector< PropertyValue< Mat4 > > mat4_properties_
 
std::vector< PropertyValue< TexturePtr > > texture_properties_
 

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