HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_Material Class Referenceabstract

#include <GR_Material.h>

+ Inheritance diagram for GR_Material:

Public Types

enum  AlphaMode { ALPHA_BLEND = 0, ALPHA_CUTOUT, ALPHA_IGNORE }
 
enum  MaterialType {
  SIMPLE_SURFACE, UNLIT_SURFACE, FILM_SURFACE, HAIR_CURVE,
  HEIGHTFIELD_SURFACE, MATX_SURFACE
}
 

Public Member Functions

MaterialType type () const
 
int getNodeID () const
 
void setNodeID (int id)
 
UT_StringHolder getNodePath () const
 
void setTimeDependent (bool timedep, fpreal t=0.0)
 
bool isTimeDependent () const
 
fpreal getCurrentTime () const
 
bool isDirty (fpreal time)
 
void dirty (bool dirty=true)
 
bool isTextured () const
 
void setTextured (bool has_tex)
 
bool hasUDIM () const
 
void setHasUDIM (bool has_udim)
 
bool needsUVs () const
 
void setNeedsUVs (bool uvs)
 
bool needsTangents () const
 
void setNeedsTangents (bool tan)
 
bool isTransparent () const
 
void setTransparent (bool has_tex)
 
bool texturesLoaded () const
 
void setTexturesLoaded (bool loaded)
 
bool bind (RV_Render *r, RV_ShaderProgram *shader, const GR_DisplayOption *opts)
 
virtual void update (const GR_MaterialParms &options)=0
 
virtual bool initMaterialSetForRender (RV_Render *r, RV_ShaderProgram *shader, bool &created)=0
 
virtual bool initBlocks (RV_Render *r, const GR_DisplayOption *opts)=0
 
bool bindSets (RV_Render *r, RV_ShaderProgram *shader)
 
DEP_MicroNodedependencies ()
 
virtual RV_ShaderProgramgetSurfaceShader () const
 
virtual RV_ShaderProgramgetCurveShader () const
 
bool opDependenciesDirty () const
 
void clearOpDependenciesDirty ()
 
const UT_Set< intopDependencies () const
 
void setOverrides (const UT_Options *overrides)
 
const UT_OptionsgetOverrides () const
 
- Public Member Functions inherited from GR_SceneItem
const UT_StringHoldername () const
 
exint id () const
 
int64 getVersion () const
 
void setVersion (int64 v)
 
void incref ()
 
void decref ()
 
void setName (const UT_StringHolder &name)
 
void setID (int id)
 

Static Public Member Functions

static GR_MaterialPtr create (MaterialType type, const UT_StringHolder &name)
 

Protected Member Functions

 GR_Material (const UT_StringHolder &name, MaterialType type)
 
 ~GR_Material () override
 
 UT_NON_COPYABLE (GR_Material)
 
void clearOpIDs ()
 
void addOpID (int id)
 
- Protected Member Functions inherited from GR_SceneItem
 GR_SceneItem (const UT_StringHolder &name, int id)
 
virtual ~GR_SceneItem ()
 
 UT_NON_COPYABLE (GR_SceneItem)
 

Protected Attributes

bool myDirtyFlag
 
bool myBlockDirtyFlag
 

Detailed Description

Definition at line 44 of file GR_Material.h.

Member Enumeration Documentation

Enumerator
ALPHA_BLEND 
ALPHA_CUTOUT 
ALPHA_IGNORE 

Definition at line 49 of file GR_Material.h.

Enumerator
SIMPLE_SURFACE 
UNLIT_SURFACE 
FILM_SURFACE 
HAIR_CURVE 
HEIGHTFIELD_SURFACE 
MATX_SURFACE 

Definition at line 55 of file GR_Material.h.

Constructor & Destructor Documentation

GR_Material::GR_Material ( const UT_StringHolder name,
MaterialType  type 
)
protected
GR_Material::~GR_Material ( )
overrideprotected

Member Function Documentation

void GR_Material::addOpID ( int  id)
inlineprotected

Definition at line 168 of file GR_Material.h.

bool GR_Material::bind ( RV_Render r,
RV_ShaderProgram shader,
const GR_DisplayOption opts 
)
inline

Definition at line 132 of file GR_Material.h.

