43 using namespace HDK_Sample;
60 PRM_Name(
"buildpolysoup",
"Build Polygon Soup"),
97 const float iso = ISO(t);
98 const bool makepolysoup = BUILDPOLYSOUP(t);
135 for (
int z = 0;
z < rz;
z++)
137 for (
int y = 0;
y < ry;
y++)
139 for (
int x = 0;
x < rx;
x++)
147 for (
int d = 0; d < 8; d++)
149 density[d] = vox->getValue(
x + ((d>>0) & 1),
153 if (density[d] < 0.0)
162 if (isless && ismore)
180 return "Geometry to Surface";
PRM_API const PRM_Type PRM_FLT
SOP_Surface(OP_Network *net, const char *name, OP_Operator *op)
bool getBBox(UT_BoundingBox *bbox) const override
GLdouble GLdouble GLdouble z
SYS_FORCE_INLINE const GA_PrimitiveTypeId & getTypeId() const
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
SYS_FORCE_INLINE GEO_Primitive * getGEOPrimitive(GA_Offset primoff)
const GU_Detail * inputGeo(int index, OP_Context &)
static PRM_Template myTemplateList[]
GLuint const GLchar * name
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
GLenum GLenum GLsizei void * table
const char * inputLabel(unsigned idx) const override
void addCell(int x, int y, int z, const fpreal density[8], const UT_Vector3 gradient[8])
SYS_FORCE_INLINE GA_Offset primitiveOffset(GA_Index index) const
Given a primitive's index (in append order), return its data offset.
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
SYS_FORCE_INLINE GA_Size getNumPrimitives() const
Return the number of primitives.
PRM_API const PRM_Type PRM_TOGGLE
void newSopOperator(OP_OperatorTable *table)
UT_VoxelArrayHandleF getVoxelHandle() const
PRM_API PRM_Default PRMzeroDefaults[]
OP_ERROR cookMySop(OP_Context &context) override
Method to cook geometry for the SOP.
void getRes(int &rx, int &ry, int &rz) const
Returns the resolution of the voxel array.