Lysa  0.0
Lysa 3D Engine
Material Class Referenceabstract

Detailed Description

Base class for all materials of models surfaces

+ Inheritance diagram for Material:

Public Types

enum  Type { STANDARD, SHADER }
 

Public Member Functions

auto getCullMode () const
 
void setCullMode (const vireo::CullMode mode)
 
auto getTransparency () const
 
void setTransparency (const Transparency transparencyMode)
 
auto getAlphaScissor () const
 
void setAlphaScissor (const float scissor)
 
auto isUploaded () const
 
void upload ()
 
virtual MaterialData getMaterialData () const = 0
 
virtual pipeline_id getPipelineId () const = 0
 
const auto & getMaterialIndex () const
 
auto getType () const
 
void setBypassUpload (const bool bypass)
 
- Public Member Functions inherited from Resource
 Resource (const std::string &name)
 
auto getId () const
 
const auto & getName () const
 
bool operator== (const Resource &other) const
 
bool operator< (const Resource &other) const
 
bool operator> (const Resource &other) const
 
virtual std::shared_ptr< Resource > duplicate () const
 
- Public Member Functions inherited from Object
void connect (const Signal::signal &name, const Signal::Handler &handler)
 
void connect (const Signal::signal &name, const std::function< void ()> &handler)
 
void emit (const Signal::signal &name, void *params=nullptr)
 
virtual std::string toString () const
 
 Object () = default
 
virtual ~Object () = default
 

Protected Member Functions

 Material (Type type, const std::string &name)
 

Member Enumeration Documentation

enum Type
Enum ValuesDocumentation
STANDARD 
SHADER 

Constructor & Destructor Documentation

Material ( Type  type,
const std::string &  name 
)
protected

Member Function Documentation

auto getAlphaScissor ( ) const
inline

Returns the alpha scissor threshold value

auto getCullMode ( ) const
inline

Returns the cull mode.

virtual MaterialData getMaterialData ( ) const
pure virtual
const auto& getMaterialIndex ( ) const
inline
virtual pipeline_id getPipelineId ( ) const
pure virtual
auto getTransparency ( ) const
inline

Returns the transparency mode

auto getType ( ) const
inline
auto isUploaded ( ) const
inline
void setAlphaScissor ( const float  scissor)
inline

Sets the alpha scissor threshold value Threshold at which the alpha scissors will discard values. Higher values will result in more pixels being discarded. If the material becomes too opaque at a distance, try increasing this value. If the material disappears at a distance, try decreasing this value.

void setBypassUpload ( const bool  bypass)
inline
void setCullMode ( const vireo::CullMode  mode)
inline

Sets the CullMode. Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera.

void setTransparency ( const Transparency  transparencyMode)
inline

Sets the transparency mode

void upload ( )