251 static void *
operator new(
size_t nSize);
260 static void operator delete(
void *pBlock);
365 return mPathStartFrame;
376 return mPathEndFrame;
431 mAnimateFromStart = nAnimateFromStart;
442 return mAnimateFromStart;
453 mBirthFrontOnly = nBirthFrontOnly;
464 return mBirthFrontOnly;
475 mBirthSquareDistCull = nCull;
486 return mBirthSquareDistCull;
497 mBirthSquareDist = flSquareDist;
508 return mBirthSquareDist;
542 mRateGenHigh = flHigh;
556 flHigh = mRateGenHigh;
568 mScaleGenHigh = flHigh;
569 mScaleGenLow = flLow;
581 flLow = mScaleGenLow;
582 flHigh = mScaleGenHigh;
595 mPathVarMax[0] = flX;
596 mPathVarMax[1] = flY;
597 mPathVarMax[2] = flZ;
610 flX = mPathVarMax[0];
611 flY = mPathVarMax[1];
612 flZ = mPathVarMax[2];
672 void DrawInstanceView(
const Transform &xfm,
float flAge);
680 void DrawInstanceMesh(
const Transform &xfm,
float flAge);
689 void DrawInstanceMultiMesh(
const Transform &xfm,
float flAge);
698 void DrawInstanceParticle(
const Transform &xfm,
float flAge);
703 std::list<Instance> mInstances;
706 float mPathStartFrame;
712 int mAnimateFromStart;
729 int mBirthSquareDistCull;
730 float mBirthSquareDist;
744 std::list<Transform>::iterator mMultiMeshCursor;
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Animatable()
Construct an animatable with no children, no filters, and a zero frame.
Camera.
Definition cam.h:53
Sink that the engine formats its diagnostic and failure text into.
Definition dbg.h:33
Drawable()
Construct a visible drawable with no children.
Emitter that spawns copies of one drawable along an animated path.
Definition generator.h:96
void SetBirthCamera(Cam *pCam)
Set the camera the birth culling measures against.
void SetRateGen(float flLow, float flHigh)
Set the bounds of the random spawn interval.
Definition generator.h:541
virtual void Load(Stream &stream)
Read the emitter from stream.
virtual void DumpText(Dbg &sink)
Write the emitter to the engine text sink.
virtual void Copy(const Object *pSource, unsigned nFlags)
Copy another emitter over this one.
float mNextSpawnFrame
Frame the next instance is spawned on.
Definition generator.h:723
float GetBirthSquareDist() const
Report mBirthSquareDist.
Definition generator.h:507
void SetScaleGen(float flLow, float flHigh)
Set the bounds of the random instance scale.
Definition generator.h:567
float GetPathEndFrame() const
Report the path frame an instance ends at.
Definition generator.h:375
void SetPathVarMax(float flX, float flY, float flZ)
Set the largest random rotation about each axis, in degrees.
Definition generator.h:594
ParticleSys * GetParticleSys() const
Report the particle system subject.
Definition generator.h:419
void Regenerate()
Give every live instance a fresh particle from mParticleSys.
Cam * GetBirthCam() const
Report the birth camera.
Definition generator.h:518
virtual void Replace(Object *pFrom, Object *pTo)
Replace one object reference with another.
void SetMultiMesh(MultiMesh *pMultiMesh)
Make a multi-mesh the drawn subject, clearing mMesh, mView, and mParticleSys.
virtual void SetFrameSelf(float flFrame)
Expire and spawn instances for a frame.
float GetPathStartFrame() const
Report the path frame an instance starts at.
Definition generator.h:364
MultiMesh * GetMultiMesh() const
Report the multi-mesh subject.
Definition generator.h:408
void SetAnimateFromStart(int nAnimateFromStart)
Set mAnimateFromStart.
Definition generator.h:430
std::list< Instance > & Instances()
Report the live instance list.
View * GetView() const
Report the view subject.
Definition generator.h:397
int GetBirthSquareDistCull() const
Report mBirthSquareDistCull.
Definition generator.h:485
virtual void Save(Stream &stream)
Write revision 7 of the emitter to stream.
void SetBirthSquareDist(float flSquareDist)
Set mBirthSquareDist.
Definition generator.h:496
int GetAnimateFromStart() const
Report mAnimateFromStart.
Definition generator.h:441
TransAnim * GetPath() const
Report the path.
Definition generator.h:353
void GetRateGen(float &flLow, float &flHigh) const
Report the bounds of the random spawn interval.
Definition generator.h:554
Mesh * GetMesh() const
Report the mesh subject.
Definition generator.h:386
void GetScaleGen(float &flLow, float &flHigh) const
Report the bounds of the random instance scale.
Definition generator.h:580
void SetMesh(Mesh *pMesh)
Make a mesh the drawn subject.
void GetGenPathVarMax(float &flX, float &flY, float &flZ) const
Report the largest random rotation about each axis, in degrees.
Definition generator.h:609
void SetPath(TransAnim *pPath, float flStartFrame, float flEndFrame)
Replace the path and set the frame span the instances travel.
Generator(const HxStr &name)
Construct an emitter with no instances and no subject.
void SetParticleSys(ParticleSys *pParticleSys)
Make a particle system the drawn subject, clearing mMesh, mView, and mMultiMesh.
virtual int DrawShowing()
Draw every live instance.
void SetBirthFrontOnly(int nBirthFrontOnly)
Set mBirthFrontOnly.
Definition generator.h:452
void SetView(View *pView)
Make a view the drawn subject, clearing mMesh, mMultiMesh, and mParticleSys.
void SetBirthSquareDistCull(int nCull)
Set mBirthSquareDistCull.
Definition generator.h:474
static void Init()
Register the class with Rnd::TheManager under the key "Generator".
virtual const HxStr & ClassName() const
Return the registered class name, "Generator".
int GetBirthFrontOnly() const
Report mBirthFrontOnly.
Definition generator.h:463
void SetNextSpawnFrame(float flFrame)
Set mNextSpawnFrame.
Definition generator.h:529
int NumInstances()
Count the live instances.
Indexed triangle mesh with one material.
Definition mesh.h:46
Draws one mesh many times, once per recorded instance transform.
Definition multimesh.h:39
Base of every object the renderer can load, resolve by name, and serialise.
Definition object.h:43
Emitter that spawns, integrates, and draws a population of particles.
Definition particlesys.h:60
Byte stream that every renderer object serialises itself through.
Definition stream.h:31
Animation that drives one transformable from three keyframe channels.
Definition transanim.h:49
Root of a loadable scene.
Definition view.h:47
The rendering engine.
Definition animhelper.h:3
constexpr int kPathVarAxisCount
Number of axes the random path variation covers.
Definition generator.h:44
Generator * NewGenerator(const HxStr &name)
Allocate and construct an emitter.
HxStr g_generatorClassName
Registered class name of Rnd::Generator, the string "Generator".
One live instance.
Definition generator.h:106
Vector3 mScale
Definition generator.h:115
Transform mXfmMod
Rotation and translation the instance is drawn with.
Definition generator.h:112
float mFrameOrg
Frame this instance was spawned on.
Definition generator.h:108
unsigned char mReserved04[0x0c]
Definition generator.h:110
One live particle of a Rnd::ParticleSys.
Definition particle.h:33
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:12