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

Public Member Functions

 MaterialObject (MaterialObject *parent)
 
void set_specular (const Colour &colour)
 
void set_ambient (const Colour &colour)
 
void set_diffuse (const Colour &colour)
 
void set_emission (const Colour &colour)
 
void set_shininess (float shininess)
 
void set_diffuse_map (TexturePtr texture)
 
void set_light_map (TexturePtr texture)
 
const Mat4diffuse_map_matrix () const
 
const Mat4light_map_matrix () const
 
const Mat4normal_map_matrix () const
 
const Mat4specular_map_matrix () const
 
void set_diffuse_map_matrix (const Mat4 &mat)
 
void set_light_map_matrix (const Mat4 &mat)
 
void set_normal_map_matrix (const Mat4 &mat)
 
void set_specular_map_matrix (const Mat4 &mat)
 
const TexturePtr & diffuse_map () const
 
const TexturePtr & light_map () const
 
const TexturePtr & normal_map () const
 
const TexturePtr & specular_map () const
 
void set_fog_density (float density)
 
void set_fog_start (float start)
 
void set_fog_end (float end)
 
void set_fog_mode (FogMode mode)
 
void set_fog_colour (const Colour &colour)
 
float fog_density () const
 
float fog_start () const
 
float fog_end () const
 
FogMode fog_mode () const
 
const Colourfog_colour () const
 
const Colourspecular () const
 
const Colourambient () const
 
const Colouremission () const
 
const Colourdiffuse () const
 
float shininess () const
 
bool is_blending_enabled () const
 
void set_blend_func (BlendType b)
 
BlendType blend_func () const
 
void set_depth_write_enabled (bool v)
 
bool is_depth_write_enabled () const
 
void set_cull_mode (CullMode mode)
 
CullMode cull_mode () const
 
void set_depth_test_enabled (bool v)
 
bool is_depth_test_enabled () const
 
void set_lighting_enabled (bool v)
 
bool is_lighting_enabled () const
 
void set_textures_enabled (EnabledTextureMask v)
 
int32_t textures_enabled () const
 
float point_size () const
 
void set_polygon_mode (PolygonMode mode)
 
PolygonMode polygon_mode () const
 
void set_shade_model (ShadeModel model)
 
ShadeModel shade_model () const
 
ColourMaterial colour_material () const
 
void set_colour_material (ColourMaterial cm)
 
const MaterialObjectparent_material_object () const
 
- Public Member Functions inherited from smlt::MaterialPropertyOverrider
 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
 

Friends

class Material
 

Additional Inherited Members

- Protected Member Functions inherited from smlt::MaterialPropertyOverrider
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 inherited from smlt::MaterialPropertyOverrider
const MaterialPropertyOverriderparent_ = nullptr
 
std::unordered_map< MaterialPropertyNameHash, MaterialPropertyType > all_overrides_
 
std::unordered_map< MaterialPropertyNameHash, int32_t > int_properties_
 
std::unordered_map< MaterialPropertyNameHash, float > float_properties_
 
std::unordered_map< MaterialPropertyNameHash, bool > bool_properties_
 
std::unordered_map< MaterialPropertyNameHash, Vec2vec2_properties_
 
std::unordered_map< MaterialPropertyNameHash, Vec3vec3_properties_
 
std::unordered_map< MaterialPropertyNameHash, Vec4vec4_properties_
 
std::unordered_map< MaterialPropertyNameHash, Mat3mat3_properties_
 
std::unordered_map< MaterialPropertyNameHash, Mat4mat4_properties_
 
std::unordered_map< MaterialPropertyNameHash, TexturePtr > texture_properties_
 

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