39 using namespace HDK_Sample;
133 buf.
sprintf(
"Failed to create array attributes \"%s\"",
134 (
const char *) aname);
147 buf.
sprintf(
"Attribute \"%s\" not a numeric array!",
148 (
const char *) aname);
162 aif->
get(attrib, ptoff, data);
171 aif->
set(attrib, ptoff, data);
SYS_FORCE_INLINE void bumpDataId()
Definition of a geometry attribute.
GLenum GLuint GLenum GLsizei const GLchar * buf
Generic Attribute Interface class to access an attribute as a array.
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
PRM_API const PRM_Type PRM_STRING
SYS_FORCE_INLINE const char * buffer() const
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
void addError(int code, const char *msg=0)
const GA_Attribute * findIntArray(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringRef &name, int min_size=1, int max_size=-1) const
void ATTRIBNAME(UT_String &str, fpreal t)
~SOP_ArrayAttrib() override
GA_Attribute * addIntArray(GA_AttributeOwner owner, GA_AttributeScope scope, const UT_StringHolder &name, int tuple_size=1, const UT_Options *creation_args=0, const GA_AttributeOptions *attribute_options=0, GA_Storage storage=GA_STORE_INT32, const GA_ReuseStrategy &reuse=GA_ReuseStrategy())
OP_ERROR cookMySop(OP_Context &context) override
static PRM_Template myTemplateList[]
GLuint const GLchar * name
#define GA_FOR_ALL_PTOFF(gdp, ptoff)
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
GLenum GLenum GLsizei void * table
void setManagesDataIDs(bool onOff)
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
exint entries() const
Alias of size(). size() is preferred.
SYS_FORCE_INLINE GA_Index pointIndex(GA_Offset offset) const
Given a point's data offset, return its index.
virtual bool get(const GA_Attribute *attrib, GA_Offset ai, UT_Array< fpreal16 > &data) const =0
void newSopOperator(OP_OperatorTable *table)
virtual bool set(GA_Attribute *attrib, GA_Offset ai, const UT_Span< const fpreal16 > &data) const =0
SOP_ArrayAttrib(OP_Network *net, const char *, OP_Operator *entry)
OP_ERROR duplicateSource(unsigned index, OP_Context &context, GU_Detail *gdp, bool clean=true)
virtual const GA_AIFNumericArray * getAIFNumericArray() const
Return the attribute's arraydata interface or NULL.