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

#include <RE_Material.h>

+ Inheritance diagram for RE_Material:

Public Types

enum  RE_MaterialType { FILM_SURFACE, GAMES_SURFACE, HAIR, TERRAIN_SURFACE }
 
enum  { PHONG =0, BLINN =1, GGX =2, SPEC_ANGLE =3 }
 
enum  re_NormalMapType { NMLMAP_TANGENT =0, NMLMAP_WORLD =1, NMLMAP_OBJECT =2 }
 
enum  re_Displace { DISPLACE_NORMAL, DISPLACE_VECTOR_TANGENT, DISPLACE_VECTOR_WORLD, DISPLACE_VECTOR_OBJECT }
 

Public Member Functions

 RE_Material (const char *materialName)
 
const UT_StringHoldergetMaterialName () const
 
int getUniqueId () const
 
int64 getVersion () const
 
void setVersion (int64 v)
 
void dirty (bool dirty=true)
 
bool isDirty (fpreal time) const
 
void setTimeDependent (bool timedep, fpreal t=0.0)
 
bool isTimeDependent () const
 
fpreal getCurrentTime () const
 
void incref ()
 
void decref ()
 
void setNodePath (UT_StringHolder path, int node_id)
 
const UT_StringHoldergetNodePath () const
 
int getNodeId () const
 
void setOverrides (const UT_Options *overrides)
 
const UT_OptionsgetOverrides () const
 
bool hasOverrides () const
 
void setVertexOverrides (const UT_StringMap< UT_StringHolder > &ovr)
 
const UT_StringMap
< UT_StringHolder > & 
vertexOverrides () const
 
void setMaterialType (RE_MaterialType type)
 
RE_MaterialType getMaterialType () const
 
void markDefaultShader (bool def)
 
bool isDefaultShader () const
 
void assignShader (RE_Shader *sh, RE_ShaderTarget ptype=RE_SHADER_TARGET_TRIANGLE, bool owned=true)
 
void assignShader (UT_UniquePtr< RE_Shader > &&sh, RE_ShaderTarget ptype=RE_SHADER_TARGET_TRIANGLE)
 
void clearTexture (RE_Render *r)
 
void clearDiffuseMap ()
 
RE_TextureHolder getTexture (RE_Render *r, int layer)
 
RE_TextureHolder getSpecularMap (RE_Render *r)
 
RE_TextureHolder getBumpMap (RE_Render *r)
 
RE_TextureHolder getNormalMap (RE_Render *r)
 
RE_TextureHolder getOpacityMap (RE_Render *r)
 
RE_TextureHolder getDisplaceMap (RE_Render *r)
 
RE_TextureHolder getEmissionMap (RE_Render *r)
 
RE_TextureHolder getRoughnessMap (RE_Render *r)
 
RE_TextureHolder getOcclusionMap (RE_Render *r)
 
RE_TextureHolder getMetallicMap (RE_Render *r)
 
RE_TextureHolder getCoatIntensityMap (RE_Render *r)
 
RE_TextureHolder getCoatRoughnessMap (RE_Render *r)
 
RE_TextureHolder getReflectionAmountMap (RE_Render *r)
 
RE_TextureHolder getHairDiffuseMap (RE_Render *r)
 
RE_TextureHolder getHairSpecularMap (RE_Render *r)
 
RE_TextureHolder getHairDiffuseRamp (RE_Render *r)
 
RE_TextureHolder getHairSpecularRamp (RE_Render *r)
 
RE_TextureHolder getHairAlphaRamp (RE_Render *r)
 
RE_TextureHolder getEnvMap (RE_Render *r)
 
void clearTextureLayer (int layer)
 
bool hasSpecularMap () const
 
bool hasBumpMap () const
 
bool hasNormalMap () const
 
bool hasOpacityMap () const
 
bool hasDisplaceMap () const
 
bool hasEnvMap () const
 
bool hasEmissionMap () const
 
bool hasRoughnessMap () const
 
bool hasOcclusionMap () const
 
bool hasMetallicMap () const
 
bool hasCoatRoughnessMap () const
 
bool hasCoatIntensityMap () const
 
bool hasReflectionAmountMap () const
 
bool hasHairDiffuseMap () const
 
bool hasHairSpecularMap () const
 
bool hasHairDiffuseRamp () const
 
bool hasHairSpecularRamp () const
 
bool hasHairAlphaRamp () const
 
