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

#include <HUSD_Cvex.h>

Public Member Functions

 HUSD_Cvex ()
 
 ~HUSD_Cvex ()
 
void setCwdNodeId (int cwd_node_id)
 
void setOpCaller (OP_Caller *caller)
 
void setDataInputs (HUSD_CvexDataInputs *vex_geo_inputs)
 
void setDataCommand (HUSD_CvexDataCommand *vex_geo_command)
 Sets an object that processes VEX functions that modify the USD data. More...
 
void setTimeCode (const HUSD_TimeCode &time_code)
 Sets the time code at which attributes are evaluated and/or set. More...
 
void setBindingsMap (const HUSD_CvexBindingMap *map)
 Sets the cvex script bindings map (cvex parm -> usd prim attrib). More...
 
void setArraySizeHintAttrib (const UT_StringRef &attrib_name)
 
void setClearExistingAttribData (bool clear_existing)
 
bool runOverPrimitives (HUSD_AutoAnyLock &lock, const HUSD_PathSet &paths, const UT_StringRef &cvex_command) const
 Runs the CVEX script on the USD primitives, setting their attributes. More...
 
bool applyRunOverPrimitives (HUSD_AutoWriteLock &writelock) const
 
bool runOverArrayElements (HUSD_AutoAnyLock &lock, const HUSD_PathSet &paths, const UT_StringRef &cvex_command) const
 
bool applyRunOverArrayElements (HUSD_AutoWriteLock &writelock) const
 
bool matchPrimitives (HUSD_AutoAnyLock &lock, UT_StringArray &matched_prims_paths, const HUSD_CvexCode &code, HUSD_PrimTraversalDemands demands, const UT_PathPattern *pruning_pattern=nullptr) const
 
bool partitionPrimitives (HUSD_AutoAnyLock &lock, UT_Array< HUSD_PrimsBucket > &buckets, const HUSD_PathSet &paths, const HUSD_CvexCode &code) const
 
bool matchFaces (HUSD_AutoAnyLock &lock, UT_ExintArray &matched_faces_indices, const UT_StringRef &geo_prim_path, const UT_ExintArray *face_indices, const HUSD_CvexCode &code) const
 
bool matchInstances (HUSD_AutoAnyLock &lock, UT_ExintArray &matched_instance_indices, const UT_StringRef &instancer_prim_path, const UT_ExintArray *point_indices, const HUSD_CvexCode &code) const
 
bool partitionFaces (HUSD_AutoAnyLock &lock, UT_Array< HUSD_FacesBucket > &buckets, const UT_StringRef &geo_prim_path, const UT_ExintArray *face_indices, const HUSD_CvexCode &code) const
 
bool getIsTimeVarying () const
 Returns true if any attribute the CVEX has run on has many time samples. More...
 

Detailed Description

Definition at line 40 of file HUSD_Cvex.h.

Constructor & Destructor Documentation

HUSD_Cvex::HUSD_Cvex ( )
HUSD_Cvex::~HUSD_Cvex ( )

Member Function Documentation

bool HUSD_Cvex::applyRunOverArrayElements ( HUSD_AutoWriteLock writelock) const
bool HUSD_Cvex::applyRunOverPrimitives ( HUSD_AutoWriteLock writelock) const
bool HUSD_Cvex::getIsTimeVarying ( ) const

Returns true if any attribute the CVEX has run on has many time samples.

bool HUSD_Cvex::matchFaces ( HUSD_AutoAnyLock lock,
UT_ExintArray matched_faces_indices,
const UT_StringRef geo_prim_path,
const UT_ExintArray face_indices,
const HUSD_CvexCode code 
) const

Get the faces for which the given cvex command (ie, its first int output) or a vexpression returns a non-zero value.

bool HUSD_Cvex::matchInstances ( HUSD_AutoAnyLock lock,
UT_ExintArray matched_instance_indices,
const UT_StringRef instancer_prim_path,
const UT_ExintArray point_indices,
const HUSD_CvexCode code 
) const

Get the faces for which the given cvex command (ie, its first int output) or a vexpression returns a non-zero value.

bool HUSD_Cvex::matchPrimitives ( HUSD_AutoAnyLock lock,
UT_StringArray matched_prims_paths,
const HUSD_CvexCode code,
HUSD_PrimTraversalDemands  demands,
const UT_PathPattern pruning_pattern = nullptr 
) const

Gets the primitives for which the given cvex command (ie, its first int output) or a vexpression returns a non-zero value.

bool HUSD_Cvex::partitionFaces ( HUSD_AutoAnyLock lock,
UT_Array< HUSD_FacesBucket > &  buckets,
const UT_StringRef geo_prim_path,
const UT_ExintArray face_indices,
const HUSD_CvexCode code 
) const

Partitions the face set specified by the geo_prim_path and face_indices, given the CVEX script whose output values are used to define buckets. When code's return type is void, all outputs are used for partitioning; otherwise, the first output of a given type is used (converted to a string keyword value). If face_indices is null, then all faces of the prim are partitioned.

bool HUSD_Cvex::partitionPrimitives ( HUSD_AutoAnyLock lock,
UT_Array< HUSD_PrimsBucket > &  buckets,
const HUSD_PathSet paths,
const HUSD_CvexCode code 
) const

Partitions the primitives specified by findprims, given the CVEX script whose output values are used to define buckets. When code's return type is void, all outputs are used for partitioning; otherwise, the first output of a given type is used (converted to a string keyword value).

bool HUSD_Cvex::runOverArrayElements ( HUSD_AutoAnyLock lock,
const HUSD_PathSet paths,
const UT_StringRef cvex_command 
) const

Runs the CVEX script on the array attribute of USD primitives, setting their elements.

bool HUSD_Cvex::runOverPrimitives ( HUSD_AutoAnyLock lock,
const HUSD_PathSet paths,
const UT_StringRef cvex_command 
) const

Runs the CVEX script on the USD primitives, setting their attributes.

void HUSD_Cvex::setArraySizeHintAttrib ( const UT_StringRef attrib_name)

Set the name of the array attibute whose length should be used as a hint about the number of array elements to run cvex on. NOTE: This is the lower bound, and the actual number may be higher than that if CVEX code references some larger array attribute.

void HUSD_Cvex::setBindingsMap ( const HUSD_CvexBindingMap map)

Sets the cvex script bindings map (cvex parm -> usd prim attrib).

void HUSD_Cvex::setClearExistingAttribData ( bool  clear_existing)

Sets a flag inticating whether or not existing attribute data should be cleared before setting a USD attribute value. Defaults to true, and gets set to false only when setting multiple tie samples through a single HUSD_Cvex object.

void HUSD_Cvex::setCwdNodeId ( int  cwd_node_id)

Sets the ID of a node that executes the CVEX script. It is used for channels evaluation in VEX as well as error reporting.

void HUSD_Cvex::setDataCommand ( HUSD_CvexDataCommand vex_geo_command)

Sets an object that processes VEX functions that modify the USD data.

void HUSD_Cvex::setDataInputs ( HUSD_CvexDataInputs vex_geo_inputs)

Sets an object that resolves a stage based on handle, which are used in calls to VEX functions that operate on USD data (eg, primitives). Handles are strings that usually refer to LOP node inputs "opinput:0".

void HUSD_Cvex::setOpCaller ( OP_Caller caller)

Sets the caller object that keeps track of dependencies on any node referenced with the 'op:' syntax in code.

void HUSD_Cvex::setTimeCode ( const HUSD_TimeCode time_code)

Sets the time code at which attributes are evaluated and/or set.


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