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

Interface to scene materials. More...

#include <BRAY_Interface.h>

Public Member Functions

 MaterialPtr (BRAY_VexMaterial *mat=nullptr)
 
 ~MaterialPtr ()
 
bool isValid () const
 
void updateSurface (const ScenePtr &scene, const UT_StringArray &arguments)
 Update the surface shader and arguments. More...
 
bool updateDisplace (const ScenePtr &scene, const UT_StringArray &arguments)
 
void updateSurfaceCode (const ScenePtr &scene, const UT_StringHolder &name, const UT_StringRef &code, bool preload=false)
 
bool updateDisplaceCode (const ScenePtr &scene, const UT_StringHolder &name, const UT_StringRef &code, bool preload=false)
 
void updateSurfaceGraph (const ScenePtr &scene, const UT_StringHolder &name, const ShaderGraphPtr &graphptr)
 Update the surface shader graph. More...
 
bool updateDisplaceGraph (const ScenePtr &scene, const UT_StringHolder &name, const ShaderGraphPtr &graphptr)
 
void setInputs (const MaterialInputList &inputs, bool for_surface)
 Set the material input list. More...
 
SYS_SAFE_BOOL operator bool () const
 
const BRAY_VexMaterial * materialPtr () const
 

Detailed Description

Interface to scene materials.

Definition at line 488 of file BRAY_Interface.h.

Constructor & Destructor Documentation

BRAY::MaterialPtr::MaterialPtr ( BRAY_VexMaterial *  mat = nullptr)
inline

Definition at line 491 of file BRAY_Interface.h.

BRAY::MaterialPtr::~MaterialPtr ( )
inline

Definition at line 495 of file BRAY_Interface.h.

Member Function Documentation

bool BRAY::MaterialPtr::isValid ( ) const
inline

Definition at line 497 of file BRAY_Interface.h.

const BRAY_VexMaterial* BRAY::MaterialPtr::materialPtr ( ) const
inline

Access to the underling material

Definition at line 502 of file BRAY_Interface.h.

SYS_SAFE_BOOL BRAY::MaterialPtr::operator bool ( ) const
inline

Access to the underling material

Definition at line 501 of file BRAY_Interface.h.

void BRAY::MaterialPtr::setInputs ( const MaterialInputList inputs,
bool  for_surface 
)

Set the material input list.

bool BRAY::MaterialPtr::updateDisplace ( const ScenePtr scene,
const UT_StringArray arguments 
)

Update the displacement shader and arguments Returns true if arguments changed.

bool BRAY::MaterialPtr::updateDisplaceCode ( const ScenePtr scene,
const UT_StringHolder name,
const UT_StringRef code,
bool  preload = false 
)

Update displacement shader VEX code The preload flag is used when other shaders in the network might depend on the code being updated. Returns true if the name or the code changed.

bool BRAY::MaterialPtr::updateDisplaceGraph ( const ScenePtr scene,
const UT_StringHolder name,
const ShaderGraphPtr graphptr 
)

Update the displacement shader graph Returns true if the name or the code changed.

void BRAY::MaterialPtr::updateSurface ( const ScenePtr scene,
const UT_StringArray arguments 
)

Update the surface shader and arguments.

void BRAY::MaterialPtr::updateSurfaceCode ( const ScenePtr scene,
const UT_StringHolder name,
const UT_StringRef code,
bool  preload = false 
)

Update surface shader VEX code. The preload flag is used when other shaders in the network might depend on the code being updated.

void BRAY::MaterialPtr::updateSurfaceGraph ( const ScenePtr scene,
const UT_StringHolder name,
const ShaderGraphPtr graphptr 
)

Update the surface shader graph.


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