bool isTransparent (bool check_diffuse_alpha) const
 
bool isTextured () const
 
bool getUVSets (UT_Map< UT_StringHolder, int > &uvsets) const
 
const UT_StringHoldergetLayerUVSet (int layer) const
 
void setCallback (RE_TextureCallback *cb)
 
RE_TextureCallbackgetCallback ()
 
void setTextureFormat (RE_TextureCompress format)
 
RE_TextureCompress getTextureFormat () const
 
void limitTextureSize (bool limit, int w, int h)
 
bool limitTextureSize () const
 
void getMaxTextureSize (int &w, int &h)
 
void setTextureScale (float sc)
 
float getTextureScale () const
 
void setTextureMemLimitMB (int mem)
 
int getTextureMemLimitMB () const
 
void mipMapTextures (bool yes)
 
bool mipMapTextures () const
 
void setAnisotropySamples (int samp)
 
int getAnisotropySamples () const
 
void allowShaders (bool yes)
 
bool allowShaders () const
 
void doLighting (bool yes)
 
bool isLit () const
 
RE_ShadercreateShader (RE_Render *r, const char *name=0, RE_ShaderTarget ptype=RE_SHADER_TARGET_TRIANGLE)
 
RE_ShadergetShader (RE_ShaderTarget sht=RE_SHADER_TARGET_TRIANGLE) const
 
bool isShaderOwned (RE_ShaderTarget sht=RE_SHADER_TARGET_TRIANGLE) const
 
void setShaderSource (const char *vert_src, const char *geom_src, const char *frag_src, RE_ShaderTarget ptype=RE_SHADER_TARGET_TRIANGLE)
 caches the source for the shader in the material. More...
 
bool hasShaderSource (const char *vert_src, const char *geom_src, const char *frag_src, RE_ShaderTarget ptype=RE_SHADER_TARGET_TRIANGLE)
 
void setShaderProgram (const char *program_file)
 
bool hasShaderProgram (const char *program_file) const
 
bool hasCustomShader (RE_ShaderTarget ptype=RE_SHADER_TARGET_TRIANGLE) const
 
bool customShaderDirty () const
 
void removeShader ()
 
float amb (unsigned idx) const
 
UT_Vector3F amb () const
 
float diff (unsigned idx) const
 
UT_Vector3F diff () const
 
float spec (unsigned idx) const
 
UT_Vector3F spec () const
 
float emit (unsigned idx) const
 
UT_Vector3F emit () const
 
UT_Vector3F metallicEdgeTint () const
 
float metallic () const
 
float alpha () const
 
float roughness () const
 
float reflection () const
 
float coatRoughness () const
 
float coatIntensity () const
 
float diffuseRoughness () const
 
void setAlpha (float alpha_perp, float alpha_para=-1.0)
 
void setShaderAlpha (bool enabled)
 
bool hasShaderAlpha () const
 
void setRoughness (float r)
 
void setShininess (float sh)
 
void setDiffuseRoughness (fpreal r)
 
void setAmb (float r, float g, float b)
 
void setDiff (float r, float g, float b)
 
void setSpec (float r, float g, float b)
 
void setEmit (float r, float g, float b)
 
void setMetallic (float metal)
 
void setMetallicEdge (const UT_Vector3F &metal)
 
void setAmbient (UT_Color col)
 
void setDiffuse (UT_Color col)
 
void setSpecular (UT_Color col)
 
void setEmission (UT_Color col)
 
void setAmbient (const UT_Vector3F &col)
 
void setDiffuse (const UT_Vector3F &col)
 
void setSpecular (const UT_Vector3F &col)
 
void setEmission (const UT_Vector3F &col)
 
void setSpecularTint (fpreal t)
 
fpreal getSpecularTint () const
 
void setSpecularModel (int spec_model)
 
int getSpecularModel () const
 
void setCoatSpecularModel (int spec_model)
 
int getCoatSpecuarModel () const
 
void setCoatIntensity (fpreal i)
 
fpreal getCoatIntensity () const
 
void setCoatRoughness (fpreal r)
 
fpreal getCoatRoughness () const
 
void setIOR (float ior)
 
fpreal getIOR () const
 
void setReflection (float r, bool explicit_r)
 
fpreal getReflection () const
 
void usePackedColor (bool enable)
 
void useGeometryColor (bool enable)
 
bool usePackedColor () const
 
