41 using namespace HDK_Sample;
59 PRM_Name(
"attrib",
"Comparison Point Attribute"),
60 PRM_Name(
"resultattrib",
"Result Attribute"),
61 PRM_Name(
"frame",
"Second Input Frame"),
83 :
SOP_Node(net, name, op), myGroup(0)
139 fpreal secondinput_t = FRAME(t);
145 secondinput_context.
setTime(secondinput_t);
158 ATTRIB(attribname, t);
160 RESULTATTRIB(resultname, t);
199 : (
const char *)resultname);
225 math->sub(*dsth, ptoff, *ah, aptoff, *bh, bptoff);
SYS_FORCE_INLINE void bumpDataId()
Definition of a geometry attribute.
PRM_API const PRM_Type PRM_STRING
Attribute Interface class to perform numeric operations on attributes.
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
static PRM_SpareData * getGroupSelectButton(GA_GroupType group_type, const char *group_type_parm=NULL, int input_index=0, PRM_SpareData *merge_spare_data=NULL, const char *assoc_groups=NULL, GroupSelectAsOrdered ordered=GroupSelectAsOrdered::AUTO, const char *use_name_attr=nullptr, const char *select_script=nullptr)
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
~SOP_TimeCompare() override
SOP_TimeCompare(OP_Network *net, const char *name, OP_Operator *op)
static PRM_ChoiceList pointGroupMenu
void addError(int code, const char *msg=0)
CH_Manager * getChannelManager()
GA_Attribute * cloneAttribute(GA_AttributeOwner owner, const UT_StringHolder &name, namevalidcertificate, const GA_Attribute &src, bool clone_options, GA_DataIdStrategy data_id_strategy=GA_DATA_ID_BUMP, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
const GU_Detail * inputGeo(int index, OP_Context &)
static PRM_Template myTemplateList[]
OP_ERROR cookMySop(OP_Context &context) override
Method to cook geometry for the SOP.
GA_AttributeSet & getAttributes()
int int forceValidVariableName(const char *safechars=NULL)
OP_ERROR cookInputPointGroups(OP_Context &context, const GA_PointGroup *&group, bool alone=false, bool do_selection=true, int parm_index=0, int group_type_index=-1, bool allow_reference=true, bool ordered=false, bool detached=true, int input_index=0)
See cookInputPrimitiveGroups.
GLuint const GLchar * name
SYS_FORCE_INLINE const GA_Attribute * findAttribute(GA_AttributeScope scope, const UT_StringRef &name, const GA_AttributeOwner search_order[], int search_size) const
PRM_API PRM_Name PRMgroupName
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
PRM_API const PRM_Type PRM_FLT_J
GLenum GLenum GLsizei void * table
void setManagesDataIDs(bool onOff)
SYS_FORCE_INLINE GA_Index pointIndex(GA_Offset offset) const
Given a point's data offset, return its index.
OP_ERROR cookInputGroups(OP_Context &context, int alone=0) override
#define GA_FOR_ALL_GROUP_PTOFF(gdp, grp, ptoff)
OP_API OP_Director * OPgetDirector()
virtual const GA_AIFMath * getAIFMath() const
Return the attribute's math interface or NULL.
void newSopOperator(OP_OperatorTable *table)
SYS_FORCE_INLINE GA_Offset pointOffset(GA_Index index) const
Given a point's index (in append order), return its data offset.
fpreal getTime(fpreal sample) const
SYS_FORCE_INLINE GA_Size getNumPoints() const
Return the number of points.
OP_ERROR duplicateSource(unsigned index, OP_Context &context, GU_Detail *gdp, bool clean=true)