using namespace HDK_Sample;
#define MAX_SPLITS 8
#define UT_DEBUG 1
};
{
public:
{
}
};
void
{
}
: mySplits(splits)
{
theCount++;
theTotal++;
}
RAY_DemoMountain::~RAY_DemoMountain()
{
theCount--;
}
const char *
{
return "RAY_DemoMountain";
}
int
{
myP[0].
assign(-1, -1, 0, seed);
SYSfastRandom(seed);
myP[1].
assign( 1, -1, 0, seed);
SYSfastRandom(seed);
myP[2].
assign( 0, -1, 0, seed);
import(
"p0", myP[0].
pos.
data(), 3);
import(
"p1", myP[1].
pos.
data(), 3);
import(
"p2", myP[2].
pos.
data(), 3);
return 1;
}
void
RAY_DemoMountain::computeBounds(
UT_BoundingBox &box,
bool include_displace)
{
if (include_displace)
{
}
}
void
{
computeBounds(box, true);
}
void
{
computeBounds(box, false);
{
}
else
{
}
}
static void
{
disp = SYSfastRandomZero(seed)*
scale;
}
void
{
int i;
scale = 1.0 / (
fpreal)mySplits;
for (i = 0; i < 4; i++)
for (i = 0; i < 3; i++)
{
kids[i]->
myP[0] = myP[i];
edgeSplit(kids[i]->myP[1], myP[i], myP[(i+1)%3], scale);
}
for (i = 0; i < 3; i++)
{
kids[3]->myP[i] = kids[(i+1)%3]->myP[2] = kids[i]->myP[1];
}
for (i = 0; i < 4; i++)
{
child->addProcedural(kids[i]);
}
}
void
{
#if 0
clr.
x() = SYSfastRandom(seed);
clr.
y() = SYSfastRandom(seed);
clr.
z() = SYSfastRandom(seed);
#endif
for (int i = 0; i < 3; i++)
{
}
child->addGeometry(geo);
}