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

#include <SHOP_Clerk.h>

Public Member Functions

 SHOP_Clerk ()
 
virtual ~SHOP_Clerk ()
 
virtual const char * getRenderName () const =0
 
virtual const char * getRenderLabel () const
 
virtual const char * getDefaultKeywords () const
 
virtual int getDialogScriptEnum (SHOP_TYPE type) const
 
virtual bool generatesString () const
 
virtual bool requireAutoAdd (SHOP_TYPE type) const
 
virtual bool buildVopShaderString (OP_Node *material, VOP_Node *vop, UT_String &shader, fpreal now, const UT_Options *options, SHOP_TYPE interpret_type)
 
virtual bool getBoundingBox (UT_BoundingBox &box, SHOP_Node &node, OP_Context &ctx)
 
virtual const char * getGeometryAttribute (SHOP_TYPE shader_type) const
 
virtual const char * getGeometryIndirect (SHOP_TYPE shader_type) const
 
virtual bool getIsVexClerk () const
 
virtual const char * getCreationScript (SHOP_TYPE shader_type) const
 
virtual bool buildOpShaderData (OP_Node *node, SHOP_ReData &data, fpreal now, const UT_Options *options, SHOP_TYPE interpret_type)
 
virtual bool buildOpShaderString (OP_Node *node, UT_String &shader, fpreal now, const UT_Options *options, SHOP_TYPE interpret_type)
 
virtual bool buildOpShaderBounds (OP_Node *node, UT_BoundingBox &box, fpreal now, const UT_Options *options, SHOP_TYPE interpret_type)
 
virtual bool buildShaderData (SHOP_Node *shop, SHOP_ReData &data, fpreal now, const UT_Options *options, SHOP_TYPE interpret_type)
 
virtual bool buildShaderString (SHOP_Node *shop, UT_String &shader, fpreal now, const UT_Options *options, SHOP_TYPE interpret_type)
 
virtual bool buildShaderBounds (SHOP_Node *shop, UT_BoundingBox &box, fpreal now, const UT_Options *options, SHOP_TYPE interpret_type)
 

Static Public Member Functions

static void installClerks ()
 Function that installs the clerks from DSOs. More...
 
static bool addShaderClerk (SHOP_TYPE type, SHOP_Clerk *shop)
 Explicitly registers a new clerk for the given shader type. More...
 
static const UT_ValArray
< SHOP_Clerk * > & 
getClerkList (SHOP_TYPE type)
 
static bool renderMatch (const char *rendertype, const char *rendermask, bool accept_badmask=false)
 Utility function for matching render mask. More...
 
static void runCreateScript (const char *node_path, const char *render_mask, SHOP_TYPE shader_type)
 
static SHOP_ClerkgetClerk (const UT_Options *options, const char *default_clerk, const char *rendermask, SHOP_TYPE shader_type, SHOP_TYPE interpret_type, bool only_string_data, bool accept_badmask=false)
 Fetching a clerk that matches the given shader and render types. More...
 
static SHOP_ClerkgetClerk (const char *rendertype, const char *rendermask, SHOP_TYPE shader_type, SHOP_TYPE interpret_type, bool accept_badmask=false)
 Fetching a clerk that matches the given shader and render types. More...
 
static SHOP_ClerkgetAnyClerk (const char *rendermask, SHOP_TYPE shader_type, SHOP_TYPE interpret_type, bool only_string_generators)
 Fetching a clerk that matches the given shader and render types. More...
 

Protected Member Functions

virtual void buildShaderStart (UT_String &str, const char *shader_name, SHOP_Node *node)
 
virtual void buildShaderEnd (UT_String &str, const char *shader_name, SHOP_Node *node)
 
bool evalSopBoundingBox (UT_BoundingBox &box, SHOP_Node &node, const char *parmname, fpreal now)
 

Detailed Description

Definition at line 31 of file SHOP_Clerk.h.

Constructor & Destructor Documentation

SHOP_Clerk::SHOP_Clerk ( )
virtual SHOP_Clerk::~SHOP_Clerk ( )
virtual

Member Function Documentation

static bool SHOP_Clerk::addShaderClerk ( SHOP_TYPE  type,
SHOP_Clerk shop 
)
static