bool useGeometryColor () const
 
bool hasExplicitReflection () const
 
void setOpacityMapParms (bool invert)
 
void setNormalParms (re_NormalMapType type, bool bias, UT_Vector2F scale, bool flip_x, bool flip_y, bool flip_z)
 
void setEnvParms (float scale, const UT_Vector3 &rot, const UT_XformOrder &rord)
 
void setDisplaceParms (float scale, float offset, re_Displace vector_space, bool y_up)
 
void setRoughParms (bool invert_map, int component)
 
void setOcclusionParms (int component)
 
void setMetallicParms (int component)
 
void setCoatRoughnessParms (int component)
 
void setCoatIntensityParms (int component)
 
void setReflectionAmountParms (int component, bool affect_ior)
 
void enableHairParameters (bool e)
 
void setHairDiffuse (float intensity, UT_Vector3F root_col, UT_Vector3F tip_col, bool use_map, bool use_ramp)
 
void setHairSpecular (float intensity, float angle, float shift, UT_Vector3F root_col, UT_Vector3F tip_col, bool use_map, bool use_ramp)
 
void setHairAlpha (float alpha, bool use_alpha_ramp)
 
void setHairRandomize (bool random_hue, UT_Vector2F hue_range, bool random_sat, UT_Vector2F sat_range, bool random_int, UT_Vector2F int_range, bool random_spec_int, UT_Vector2F spec_int_range)
 
void setUVTransform (int layer, UT_Vector2F t, fpreal r, UT_Vector2F s)
 
void getUVTransform (int layer, UT_Vector2F &t, fpreal &r, UT_Vector2F &s) const
 
void setUVLayerTint (int layer, bool use_tint, UT_Vector4F tint)
 
void setUVTriplanar (int layer, fpreal scale=1.0, fpreal sharp=1.0, UT_Vector3F blend=UT_Vector3F(1.0f), UT_Vector3F offset=UT_Vector3F(0.0f))
 
bool isUVTriplanar (int layer) const
 
fpreal getUVTriplanarSharp (int layer) const
 
fpreal getUVTriplanarScale (int layer) const
 
UT_Vector3F getUVTriplanarBlend (int layer) const
 
UT_Vector3F getUVTriplanarOffset (int layer) const
 
bool getUVLayerUseTint (int layer) const
 
UT_Vector4F getUVLayerTint (int layer) const
 
void setReflectionMap (RE_Texture *map)
 
void clearReflectionMap ()
 
RE_MaterialPtr cloneWithoutTexture () const
 
void loadTextureMaps (RE_Render *r)
 
void assignTextureMap (RE_Texture *tex, RE_TextureCallback::RE_TexMapType maptype, int index=0)
 
void removeTextureMap (RE_TextureCallback::RE_TexMapType maptype, int index=0)
 
int getNumDiffuseLayers () const
 
bool updateShaderForMaterial (RE_Render *r, int layer, bool lit, bool textured, RE_ShaderTarget sht=RE_SHADER_TARGET_TRIANGLE, RE_Shader *shader=NULL)
 
void restoreShader (RE_Render *r, RE_ShaderTarget sht=RE_SHADER_TARGET_TRIANGLE)
 
int64 getMemoryUsage (bool inclusive) const
 
void writeMaterialParmsToBlockGL4 (RE_Render *r, RE_UniformBlock *block, int material_idx, int layer, bool lit, bool textured)
 
void makeTexturesResident (RE_Render *r)
 
void removeTexturesFromResident (RE_Render *r)
 
DEP_MicroNodedependencies ()
 
const RE_UniformBlockHandlematerialBlock () const
 
const RE_UniformBlockHandlehairBlock () const
 
const RE_UniformBlockHandlegameMatBlock () const
 

Static Public Member Functions

static void setEnvMapOverride (RE_TextureHolder env_map, const UT_Matrix3F &rot, const UT_Vector3F &col)
 
static void clearEnvMapOverride ()
 
static RE_TextureHolder getEnvMapOverride ()
 

Additional Inherited Members

- Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable
 UT_NonCopyable ()=default
 
 ~UT_NonCopyable ()=default
 
 UT_NonCopyable (const UT_NonCopyable &)=delete
 
UT_NonCopyableoperator= (const UT_NonCopyable &)=delete
 

Detailed Description

Definition at line 91 of file RE_Material.h.

Member Enumeration Documentation

