namespace HDK_Sample {
{
public:
: myCenter(center),
mySize(size)
{}
{ return "ray_ChildBox"; }
{
return 0;
}
{
}
{
myCenter.
x()-mySize, myCenter.
x()+mySize,
myCenter.
y()-mySize, myCenter.
y()+mySize,
myCenter.
z()-mySize, myCenter.
z()+mySize);
child->addGeometry(geo);
}
private:
};
}
using namespace HDK_Sample;
};
{
public:
{
}
};
void
{
}
{
}
{
}
const char *
{
return "RAY_DemoStamp";
}
int
{
val[0] = val[1] = val[2] = -1;
import(
"minbound",
val, 3);
val[0] = val[1] = val[2] = 1;
import(
"maxbound",
val, 3);
if (!import("size", &mySize, 1))
mySize = 0.1;
if (!import("npoints", &myCount, 1))
myCount = 10;
if (!import("seed", &mySeed, 1))
mySeed = 1;
return 1;
}
void
{
box = myBox;
}
void
{
int i;
unsigned int seed;
float cx, cy, cz;
seed = mySeed;
for (i = 0; i < myCount; i++)
{
cx = SYSfastRandom(seed);
cy = SYSfastRandom(seed);
cz = SYSfastRandom(seed);
SYSfit(cy, 0.0
f, 1.0
f, myBox.
ymin(), myBox.
ymax()),
SYSfit(cz, 0.0
f, 1.0
f, myBox.
zmin(), myBox.
zmax()) );
}
}