HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_MatXMaterial Class Reference

#include <GR_MaterialTypes.h>

+ Inheritance diagram for GR_MatXMaterial:

Public Member Functions

bool bindInt (const UT_StringRef &name, int32 value)
 
bool bindInts (const UT_StringRef &name, const UT_Array< int32 > &values)
 
bool bindFloat (const UT_StringRef &name, fpreal32 value)
 
bool bindFloats (const UT_StringRef &name, const UT_Array< fpreal32 > &values)
 
bool bindFloat2 (const UT_StringRef &name, const UT_Vector2D &value)
 
bool bindFloat3 (const UT_StringRef &name, const UT_Vector3D &value)
 
bool bindFloat4 (const UT_StringRef &name, const UT_Vector4D &value)
 
bool bindMatrix3 (const UT_StringRef &name, const UT_Matrix3D &value)
 
bool bindMatrix4 (const UT_StringRef &name, const UT_Matrix4D &value)
 
bool bindTexture (const UT_StringRef &name, const UT_StringRef &map_path, bool is_color, const UT_Vector4F &fallback_color, const RV_TextureParms *tex_parms=nullptr)
 
void enableLighting (bool enable)
 
void setSurfaceShader (exint id)
 
void setCurveShader (exint id)
 
void update (const GR_MaterialParms &options) override
 
bool initMaterialSetForRender (RV_Render *r, RV_ShaderProgram *shader, bool &created) override
 
bool initBlocks (RV_Render *r, const GR_DisplayOption *opts) override
 
void setCachedName (UT_StringHolder &name)
 
const UT_StringHoldercachedName () const
 
void makeCachedCurveName (UT_WorkBuffer name) const
 
void setShaderDirty (bool dirty)
 
bool isShaderDirty () const
 
void setMatXNodeVersion (int64 version)
 
int64 getMatXNodeVersion () const
 
void dirtyTextures () override
 
void setShaderCompiled (bool comp)
 
bool isShaderCompiled () const
 
void setSurfShaderAssigned (bool comp)
 
bool isSurfShaderAssigned () const
 
void setCurveShaderAssigned (bool comp)
 
bool isCurveShaderAssigned () const
 
- Public Member Functions inherited from GR_SimpleMaterial
 MATPARM (UT_Vector3F, Diff)
 
 MATPARM (UT_Vector3F, Spec)
 
 MATPARM (UT_Vector3F, Emit)
 
 MATPARM (UT_Vector3F, MetalColor)
 
 MATPARM (UT_Vector3F, SheenColor)
 
 MATPARM (fpreal32, DiffRough)
 
 MATPARM (fpreal32, SpecRough)
 
 MATPARM (fpreal32, SpecTint)
 
 MATPARM (fpreal32, Metal)
 
 MATPARM (fpreal32, IOR)
 
 MATPARM (fpreal32, Alpha)
 
 MATPARM (fpreal32, AlphaPara)
 
 MATPARM (fpreal32, AlphaCutoff)
 
 MATPARM (fpreal32, AlphaMode)
 
 MATPARM (fpreal32, CoatIntensity)
 
 MATPARM (fpreal32, CoatRough)
 
 MATPARM (fpreal32, SheenIntensity)
 
 MATPARM (fpreal32, SheenRough)
 
 MATPARM (int32, SpecModel)
 
 MATPARM (int32, CoatSpecModel)
 
 MATPARM (int32, UseGeoColor)
 
 MATPARM (int32, UsePackedColor)
 
 MATPARM (int32, HasTextures)
 
- Public Member Functions inherited from GR_Material
MaterialType type () const
 
int getNodeID () const
 
void setNodeID (int id)
 
UT_StringHolder getNodePath () const
 
void setTimeDependent (bool timedep, fpreal t=0.0)
 
void setOPTimeDependent (bool timedep, fpreal t=0.0)
 
bool isTimeDependent () const
 
bool isOPTimeDependent () 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 hasDisplacement () const
 
void setHasDisplacement (bool has_disp)
 
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 bindWithoutUpdate (RV_Render *r, RV_ShaderProgram *shader, const GR_DisplayOption *opts, bool for_curve=false)
 
bool bind (RV_Render *r, RV_ShaderProgram *shader, const GR_DisplayOption *opts, bool for_curve=false)
 
bool bindSets (RV_Render *r, RV_ShaderProgram *shader, bool for_curve)
 
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
 
void setFallbacks (const UT_Options *attrib_fallbacks)
 
const UT_OptionsgetFallbacks () const
 
void setExtraInputs (const UT_StringMap< InputType > &extra_inputs)
 
const UT_StringMap< InputType > & extraInputs () 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)
 

Protected Member Functions

 GR_MatXMaterial (const UT_StringHolder &name)
 
 ~GR_MatXMaterial () override
 
 UT_NON_COPYABLE (GR_MatXMaterial)
 
void resetResources ()
 
- Protected Member Functions inherited from GR_SimpleMaterial
 GR_SimpleMaterial (const UT_StringHolder &name, MaterialType type=SIMPLE_SURFACE)
 
 UT_NON_COPYABLE (GR_SimpleMaterial)
 
- Protected Member Functions inherited from GR_Material
 GR_Material (const UT_StringHolder &name, MaterialType type)
 
 ~GR_Material () override
 
 UT_NON_COPYABLE (GR_Material)
 
void clearOpIDs ()
 
void addOpID (int id)
 
bool timeChangeCheck () const
 
- Protected Member Functions inherited from GR_SceneItem
 GR_SceneItem (const UT_StringHolder &name, int id)
 
virtual ~GR_SceneItem ()
 
 UT_NON_COPYABLE (GR_SceneItem)
 

Friends

class GR_Material
 

Additional Inherited Members