anonymous enum
Enumerator
PHONG 
BLINN 
GGX 
SPEC_ANGLE 

Definition at line 367 of file RE_Material.h.

Enumerator
DISPLACE_NORMAL 
DISPLACE_VECTOR_TANGENT 
DISPLACE_VECTOR_WORLD 
DISPLACE_VECTOR_OBJECT 

Definition at line 401 of file RE_Material.h.

Enumerator
FILM_SURFACE 
GAMES_SURFACE 
HAIR 
TERRAIN_SURFACE 

Definition at line 144 of file RE_Material.h.

Enumerator
NMLMAP_TANGENT 
NMLMAP_WORLD 
NMLMAP_OBJECT 

Definition at line 392 of file RE_Material.h.

Constructor & Destructor Documentation

RE_Material::RE_Material ( const char *  materialName)
explicit

Member Function Documentation

void RE_Material::allowShaders ( bool  yes)
inline

Definition at line 266 of file RE_Material.h.

bool RE_Material::allowShaders ( ) const
inline

Definition at line 267 of file RE_Material.h.

float RE_Material::alpha ( ) const
inline

Definition at line 320 of file RE_Material.h.

float RE_Material::amb ( unsigned  idx) const
inline

Definition at line 310 of file RE_Material.h.

UT_Vector3F RE_Material::amb ( ) const
inline

Definition at line 311 of file RE_Material.h.

void RE_Material::assignShader ( RE_Shader sh,
RE_ShaderTarget  ptype = RE_SHADER_TARGET_TRIANGLE,
bool  owned = true 
)
void RE_Material::assignShader ( UT_UniquePtr< RE_Shader > &&  sh,
RE_ShaderTarget  ptype = RE_SHADER_TARGET_TRIANGLE 
)
void RE_Material::assignTextureMap ( RE_Texture tex,
RE_TextureCallback::RE_TexMapType  maptype,
int  index = 0 
)
void RE_Material::clearDiffuseMap ( )
static void RE_Material::clearEnvMapOverride ( )
static
void RE_Material::clearReflectionMap ( )
inline

Definition at line 478 of file RE_Material.h.

void RE_Material::clearTexture ( RE_Render r)
void RE_Material::clearTextureLayer ( int  layer)
RE_MaterialPtr RE_Material::cloneWithoutTexture ( ) const
float RE_Material::coatIntensity ( ) const
inline

Definition at line 324 of file RE_Material.h.

float RE_Material::coatRoughness ( ) const
inline

Definition at line 323 of file RE_Material.h.

RE_Shader* RE_Material::createShader ( RE_Render r,
const char *  name = 0,
RE_ShaderTarget  ptype = RE_SHADER_TARGET_TRIANGLE 
)
bool RE_Material::customShaderDirty ( ) const
inline

Definition at line 305 of file RE_Material.h.

void RE_Material::decref ( )
inline

Definition at line 122 of file RE_Material.h.

DEP_MicroNode& RE_Material::dependencies ( )
inline

Definition at line 526 of file RE_Material.h.

float RE_Material::diff ( unsigned  idx) const
inline

Definition at line 312 of file RE_Material.h.

UT_Vector3F RE_Material::diff ( ) const
inline

Definition at line 313 of file RE_Material.h.

float RE_Material::diffuseRoughness ( ) const
inline

Definition at line 325 of file RE_Material.h.

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

Definition at line 103 of file RE_Material.h.

void RE_Material::doLighting ( bool  yes)
float RE_Material::emit ( unsigned  idx) const
inline

Definition at line 316 of file RE_Material.h.

UT_Vector3F RE_Material::emit ( ) const
inline

Definition at line 317 of file RE_Material.h.

void RE_Material::enableHairParameters ( bool  e)
inline

Definition at line 416 of file RE_Material.h.

const RE_UniformBlockHandle& RE_Material::gameMatBlock ( ) const
inline

Definition at line 532 of file RE_Material.h.

int RE_Material::getAnisotropySamples ( ) const
inline

Definition at line 264 of file RE_Material.h.

RE_TextureHolder RE_Material::getBumpMap ( RE_Render r)
RE_TextureCallback* RE_Material::getCallback ( )
inline

Definition at line 243 of file RE_Material.h.

fpreal RE_Material::getCoatIntensity ( ) const
inline

Definition at line 373 of file RE_Material.h.

