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

#include <VOP_ScriptMaterialInfo.h>

Public Member Functions

virtual ~VOP_ScriptMaterialCodeMapper ()
 
virtual void mapToVexCodeSection (UT_String &section_name, VOP_Node *shader_node, VOP_Type shader_type)=0
 
virtual bool isPrimaryOutput (VOP_Node *shader_node, VOP_Type shader_type) const =0
 

Detailed Description

Mapper that provides an HDA section name for a given encapsulated shader node. The encapsulated shader's code is stored in the returned section name within the script material HDA.

Definition at line 233 of file VOP_ScriptMaterialInfo.h.

Constructor & Destructor Documentation

virtual VOP_ScriptMaterialCodeMapper::~VOP_ScriptMaterialCodeMapper ( )
inlinevirtual

Definition at line 237 of file VOP_ScriptMaterialInfo.h.

Member Function Documentation

virtual bool VOP_ScriptMaterialCodeMapper::isPrimaryOutput ( VOP_Node shader_node,
VOP_Type  shader_type 
) const
pure virtual

Checks if the shader node was added as part of the primary output compilation phase. These nodes don't have phantom nodes, but rather reference a saved code section directly.

virtual void VOP_ScriptMaterialCodeMapper::mapToVexCodeSection ( UT_String section_name,
VOP_Node shader_node,
VOP_Type  shader_type 
)
pure virtual

Maps the shader node to an HDA section name that contains the code generated by that shader node. The shader node should generate own code, because mapper may try to compile and store it in the section. Returns, previously added mapped section name if already added, or adds and returns a newly constructed shection name.

Parameters
section_nameThe outgoing argument that will contain the section name that contains the shader's vex code.
shader_nodeThe shader node whose code is in the mapped section name.
shader_typeThe type of shader code to look for (one node may be able to provide a few vex code chunks, each for a different shader type).

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