bool GR_Material::bindSets ( RV_Render r,
RV_ShaderProgram shader 
)
void GR_Material::clearOpDependenciesDirty ( )
inline

Definition at line 155 of file GR_Material.h.

void GR_Material::clearOpIDs ( )
inlineprotected

Definition at line 167 of file GR_Material.h.

static GR_MaterialPtr GR_Material::create ( MaterialType  type,
const UT_StringHolder name 
)
static
DEP_MicroNode& GR_Material::dependencies ( )
inline

Definition at line 149 of file GR_Material.h.

void GR_Material::dirty ( bool  dirty = true)
inline

Definition at line 99 of file GR_Material.h.

fpreal GR_Material::getCurrentTime ( ) const
inline

Definition at line 80 of file GR_Material.h.

virtual RV_ShaderProgram* GR_Material::getCurveShader ( ) const
inlinevirtual

Definition at line 152 of file GR_Material.h.

int GR_Material::getNodeID ( ) const
inline

Definition at line 70 of file GR_Material.h.

UT_StringHolder GR_Material::getNodePath ( ) const
const UT_Options* GR_Material::getOverrides ( ) const
inline

Definition at line 159 of file GR_Material.h.

virtual RV_ShaderProgram* GR_Material::getSurfaceShader ( ) const
inlinevirtual

Definition at line 151 of file GR_Material.h.

bool GR_Material::hasUDIM ( ) const
inline

Definition at line 115 of file GR_Material.h.

virtual bool GR_Material::initBlocks ( RV_Render r,
const GR_DisplayOption opts 
)
pure virtual
virtual bool GR_Material::initMaterialSetForRender ( RV_Render r,
RV_ShaderProgram shader,
bool &  created 
)
pure virtual
bool GR_Material::isDirty ( fpreal  time)
inline

Definition at line 82 of file GR_Material.h.

bool GR_Material::isTextured ( ) const
inline

Definition at line 112 of file GR_Material.h.

bool GR_Material::isTimeDependent ( ) const
inline

Definition at line 79 of file GR_Material.h.

bool GR_Material::isTransparent ( ) const
inline

Definition at line 126 of file GR_Material.h.

bool GR_Material::needsTangents ( ) const
inline

Definition at line 123 of file GR_Material.h.

bool GR_Material::needsUVs ( ) const
inline

Definition at line 119 of file GR_Material.h.

const UT_Set<int> GR_Material::opDependencies ( ) const
inline

Definition at line 156 of file GR_Material.h.

bool GR_Material::opDependenciesDirty ( ) const
inline

Definition at line 154 of file GR_Material.h.

void GR_Material::setHasUDIM ( bool  has_udim)
inline

Definition at line 116 of file GR_Material.h.

void GR_Material::setNeedsTangents ( bool  tan)
inline

Definition at line 124 of file GR_Material.h.

void GR_Material::setNeedsUVs ( bool  uvs)
inline

Definition at line 120 of file GR_Material.h.

void GR_Material::setNodeID ( int  id)
inline

Definition at line 71 of file GR_Material.h.

void GR_Material::setOverrides ( const UT_Options overrides)
void GR_Material::setTextured ( bool  has_tex)
inline

Definition at line 113 of file GR_Material.h.

void GR_Material::setTexturesLoaded ( bool  loaded)
inline

Definition at line 130 of file GR_Material.h.

void GR_Material::setTimeDependent ( bool  timedep,
fpreal  t = 0.0 
)
inline

Definition at line 74 of file GR_Material.h.

void GR_Material::setTransparent ( bool  has_tex)
inline

Definition at line 127 of file GR_Material.h.

bool GR_Material::texturesLoaded ( ) const
inline

Definition at line 129 of file GR_Material.h.

MaterialType GR_Material::type ( ) const
inline

Definition at line 67 of file GR_Material.h.

virtual void GR_Material::update ( const GR_MaterialParms options)
pure virtual
GR_Material::UT_NON_COPYABLE ( GR_Material  )
protected

Member Data Documentation

bool GR_Material::myBlockDirtyFlag
protected

Definition at line 191 of file GR_Material.h.

bool GR_Material::myDirtyFlag
protected

Definition at line 190 of file GR_Material.h.


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