RE_TextureHolder RE_Material::getCoatIntensityMap ( RE_Render r)
fpreal RE_Material::getCoatRoughness ( ) const
inline

Definition at line 375 of file RE_Material.h.

RE_TextureHolder RE_Material::getCoatRoughnessMap ( RE_Render r)
int RE_Material::getCoatSpecuarModel ( ) const
inline

Definition at line 371 of file RE_Material.h.

fpreal RE_Material::getCurrentTime ( ) const
inline

Definition at line 119 of file RE_Material.h.

RE_TextureHolder RE_Material::getDisplaceMap ( RE_Render r)
RE_TextureHolder RE_Material::getEmissionMap ( RE_Render r)
RE_TextureHolder RE_Material::getEnvMap ( RE_Render r)
static RE_TextureHolder RE_Material::getEnvMapOverride ( )
static
RE_TextureHolder RE_Material::getHairAlphaRamp ( RE_Render r)
RE_TextureHolder RE_Material::getHairDiffuseMap ( RE_Render r)
RE_TextureHolder RE_Material::getHairDiffuseRamp ( RE_Render r)
RE_TextureHolder RE_Material::getHairSpecularMap ( RE_Render r)
RE_TextureHolder RE_Material::getHairSpecularRamp ( RE_Render r)
fpreal RE_Material::getIOR ( ) const
inline

Definition at line 378 of file RE_Material.h.

const UT_StringHolder& RE_Material::getLayerUVSet ( int  layer) const
const UT_StringHolder& RE_Material::getMaterialName ( ) const
inline

Definition at line 97 of file RE_Material.h.

RE_MaterialType RE_Material::getMaterialType ( ) const
inline

Definition at line 152 of file RE_Material.h.

void RE_Material::getMaxTextureSize ( int w,
int h 
)
inline

Definition at line 250 of file RE_Material.h.

int64 RE_Material::getMemoryUsage ( bool  inclusive) const

Returns the amount of main memory (NOT graphics memory!) owned by this RE_Material.

RE_TextureHolder RE_Material::getMetallicMap ( RE_Render r)
int RE_Material::getNodeId ( ) const
inline

Definition at line 131 of file RE_Material.h.

const UT_StringHolder& RE_Material::getNodePath ( ) const
inline

Definition at line 130 of file RE_Material.h.

RE_TextureHolder RE_Material::getNormalMap ( RE_Render r)
int RE_Material::getNumDiffuseLayers ( ) const
inline

Definition at line 499 of file RE_Material.h.

RE_TextureHolder RE_Material::getOcclusionMap ( RE_Render r)
RE_TextureHolder RE_Material::getOpacityMap ( RE_Render r)
const UT_Options& RE_Material::getOverrides ( ) const
inline

Definition at line 135 of file RE_Material.h.

fpreal RE_Material::getReflection ( ) const
RE_TextureHolder RE_Material::getReflectionAmountMap ( RE_Render r)
RE_TextureHolder RE_Material::getRoughnessMap ( RE_Render r)
RE_Shader* RE_Material::getShader ( RE_ShaderTarget  sht = RE_SHADER_TARGET_TRIANGLE) const
inline

Definition at line 276 of file RE_Material.h.

RE_TextureHolder RE_Material::getSpecularMap ( RE_Render r)
int RE_Material::getSpecularModel ( ) const
inline

Definition at line 369 of file RE_Material.h.

fpreal RE_Material::getSpecularTint ( ) const
inline

Definition at line 365 of file RE_Material.h.

RE_TextureHolder RE_Material::getTexture ( RE_Render r,
int  layer 
)
RE_TextureCompress RE_Material::getTextureFormat ( ) const
inline

Definition at line 246 of file RE_Material.h.

int RE_Material::getTextureMemLimitMB ( ) const
inline

Definition at line 258 of file RE_Material.h.

float RE_Material::getTextureScale ( ) const
inline

Definition at line 255 of file RE_Material.h.

int RE_Material::getUniqueId ( ) const
inline

Definition at line 98 of file RE_Material.h.