Explicitly registers a new clerk for the given shader type.

virtual bool SHOP_Clerk::buildOpShaderBounds ( OP_Node node,
UT_BoundingBox box,
fpreal  now,
const UT_Options options,
SHOP_TYPE  interpret_type 
)
virtual

Package the SHOP parameters into shader data.

  • shop: Build the shader string for this SHOP
  • data/shader/box: Storage for the result of building the shader
  • now: The evaluation time
  • options: An arbitrary dictionary of options
  • interpret_type: Interpret the SHOP as this type of shader. This is used for SHOPs which can generate multiple shader types (i.e. the material SHOP).

The OP_Node* methods are more general and allow wider selection of shader node representation (ie, VOPs too). Implementing and overriding them is preferrable to overriding the older versions that took SHOP_Node*. However, for better compatibility with older plugin sources, the new methods call the old ones in this base class (for now).

virtual bool SHOP_Clerk::buildOpShaderData ( OP_Node node,
SHOP_ReData data,
fpreal  now,
const UT_Options options,
SHOP_TYPE  interpret_type 
)
virtual

Package the SHOP parameters into shader data.

  • shop: Build the shader string for this SHOP
  • data/shader/box: Storage for the result of building the shader
  • now: The evaluation time
  • options: An arbitrary dictionary of options
  • interpret_type: Interpret the SHOP as this type of shader. This is used for SHOPs which can generate multiple shader types (i.e. the material SHOP).

The OP_Node* methods are more general and allow wider selection of shader node representation (ie, VOPs too). Implementing and overriding them is preferrable to overriding the older versions that took SHOP_Node*. However, for better compatibility with older plugin sources, the new methods call the old ones in this base class (for now).

virtual bool SHOP_Clerk::buildOpShaderString ( OP_Node node,
UT_String shader,
fpreal  now,
const UT_Options options,
SHOP_TYPE  interpret_type 
)
virtual

Package the SHOP parameters into shader data.

  • shop: Build the shader string for this SHOP
  • data/shader/box: Storage for the result of building the shader
  • now: The evaluation time
  • options: An arbitrary dictionary of options
  • interpret_type: Interpret the SHOP as this type of shader. This is used for SHOPs which can generate multiple shader types (i.e. the material SHOP).

The OP_Node* methods are more general and allow wider selection of shader node representation (ie, VOPs too). Implementing and overriding them is preferrable to overriding the older versions that took SHOP_Node*. However, for better compatibility with older plugin sources, the new methods call the old ones in this base class (for now).

virtual bool SHOP_Clerk::buildShaderBounds ( SHOP_Node shop,
UT_BoundingBox box,
fpreal  now,
const UT_Options options,
SHOP_TYPE  interpret_type 
)
virtual

Package the SHOP parameters into shader data.

  • shop: Build the shader string for this SHOP
  • data/shader/box: Storage for the result of building the shader
  • now: The evaluation time
  • options: An arbitrary dictionary of options
  • interpret_type: Interpret the SHOP as this type of shader. This is used for SHOPs which can generate multiple shader types (i.e. the material SHOP).

The OP_Node* methods are more general and allow wider selection of shader node representation (ie, VOPs too). Implementing and overriding them is preferrable to overriding the older versions that took SHOP_Node*. However, for better compatibility with older plugin sources, the new methods call the old ones in this base class (for now).

virtual bool SHOP_Clerk::buildShaderData ( SHOP_Node shop,
SHOP_ReData data,
fpreal  now,
const UT_Options options,
SHOP_TYPE  interpret_type 
)
virtual

Package the SHOP parameters into shader data.

  • shop: Build the shader string for this SHOP
  • data/shader/box: Storage for the result of building the shader
  • now: The evaluation time
  • options: An arbitrary dictionary of options
  • interpret_type: Interpret the SHOP as this type of shader. This is used for SHOPs which can generate multiple shader types (i.e. the material SHOP).

The OP_Node* methods are more general and allow wider selection of shader node representation (ie, VOPs too). Implementing and overriding them is preferrable to overriding the older versions that took SHOP_Node*. However, for better compatibility with older plugin sources, the new methods call the old ones in this base class (for now).

