28 #ifndef __SOP_BrushHairLen__
29 #define __SOP_BrushHairLen__
34 namespace HDK_Sample {
150 {
return myRayOrient.
x(); }
152 {
return myRayOrient.
y(); }
154 {
return myRayOrient.
z(); }
156 {
return myRayHit.
x(); }
158 {
return myRayHit.
y(); }
160 {
return myRayHit.
z(); }
162 {
return myRayHitU; }
164 {
return myRayHitV; }
166 {
return myRayHitW; }
168 {
return myRayHitPressure; }
170 {
return myPrimHit; }
181 {
return myUseFore; }
317 {
return myStrokeChanged; }
352 { myRayHit = orig; myStrokeChanged =
true;
forceRecook(); }
356 { myPrimHit = primidx; myStrokeChanged =
true;
forceRecook(); }
358 { myPtHit = ptidx; myStrokeChanged =
true;
forceRecook(); }
364 myStrokeChanged =
true;
368 { myRayHitPressure = pressure; myStrokeChanged =
true;
forceRecook(); }
381 { myUseFore =
true; }
383 { myUseFore =
false; }
388 setFloat(myUseFore ?
"flen" :
"blen", 0, 0, cd.
x());
409 float myRayHitU, myRayHitV, myRayHitW;
410 float myRayHitPressure;
415 bool myStrokeChanged;
fpreal SYMMETRYDIRZ(fpreal) override
bool wantsCookSelection() const override
fpreal SYMMETRYDIRY(fpreal) override
int PRIMHIT(fpreal) override
bool hasCaptureIdxChanged(fpreal) override
This returns true if the capture index has changed.
void setAccumulateStencil(bool) override
fpreal VISHIGH(fpreal) override
void setHitUVW(fpreal u, fpreal v, fpreal w, fpreal) override
void KERNEL(UT_String &str, fpreal) override
Which metaball kernel to use as the fall off curve.
fpreal RAYHITU(fpreal) override
~SOP_BrushHairLen() override
bool hasNibLookChanged(fpreal) override
fpreal FGG(fpreal) override
int altersColor() const override
We do attribute changes.
fpreal ZEROWEIGHTCOLOR_B() override
void setProjectionType(int) override
fpreal SYMMETRYORIGZ(fpreal) override
fpreal BGR(fpreal t) override
void useForegroundColor() override
SOP_BrushOp OP() override
fpreal RAWRADIUS(fpreal t) override
int USECONNECTIVITY() override
void brushOpCallback(fpreal t, GA_Offset pt, const UT_Array< GA_Offset > *ptneighbour, GA_Offset vtx, const UT_Array< GA_Offset > *vtxneighbour, float alpha, GEO_Delta *delta, const GU_Detail *gdp) override
This is the callback triggered when a BRUSHOP_CALLBACK is used:
OP_ERROR cookMySop(OP_Context &context) override
constexpr SYS_FORCE_INLINE T & z() noexcept
virtual void forceRecook(bool evensmartcache=true)
fpreal evalFloat(int pi, int vi, fpreal t) const
bool hasNibFileChanged(fpreal) override
This determines if the nib file changed. We don't have a nib file.
fpreal SOFTEDGE(fpreal) override
fpreal VISLOW(fpreal) override
fpreal HEIGHT(fpreal t) override
const GU_Detail * getIsectGdp(fpreal t) override
Public methods needed by MSS:
void setBrushShape(SOP_BrushShape) override
fpreal PAPERNOISE(fpreal) override
Alpha noise in the paper space.
bool hasAccumStencilChanged(fpreal) override
This returns true if the type of accumulation mode changed.
fpreal RAYORIENTX(fpreal) override
These query the current raystate. We read off the cached values...
int DOROTATION() override
int OVERRIDEALPHA() override
As WRITEALPHA is off, this is irrelevant:
void useBackgroundColor() override
fpreal RAYHITPRESSURE(fpreal) override
void setBrushEvent(SOP_BrushEvent event) override
fpreal ANGLE(fpreal) override
More hard coded stuff directly from the Nib tab...
int DOREFLECTION() override
void setRayOrientation(const UT_Vector3 &orient, fpreal) override
bool hasStyleChanged(fpreal t) override
int CAPTUREIDX(fpreal) override
Returns the capture region to brush for such brushes.
int NORMALIZEWEIGHT() override
fpreal ZEROWEIGHTCOLOR_G() override
fpreal RAWOPACITY(fpreal) override
The opacity, hardcoded to 1.0f, for a full replace.
bool hasVisrangeChanged(fpreal) override
This return strue if the visualization range has changed.
fpreal OPACITYPRESSURE(fpreal) override
void NMLNAME(UT_String &, fpreal) override
fpreal SYMMETRYDIRX(fpreal) override
int USECAPTURE() override
Should return true if this brush will affect capture regions.
int PTHIT(fpreal) override
fpreal RAWUVRADIUS(fpreal t) override
This gets the raw radius for the UV space.
void setUVRadius(fpreal r, fpreal t) override
fpreal BGB(fpreal) override
void setRadius(fpreal r, fpreal t) override
This is used to update the radii from the state:
fpreal BGG(fpreal) override
void SCRIPT(UT_String &, fpreal) override
Not used:
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
fpreal USERY(fpreal) override
fpreal RAYHITV(fpreal) override
int AXIS() override
These are used by deformation brush ops:
bool USE_FOREGROUND() override
int SYMMETRYROT(fpreal) override
fpreal USERZ(fpreal) override
GLfloat GLfloat GLfloat alpha
void setCurrentColor(const UT_Vector3 &cd) override
int PROJECTIONTYPE() override
GLuint const GLchar * name
int OVERRIDENML() override
For Comb style brushes this allows overriding the normal attribute.
int UPTYPE(fpreal) override
How to determine the upvector, unnecessary with circular brushes.
fpreal FGB(fpreal) override
GA_API const UT_StringHolder orient
int WRITEALPHA() override
fpreal UPZ(fpreal) override
int SHAPE(fpreal) override
This returns a SOP_BrushShape. We hardcode to circle.
fpreal SYMMETRYORIGY(fpreal) override
void setRayOrigin(const UT_Vector3 &orig, fpreal) override
int USEDEPTH() override
Whether to use depth clipping at all.
fpreal RAYHITY(fpreal) override
fpreal RAYORIENTY(fpreal) override
fpreal RAYHITZ(fpreal) override
static PRM_Template myTemplateList[]
int VISUALIZE() override
This determines if visualization will occur.
void CDNAME(UT_String &str, fpreal) override
void setFloat(int parmi, int vectori, fpreal t, fpreal value, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
int OVERRIDECD() override
fpreal SYMMETRYDIST(fpreal) override
void setHitPrimitive(int primidx, fpreal) override
fpreal RAYHITW(fpreal) override
fpreal UPX(fpreal) override
fpreal DEPTH(fpreal t) override
fpreal RAYHITX(fpreal) override
GLubyte GLubyte GLubyte GLubyte w
int ACCUMSTENCIL() override
Whether accumulate stencil is currently on. We keep it off.
fpreal UPY(fpreal) override
fpreal ZEROWEIGHTCOLOR_R() override
fpreal SQUASH(fpreal) override
fpreal RADIUSPRESSURE(fpreal) override
This is how much the HITPRESSURE should affect the RADIUS.
fpreal RAYORIENTZ(fpreal) override
int BITMAPCHAN(fpreal) override
Which channel of the bitmap brush should be used.
fpreal USERX(fpreal) override
constexpr SYS_FORCE_INLINE T & y() noexcept
void BITMAP(UT_String &, fpreal) override
Name of the bitmap to use if bitmap brush is on, which it isn't.
fpreal SYMMETRYORIGX(fpreal) override
bool hasStrokeChanged(fpreal) override
int PRESERVENML() override
For Comb style brushes, this preserves the normal length.
fpreal SPLATTER(fpreal) override
Alpha noise in the brush space.
void setHitPressure(fpreal pressure, fpreal) override
SOP_BrushHairLen(OP_Network *net, const char *, OP_Operator *entry)
fpreal FGR(fpreal t) override
void ALPHANAME(UT_String &, fpreal) override
int MERGEMODE() override
Protected methods needed by SOP_BrushBase:
void setBrushOp(SOP_BrushOp op) override
int DOSTAMPING() override
void setHitPoint(int ptidx, fpreal) override
int altersGeometry() const override
constexpr SYS_FORCE_INLINE T & x() noexcept