UT_Vector4F RE_Material::getUVLayerTint ( int  layer) const
bool RE_Material::getUVLayerUseTint ( int  layer) const
bool RE_Material::getUVSets ( UT_Map< UT_StringHolder, int > &  uvsets) const
void RE_Material::getUVTransform ( int  layer,
UT_Vector2F t,
fpreal r,
UT_Vector2F s 
) const
UT_Vector3F RE_Material::getUVTriplanarBlend ( int  layer) const
UT_Vector3F RE_Material::getUVTriplanarOffset ( int  layer) const
fpreal RE_Material::getUVTriplanarScale ( int  layer) const
fpreal RE_Material::getUVTriplanarSharp ( int  layer) const
int64 RE_Material::getVersion ( ) const
inline

Definition at line 100 of file RE_Material.h.

const RE_UniformBlockHandle& RE_Material::hairBlock ( ) const
inline

Definition at line 530 of file RE_Material.h.

bool RE_Material::hasBumpMap ( ) const
inline

Definition at line 198 of file RE_Material.h.

bool RE_Material::hasCoatIntensityMap ( ) const
inline

Definition at line 213 of file RE_Material.h.

bool RE_Material::hasCoatRoughnessMap ( ) const
inline

Definition at line 211 of file RE_Material.h.

bool RE_Material::hasCustomShader ( RE_ShaderTarget  ptype = RE_SHADER_TARGET_TRIANGLE) const
inline

Definition at line 299 of file RE_Material.h.

bool RE_Material::hasDisplaceMap ( ) const
inline

Definition at line 201 of file RE_Material.h.

bool RE_Material::hasEmissionMap ( ) const
inline

Definition at line 203 of file RE_Material.h.

bool RE_Material::hasEnvMap ( ) const
inline

Definition at line 202 of file RE_Material.h.

bool RE_Material::hasExplicitReflection ( ) const
inline

Definition at line 389 of file RE_Material.h.

bool RE_Material::hasHairAlphaRamp ( ) const
inline

Definition at line 222 of file RE_Material.h.

bool RE_Material::hasHairDiffuseMap ( ) const
inline

Definition at line 218 of file RE_Material.h.

bool RE_Material::hasHairDiffuseRamp ( ) const
inline

Definition at line 220 of file RE_Material.h.

bool RE_Material::hasHairSpecularMap ( ) const
inline

Definition at line 219 of file RE_Material.h.

bool RE_Material::hasHairSpecularRamp ( ) const
inline

Definition at line 221 of file RE_Material.h.

bool RE_Material::hasMetallicMap ( ) const
inline

Definition at line 209 of file RE_Material.h.

bool RE_Material::hasNormalMap ( ) const
inline

Definition at line 199 of file RE_Material.h.

bool RE_Material::hasOcclusionMap ( ) const
inline

Definition at line 207 of file RE_Material.h.

bool RE_Material::hasOpacityMap ( ) const
inline

Definition at line 200 of file RE_Material.h.

bool RE_Material::hasOverrides ( ) const
inline

Definition at line 136 of file RE_Material.h.

bool RE_Material::hasReflectionAmountMap ( ) const
inline

Definition at line 215 of file RE_Material.h.

bool RE_Material::hasRoughnessMap ( ) const
inline

Definition at line 205 of file RE_Material.h.

bool RE_Material::hasShaderAlpha ( ) const
inline

Definition at line 337 of file RE_Material.h.

bool RE_Material::hasShaderProgram ( const char *  program_file) const
bool RE_Material::hasShaderSource ( const char *  vert_src,
const char *  geom_src,
const char *  frag_src,
RE_ShaderTarget  ptype = RE_SHADER_TARGET_TRIANGLE 
)

checks this materials' shader against the source, and returns true if it matches.

bool RE_Material::hasSpecularMap ( ) const
inline

Definition at line 197 of file RE_Material.h.

void RE_Material::incref ( )
inline

Definition at line 121 of file RE_Material.h.

bool RE_Material::isDefaultShader ( ) const
inline

Definition at line 155 of file RE_Material.h.

bool RE_Material::isDirty ( fpreal  time) const
inline

Definition at line 104 of file RE_Material.h.

bool RE_Material::isLit ( ) const
inline

Definition at line 271 of file RE_Material.h.

bool RE_Material::isShaderOwned ( RE_ShaderTarget  sht = RE_SHADER_TARGET_TRIANGLE) const
inline

Definition at line 278 of file RE_Material.h.

bool RE_Material::isTextured ( ) const
inline

Definition at line 229 of file RE_Material.h.

bool RE_Material::isTimeDependent ( ) const
inline

Definition at line 118 of file RE_Material.h.

