36 namespace HDK_Sample {
49 {
return "ray_ChildBox"; }
66 myCenter.
x()-mySize, myCenter.
x()+mySize,
67 myCenter.
y()-mySize, myCenter.
y()+mySize,
68 myCenter.
z()-mySize, myCenter.
z()+mySize);
70 child->addGeometry(geo);
78 using namespace HDK_Sample;
120 return "RAY_DemoStamp";
129 val[0] = val[1] = val[2] = -1;
130 import(
"minbound",
val, 3);
133 val[0] = val[1] = val[2] = 1;
134 import(
"maxbound",
val, 3);
137 if (!
import(
"size", &mySize, 1))
139 if (!
import(
"npoints", &myCount, 1))
141 if (!
import(
"seed", &mySeed, 1))
168 for (i = 0; i < myCount; i++)
173 cx = SYSfastRandom(seed);
174 cy = SYSfastRandom(seed);
175 cz = SYSfastRandom(seed);
177 SYSfit(cy, 0.0
f, 1.0
f, myBox.
ymin(), myBox.
ymax()),
178 SYSfit(cz, 0.0
f, 1.0
f, myBox.
zmin(), myBox.
zmax()) );
void getBoundingBox(UT_BoundingBox &box) override
The bounding box is the "object space" bounds of the procedural.
RAY_ProceduralGeo createGeometry() const
Allocate geometry for this procedural.
constexpr SYS_FORCE_INLINE T & z() noexcept
Procedural primitive for mantra (RAY)
bool insert(ProcDefinition *def, bool replace_existing=true)
A procedural which splits into further procedurals during rendering.
SYS_FORCE_INLINE void expandBounds(T relative, T absolute)
~RAY_DemoStamp() override
void registerProcedural(RAY_ProceduralFactory *factory)
Modern interface to register procedurals.
int initialize(const UT_BoundingBox *) override
void getBoundingBox(UT_BoundingBox &box) override
The bounding box is the "object space" bounds of the procedural.
RAY_ProceduralChildPtr createChild() const
void enlargeBounds(const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
Procedural used in RAY/RAY_DemoStamp.C to render a box.
Parameter definition for arguments to RAY_Procedural.
ray_ChildBox(UT_Vector3 ¢er, fpreal size)
void assign(T xx=0.0f, T yy=0.0f, T zz=0.0f)
Set the values of the vector components.
int initialize(const UT_BoundingBox *) override
GU_PrimPoly * cube(float xmin=-1, float xmax=1, float ymin=-1, float ymax=1, float zmin=-1, float zmax=1, int xdiv=0, int ydiv=0, int zdiv=0, int enforcementBars=0, int doConsolidatePoints=0)
SYS_FORCE_INLINE void initBounds()
RAY_ProceduralArg * arguments() const override
Provide a const reference to the arguments for the procedural.
const char * className() const override
RAY_Procedural * create() const override
Create a procedural, and pass ownership of the instance to mantra.
const char * className() const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Class to create a procedural.
constexpr SYS_FORCE_INLINE T & x() noexcept