43 using namespace HDK_Sample;
74 static PRM_Name negativeName(
"nradius",
"Negative Radius");
139 int divisions = DIVISIONS(now)*2;
141 int plane = ORIENT();
142 int negradius = NEGRADIUS();
143 float tx = CENTERX(now);
144 float ty = CENTERY(now);
145 float tz = CENTERZ(now);
147 int xcoord, ycoord, zcoord;
188 for (
int i = 0; i < divisions; i++)
198 float tmp = (
float)i * tinc;
199 float rad = (i & 1) ? XRADIUS(now) : YRADIUS(now);
200 if (!negradius && rad < 0)
204 pos(xcoord) = SYScos(tmp) * rad + tx;
205 pos(ycoord) = SYSsin(tmp) * rad + ty;
206 pos(zcoord) = 0 + tz;
SYS_FORCE_INLINE GA_Offset getPointOffset(GA_Size i) const
PRM_API PRM_Name PRMorientName
PRM_API const PRM_Type PRM_ORD
#define OP_FLAG_GENERATOR
**But if you need a result
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
PRM_API const PRM_Type PRM_INT
void allocateAndSet(GU_Detail *gdp, bool own=true)
SOP_DualStar(OP_Network *net, const char *name, OP_Operator *op)
IMATH_NAMESPACE::V2f float
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
void addWarning(SOP_ErrorCodes code, const char *msg=0)
PRM_API const PRM_Type PRM_XYZ
static PRM_Template myTemplateList[]
void newSopOperator(OP_OperatorTable *table)
GU_DetailHandle cookMySopOutput(OP_Context &context, int outputidx, SOP_Node *interest) override
GLuint const GLchar * name
GLenum GLenum GLsizei void * table
SYS_FORCE_INLINE void setPos3(GA_Offset ptoff, const UT_Vector3 &pos)
Set P from a UT_Vector3.
PRM_API const PRM_Type PRM_TOGGLE
PRM_API PRM_Range PRMdivision2Range
OP_ERROR cookMySop(OP_Context &context) override
PRM_API PRM_Name PRMdivName
PRM_API PRM_Name PRMradiusName
void buildStar(GU_Detail *dst, OP_Context &context)
Actually build a star in the given geometry.
PRM_API PRM_ChoiceList PRMplaneMenu
static GEO_PrimPoly * build(GA_Detail *gdp, GA_Size nvertices, bool open=false, bool appendpts=true)
PRM_API PRM_Name PRMcenterName
OP_ERROR duplicateSource(unsigned index, OP_Context &context, GU_Detail *gdp, bool clean=true)