38 using namespace HDK_Sample;
66 SIM_RadialEmit::getDopDescription()
70 static PRM_Name theCenterName(
"center",
"Center");
71 static PRM_Name theDistanceName(
"distance",
"Distance");
72 static PRM_Name theSpeedName(
"speed",
"Speed");
73 static PRM_Name theBirthRateName(
"birthrate",
"Birth Rate");
74 static PRM_Name theSeedName(
"seed",
"Seed");
109 return &theDopDescription;
132 uint seed = getSeed();
144 int born = getBirthRate();
155 pos.
x() = SYSrandom(seed) - 0.5f;
156 pos.
y() = SYSrandom(seed) - 0.5f;
157 pos.
z() = SYSrandom(seed) - 0.5f;
168 pos *= distrange.
x() + SYSrandom(seed) * (distrange.
y()-distrange.
x());
173 vel *= speedrange.
x() + SYSrandom(seed) * (speedrange.
y()-speedrange.
x());
#define GAS_NAME_GEOMETRY
PRM_API const PRM_Type PRM_STRING
#define IMPLEMENT_DATAFACTORY(DataClass)
GT_API const UT_StringHolder time
void initializeSIM(void *)
static void setGasDescription(SIM_DopDescription &descr)
~SIM_RadialEmit() override
SIM_GeometryCopy * getGeometryCopy(SIM_Object *obj, const char *name, bool silent=false)
constexpr SYS_FORCE_INLINE T & z() noexcept
constexpr SYS_FORCE_INLINE T length() const noexcept
PRM_API const PRM_Type PRM_XYZ_J
PRM_API const PRM_Type PRM_INT_J
constexpr SYS_FORCE_INLINE T & x() noexcept
void addError(const SIM_RootData *root, int errorcode, const char *errorparm, UT_ErrorSeverity severity) const
Adds an error to our SIM_Engine.
SYS_FORCE_INLINE bool isInvalid() const
PRM_API const PRM_Type PRM_FLT_J
SYS_FORCE_INLINE GA_Offset appendPointOffset()
SYS_FORCE_INLINE void setPos3(GA_Offset ptoff, const UT_Vector3 &pos)
Set P from a UT_Vector3.
SYS_FORCE_INLINE void set(GA_Offset off, const T &val) const
SIM_RadialEmit(const SIM_DataFactory *factory)
bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep) override
SYS_FORCE_INLINE UT_StorageMathFloat_t< T > normalize() noexcept
PRM_API PRM_Default PRMfourDefaults[]
constexpr SYS_FORCE_INLINE T & y() noexcept
constexpr SYS_FORCE_INLINE T & y() noexcept
constexpr SYS_FORCE_INLINE T & x() noexcept
This implements a SIM_Geometry that copies the source geometry.