bool RE_Material::isTransparent ( bool  check_diffuse_alpha) const
bool RE_Material::isUVTriplanar ( int  layer) const
void RE_Material::limitTextureSize ( bool  limit,
int  w,
int  h 
)
bool RE_Material::limitTextureSize ( ) const
inline

Definition at line 249 of file RE_Material.h.

void RE_Material::loadTextureMaps ( RE_Render r)
void RE_Material::makeTexturesResident ( RE_Render r)
void RE_Material::markDefaultShader ( bool  def)
inline

Definition at line 154 of file RE_Material.h.

const RE_UniformBlockHandle& RE_Material::materialBlock ( ) const
inline

Definition at line 528 of file RE_Material.h.

float RE_Material::metallic ( ) const
inline

Definition at line 319 of file RE_Material.h.

UT_Vector3F RE_Material::metallicEdgeTint ( ) const
inline

Definition at line 318 of file RE_Material.h.

void RE_Material::mipMapTextures ( bool  yes)
bool RE_Material::mipMapTextures ( ) const
inline

Definition at line 261 of file RE_Material.h.

float RE_Material::reflection ( ) const
inline

Definition at line 322 of file RE_Material.h.

void RE_Material::removeShader ( )
void RE_Material::removeTextureMap ( RE_TextureCallback::RE_TexMapType  maptype,
int  index = 0 
)
void RE_Material::removeTexturesFromResident ( RE_Render r)
void RE_Material::restoreShader ( RE_Render r,
RE_ShaderTarget  sht = RE_SHADER_TARGET_TRIANGLE 
)
float RE_Material::roughness ( ) const
inline

Definition at line 321 of file RE_Material.h.

void RE_Material::setAlpha ( float  alpha_perp,
float  alpha_para = -1.0 
)

Sets the perpendicular and parallel alpha factors. If the parallel alpha is less than zero, they are assumed to be the same.

void RE_Material::setAmb ( float  r,
float  g,
float  b 
)
void RE_Material::setAmbient ( UT_Color  col)
void RE_Material::setAmbient ( const UT_Vector3F col)
inline

Definition at line 827 of file RE_Material.h.

void RE_Material::setAnisotropySamples ( int  samp)
void RE_Material::setCallback ( RE_TextureCallback cb)
void RE_Material::setCoatIntensity ( fpreal  i)
void RE_Material::setCoatIntensityParms ( int  component)
void RE_Material::setCoatRoughness ( fpreal  r)
void RE_Material::setCoatRoughnessParms ( int  component)
void RE_Material::setCoatSpecularModel ( int  spec_model)
void RE_Material::setDiff ( float  r,
float  g,
float  b 
)
void RE_Material::setDiffuse ( UT_Color  col)
void RE_Material::setDiffuse ( const UT_Vector3F col)
inline

Definition at line 832 of file RE_Material.h.

void RE_Material::setDiffuseRoughness ( fpreal  r)
void RE_Material::setDisplaceParms ( float  scale,
float  offset,
re_Displace  vector_space,
bool  y_up 
)
void RE_Material::setEmission ( UT_Color  col)
void RE_Material::setEmission ( const UT_Vector3F col)
inline

Definition at line 842 of file RE_Material.h.

void RE_Material::setEmit ( float  r,
float  g,
float  b 
)
static void RE_Material::setEnvMapOverride ( RE_TextureHolder  env_map,
const UT_Matrix3F rot,
const UT_Vector3F col 
)
static
void RE_Material::setEnvParms ( float  scale,
const UT_Vector3 rot,
const UT_XformOrder rord 
)
void RE_Material::setHairAlpha ( float  alpha,
bool  use_alpha_ramp 
)
void RE_Material::setHairDiffuse ( float  intensity,
UT_Vector3F  root_col,
UT_Vector3F  tip_col,
bool  use_map,
bool  use_ramp 
)
void RE_Material::setHairRandomize ( bool  random_hue,
UT_Vector2F  hue_range,
bool  random_sat,
UT_Vector2F  sat_range,
bool  random_int,
UT_Vector2F  int_range,
bool  random_spec_int,
UT_Vector2F  spec_int_range 
)
void RE_Material::setHairSpecular ( float  intensity,
float  angle,
float  shift,
UT_Vector3F  root_col,
UT_Vector3F  tip_col,
bool  use_map,
bool  use_ramp 
)
void RE_Material::setIOR ( float  ior)
void RE_Material::setMaterialType ( RE_MaterialType  type)
void RE_Material::setMetallic ( float  metal)
void RE_Material::setMetallicEdge ( const UT_Vector3F metal)
void RE_Material::setMetallicParms ( int  component)
void RE_Material::setNodePath ( UT_StringHolder  path,
int  node_id 
)
void RE_Material::setNormalParms ( re_NormalMapType  type,
bool  bias,
UT_Vector2F  scale,
bool  flip_x,
bool  flip_y,
bool  flip_z 
)
void RE_Material::setOcclusionParms ( int  component)
void RE_Material::setOpacityMapParms ( bool  invert)
void RE_Material::setOverrides ( const UT_Options overrides)
void RE_Material::setReflection ( float  r,
bool  explicit_r 
)
void RE_Material::setReflectionAmountParms ( int  component,
bool  affect_ior 
)
void RE_Material::setReflectionMap ( RE_Texture map)
inline

