using namespace HDK_Sample;
void
{
}
{
}
SIM_RadialEmit::~SIM_RadialEmit()
{
}
SIM_RadialEmit::getDopDescription()
{
static PRM_Name theCenterName(
"center",
"Center");
static PRM_Name theDistanceName(
"distance",
"Distance");
static PRM_Name theSpeedName(
"speed",
"Speed");
static PRM_Name theBirthRateName(
"birthrate",
"Birth Rate");
static PRM_Name theSeedName(
"seed",
"Seed");
{
};
{
};
};
true,
"hdk_radialemit",
"Gas Radial Emit",
"Solver",
classname(),
theTemplates);
return &theDopDescription;
}
bool
{
if (!geo)
{
return false;
}
if (v_h.isInvalid())
{
}
else
{
int born = getBirthRate();
while (born --> 0)
{
pos.
x() = SYSrandom(seed) - 0.5f;
pos.
y() = SYSrandom(seed) - 0.5f;
pos.
z() = SYSrandom(seed) - 0.5f;
{
born++;
continue;
}
vel = pos;
pos *= distrange.
x() + SYSrandom(seed) * (distrange.
y()-distrange.
x());
vel *= speedrange.
x() + SYSrandom(seed) * (speedrange.
y()-speedrange.
x());
v_h.set(newpt, vel);
}
}
return true;
}