- Public Types inherited from GR_Material
enum  AlphaMode { ALPHA_BLEND = 0, ALPHA_CUTOUT, ALPHA_IGNORE }
 
enum  MaterialType {
  SIMPLE_SURFACE, UNLIT_SURFACE, FILM_SURFACE, HAIR_CURVE,
  HEIGHTFIELD_SURFACE, MATX_SURFACE, MATCAP_SURFACE
}
 
enum  InputType {
  IN_INT, IN_FLOAT, IN_VEC2, IN_VEC3,
  IN_VEC4
}
 
- Static Public Member Functions inherited from GR_Material
static GR_MaterialPtr create (MaterialType type, const UT_StringHolder &name)
 
static exint getUniqueMaterialID ()
 
- Protected Attributes inherited from GR_Material
bool myDirtyFlag
 
bool myBlockDirtyFlag
 

Detailed Description

Definition at line 582 of file GR_MaterialTypes.h.

Constructor & Destructor Documentation

GR_MatXMaterial::GR_MatXMaterial ( const UT_StringHolder name)
protected
GR_MatXMaterial::~GR_MatXMaterial ( )
overrideprotected

Member Function Documentation

bool GR_MatXMaterial::bindFloat ( const UT_StringRef name,
fpreal32  value 
)
bool GR_MatXMaterial::bindFloat2 ( const UT_StringRef name,
const UT_Vector2D value 
)
bool GR_MatXMaterial::bindFloat3 ( const UT_StringRef name,
const UT_Vector3D value 
)
bool GR_MatXMaterial::bindFloat4 ( const UT_StringRef name,
const UT_Vector4D value 
)
bool GR_MatXMaterial::bindFloats ( const UT_StringRef name,
const UT_Array< fpreal32 > &  values 
)
bool GR_MatXMaterial::bindInt ( const UT_StringRef name,
int32  value 
)
bool GR_MatXMaterial::bindInts ( const UT_StringRef name,
const UT_Array< int32 > &  values 
)
bool GR_MatXMaterial::bindMatrix3 ( const UT_StringRef name,
const UT_Matrix3D value 
)
bool GR_MatXMaterial::bindMatrix4 ( const UT_StringRef name,
const UT_Matrix4D value 
)
bool GR_MatXMaterial::bindTexture ( const UT_StringRef name,
const UT_StringRef map_path,
bool  is_color,
const UT_Vector4F fallback_color,
const RV_TextureParms tex_parms = nullptr 
)
const UT_StringHolder& GR_MatXMaterial::cachedName ( ) const
inline

Definition at line 635 of file GR_MaterialTypes.h.

void GR_MatXMaterial::dirtyTextures ( )
inlineoverridevirtual

Reimplemented from GR_Material.

Definition at line 650 of file GR_MaterialTypes.h.

void GR_MatXMaterial::enableLighting ( bool  enable)
inline

Definition at line 603 of file GR_MaterialTypes.h.

int64 GR_MatXMaterial::getMatXNodeVersion ( ) const
inline

Definition at line 648 of file GR_MaterialTypes.h.

bool GR_MatXMaterial::initBlocks ( RV_Render r,
const GR_DisplayOption opts 
)
overridevirtual

Reimplemented from GR_SimpleMaterial.

bool GR_MatXMaterial::initMaterialSetForRender ( RV_Render r,
RV_ShaderProgram shader,
bool &  created 
)
overridevirtual

Reimplemented from GR_SimpleMaterial.

bool GR_MatXMaterial::isCurveShaderAssigned ( ) const
inline

Definition at line 659 of file GR_MaterialTypes.h.

bool GR_MatXMaterial::isShaderCompiled ( ) const
inline

Definition at line 653 of file GR_MaterialTypes.h.

bool GR_MatXMaterial::isShaderDirty ( ) const
inline

Definition at line 645 of file GR_MaterialTypes.h.

bool GR_MatXMaterial::isSurfShaderAssigned ( ) const
inline

Definition at line 656 of file GR_MaterialTypes.h.

void GR_MatXMaterial::makeCachedCurveName ( UT_WorkBuffer  name) const
inline

Definition at line 637 of file GR_MaterialTypes.h.

void GR_MatXMaterial::resetResources ( )
protected
void GR_MatXMaterial::setCachedName ( UT_StringHolder name)
inline

Definition at line 633 of file GR_MaterialTypes.h.

void GR_MatXMaterial::setCurveShader ( exint  id)
inline

Definition at line 618 of file GR_MaterialTypes.h.

void GR_MatXMaterial::setCurveShaderAssigned ( bool  comp)
inline

Definition at line 658 of file GR_MaterialTypes.h.

void GR_MatXMaterial::setMatXNodeVersion ( int64  version)
inline

Definition at line 647 of file GR_MaterialTypes.h.

void GR_MatXMaterial::setShaderCompiled ( bool  comp)
inline

Definition at line 652 of file GR_MaterialTypes.h.

void GR_MatXMaterial::setShaderDirty ( bool  dirty)
inline

Definition at line 644 of file GR_MaterialTypes.h.

void GR_MatXMaterial::setSurfaceShader ( exint  id)
inline

Definition at line 612 of file GR_MaterialTypes.h.

void GR_MatXMaterial::setSurfShaderAssigned ( bool  comp)
inline

Definition at line 655 of file GR_MaterialTypes.h.

void GR_MatXMaterial::update ( const GR_MaterialParms options)
overridevirtual

Reimplemented from GR_SimpleMaterial.

GR_MatXMaterial::UT_NON_COPYABLE ( GR_MatXMaterial  )
protected

Friends And Related Function Documentation

friend class GR_Material
friend

Definition at line 667 of file GR_MaterialTypes.h.


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