Definition at line 477 of file RE_Material.h.

void RE_Material::setRoughness ( float  r)
void RE_Material::setRoughParms ( bool  invert_map,
int  component 
)
void RE_Material::setShaderAlpha ( bool  enabled)
inline

If true, the shader generates its own alpha independent of the material parameters. This indicates that the material requires a transparency pass, since the renderer can otherwise not determine this from the shader code.

Definition at line 335 of file RE_Material.h.

void RE_Material::setShaderProgram ( const char *  program_file)
void RE_Material::setShaderSource ( const char *  vert_src,
const char *  geom_src,
const char *  frag_src,
RE_ShaderTarget  ptype = RE_SHADER_TARGET_TRIANGLE 
)

caches the source for the shader in the material.

void RE_Material::setShininess ( float  sh)
void RE_Material::setSpec ( float  r,
float  g,
float  b 
)
void RE_Material::setSpecular ( UT_Color  col)
void RE_Material::setSpecular ( const UT_Vector3F col)
inline

Definition at line 837 of file RE_Material.h.

void RE_Material::setSpecularModel ( int  spec_model)
void RE_Material::setSpecularTint ( fpreal  t)
void RE_Material::setTextureFormat ( RE_TextureCompress  format)
void RE_Material::setTextureMemLimitMB ( int  mem)
void RE_Material::setTextureScale ( float  sc)
void RE_Material::setTimeDependent ( bool  timedep,
fpreal  t = 0.0 
)
inline

Definition at line 113 of file RE_Material.h.

void RE_Material::setUVLayerTint ( int  layer,
bool  use_tint,
UT_Vector4F  tint 
)
void RE_Material::setUVTransform ( int  layer,
UT_Vector2F  t,
fpreal  r,
UT_Vector2F  s 
)
void RE_Material::setUVTriplanar ( int  layer,
fpreal  scale = 1.0,
fpreal  sharp = 1.0,
UT_Vector3F  blend = UT_Vector3F(1.0f),
UT_Vector3F  offset = UT_Vector3F(0.0f) 
)
void RE_Material::setVersion ( int64  v)
inline

Definition at line 101 of file RE_Material.h.

void RE_Material::setVertexOverrides ( const UT_StringMap< UT_StringHolder > &  ovr)
inline

Definition at line 139 of file RE_Material.h.

float RE_Material::spec ( unsigned  idx) const
inline

Definition at line 314 of file RE_Material.h.

UT_Vector3F RE_Material::spec ( ) const
inline

Definition at line 315 of file RE_Material.h.

bool RE_Material::updateShaderForMaterial ( RE_Render r,
int  layer,
bool  lit,
bool  textured,
RE_ShaderTarget  sht = RE_SHADER_TARGET_TRIANGLE,
RE_Shader shader = NULL 
)
void RE_Material::useGeometryColor ( bool  enable)
bool RE_Material::useGeometryColor ( ) const
inline

Definition at line 386 of file RE_Material.h.

void RE_Material::usePackedColor ( bool  enable)
bool RE_Material::usePackedColor ( ) const
inline

Definition at line 385 of file RE_Material.h.

const UT_StringMap<UT_StringHolder>& RE_Material::vertexOverrides ( ) const
inline

Definition at line 141 of file RE_Material.h.

void RE_Material::writeMaterialParmsToBlockGL4 ( RE_Render r,
RE_UniformBlock block,
int  material_idx,
int  layer,
bool  lit,
bool  textured 
)

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