virtual void SHOP_Clerk::buildShaderEnd ( UT_String str,
const char *  shader_name,
SHOP_Node node 
)
protectedvirtual
virtual void SHOP_Clerk::buildShaderStart ( UT_String str,
const char *  shader_name,
SHOP_Node node 
)
protectedvirtual
virtual bool SHOP_Clerk::buildShaderString ( SHOP_Node shop,
UT_String shader,
fpreal  now,
const UT_Options options,
SHOP_TYPE  interpret_type 
)
virtual

Package the SHOP parameters into shader data.

  • shop: Build the shader string for this SHOP
  • data/shader/box: Storage for the result of building the shader
  • now: The evaluation time
  • options: An arbitrary dictionary of options
  • interpret_type: Interpret the SHOP as this type of shader. This is used for SHOPs which can generate multiple shader types (i.e. the material SHOP).

The OP_Node* methods are more general and allow wider selection of shader node representation (ie, VOPs too). Implementing and overriding them is preferrable to overriding the older versions that took SHOP_Node*. However, for better compatibility with older plugin sources, the new methods call the old ones in this base class (for now).

virtual bool SHOP_Clerk::buildVopShaderString ( OP_Node material,
VOP_Node vop,
UT_String shader,
fpreal  now,
const UT_Options options,
SHOP_TYPE  interpret_type 
)
virtual

Build a shader string given a VOP node. The VOP node will always be a code generator.

bool SHOP_Clerk::evalSopBoundingBox ( UT_BoundingBox box,
SHOP_Node node,
const char *  parmname,
fpreal  now 
)
protected
virtual bool SHOP_Clerk::generatesString ( ) const
virtual
static SHOP_Clerk* SHOP_Clerk::getAnyClerk ( const char *  rendermask,
SHOP_TYPE  shader_type,
SHOP_TYPE  interpret_type,
bool  only_string_generators 
)
static

Fetching a clerk that matches the given shader and render types.

virtual bool SHOP_Clerk::getBoundingBox ( UT_BoundingBox box,
SHOP_Node node,
OP_Context ctx 
)
virtual
static SHOP_Clerk* SHOP_Clerk::getClerk ( const UT_Options options,
const char *  default_clerk,
const char *  rendermask,
SHOP_TYPE  shader_type,
SHOP_TYPE  interpret_type,
bool  only_string_data,
bool  accept_badmask = false 
)
static

Fetching a clerk that matches the given shader and render types.

static SHOP_Clerk* SHOP_Clerk::getClerk ( const char *  rendertype,
const char *  rendermask,
SHOP_TYPE  shader_type,
SHOP_TYPE  interpret_type,
bool  accept_badmask = false 
)
static

Fetching a clerk that matches the given shader and render types.

static const UT_ValArray<SHOP_Clerk *>& SHOP_Clerk::getClerkList ( SHOP_TYPE  type)
static

Get a list of available clerks for the given shader type. It is very good practice not to manipulate this list.

virtual const char* SHOP_Clerk::getCreationScript ( SHOP_TYPE  shader_type) const
virtual
virtual const char* SHOP_Clerk::getDefaultKeywords ( ) const
virtual
virtual int SHOP_Clerk::getDialogScriptEnum ( SHOP_TYPE  type) const
virtual
virtual const char* SHOP_Clerk::getGeometryAttribute ( SHOP_TYPE  shader_type) const
virtual
virtual const char* SHOP_Clerk::getGeometryIndirect ( SHOP_TYPE  shader_type) const
virtual
virtual bool SHOP_Clerk::getIsVexClerk ( ) const
virtual
virtual const char* SHOP_Clerk::getRenderLabel ( ) const
virtual
virtual const char* SHOP_Clerk::getRenderName ( ) const
pure virtual
static void SHOP_Clerk::installClerks ( )
static

Function that installs the clerks from DSOs.

static bool SHOP_Clerk::renderMatch ( const char *  rendertype,
const char *  rendermask,
bool  accept_badmask = false 
)
static

Utility function for matching render mask.

virtual bool SHOP_Clerk::requireAutoAdd ( SHOP_TYPE  type) const
virtual
static void SHOP_Clerk::runCreateScript ( const char *  node_path,
const char *  render_mask,
SHOP_TYPE  shader_type 
)
static

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