wavelength 1.0.0
Loading...
Searching...
No Matches
RndParticleSys Class Reference

Emitter that spawns, moves, and fades a population of particles. More...

#include <rndparticlesys.h>

Inheritance diagram for RndParticleSys:
Collaboration diagram for RndParticleSys:

Public Types

enum  Mode { kModePoint = 0 , kModeLine = 1 , kModeSprite = 2 }
 The primitive each particle is drawn as. More...
Public Types inherited from RndAnimatable
enum  FilterType {
  kFilterScaleOffset = 0 , kFilterMinMaxLoop = 1 , kFilterZeroOrder = 2 , kFilterFirstOrder = 3 ,
  kFilterSecondOrder = 4
}
 The type tags of the filters, as Save() writes them. More...
Public Types inherited from RndTransformable
enum  Billboard {
  kBillboardNone = 0 , kBillboardX = 1 , kBillboardY = 2 , kBillboardZ = 4 ,
  kBillboardXZ = 8 , kBillboardXYZ = 16 , kBillboardSimpleXYZ = 32 , kBillboardLocalRotate = 64 ,
  kBillboardScale = 128 , kBillboardScaleX = 129 , kBillboardScaleY = 130 , kBillboardScaleZ = 132 ,
  kBillboardScaleXZ = 136 , kBillboardScaleXYZ = 144 , kBillboardScaleSimpleXYZ = 160
}
 How the world transform turns to face the current camera. More...

Public Member Functions

 RndParticleSys (const char *pszName)
 Construct a system with a pool of 10 particles.
 ~RndParticleSys () override
 Free the particles and the pool.
void * operator new (size_t nSize)
 Allocate a system, billed to the class name.
void operator delete (void *pBlock)
 Release a system.
int SetFrameSelf (float fFrame) override
 Move the particles on to a frame, then emit for the elapsed frames unless SetEmitFrame() clocks the emission.
void ListDrawObjects (std::list< RndObject * > &objects) override
 Add the system, the material, and the textures of the material's stages, last first, to a list.
void ListDrawables (std::list< RndDrawable * > &drawables) override
 Add the system, when a live particle is inside the view volume of the current camera, then the children, to a list.
void DumpText (PrnStream &stream) override
 Write a description of the system and its bases.
void Save (BinStream &stream) override
 Write the system and its bases.
void Replace (RndObject *pFrom, RndObject *pTo) override
 Replace a referenced object with another in the bases, the material, and the pool owner.
const char * ClassName () const override
 Report the class name.
void Copy (const RndObject *pSource, int nFlags) override
 Copy another system and its bases.
void Load (BinStream &stream) override
 Read what Save() wrote, or an earlier version of it.
void SetNumParticles (int nCount)
 Set the pool size, then reallocate the pool of the owner.
void SetParticlesOwner (RndParticleSys *pOwner)
 Set the system whose pool this one draws from.
void SetMat (RndMat *pMat)
 Set the material the particles are drawn with.
int NumLiveParticles () const
 Report the number of live particles.
Particle * AllocParticle ()
 Move a particle from the free list of the owner to the head of the live list.
Particle * FreeParticle (Particle *pParticle)
 Move a live particle to the free list of the owner.
void FreeAllParticles ()
 Free every live particle.
void SetEmitFrame (float fFrame)
 Emit for the frames since the previous call, and clock the emission from then on in place of SetFrameSelf().
void ResetEmitFrame ()
 Return the emission clock to SetFrameSelf().
void SpawnParticles (float fDelta)
 Emit the particles the emission rate owes for a number of frames.
void RandomizeColorAndSize (Particle *pParticle)
 Give a particle a colour and a size from the start ranges.
void UpdateParticles (float fDelta)
 Free the particles outside their lives, and move and fade the others over a number of frames.
Particle * GetParticles () const
int GetBubble () const
void SetBubble (int nBubble)
const Vector2 & GetBubblePeriod () const
void SetBubblePeriod (const Vector2 &range)
const Vector2 & GetBubbleSize () const
Vector2 & GetBubbleSize ()
void SetBubbleSize (const Vector2 &range)
int GetCollide () const
void SetCollide (int nCollide)
const Plane & GetCollidePlane () const
void SetCollidePlane (const Plane &plane)
const Vector2 & GetEmitRate () const
Vector2 & GetEmitRate ()
const Color & GetEndColorHigh () const
Color & GetEndColorHigh ()
void SetEndColorHigh (const Color &color)
const Color & GetEndColorLow () const
Color & GetEndColorLow ()
void SetEndColorLow (const Color &color)
const Vector3 & GetForce () const
Vector3 & GetForce ()
void SetForce (const Vector3 &force)
const Vector2 & GetLife () const
Vector2 & GetLife ()
void SetLife (const Vector2 &range)
Particle * GetLiveParticles () const
Mode GetMode () const
void SetMode (Mode pMode)
int GetNumParticles () const
RndParticleSys * GetParticlesOwner () const
const Vector2 & GetPitch () const
void SetPitch (const Vector2 &range)
const Vector3 & GetPosHigh () const
Vector3 & GetPosHigh ()
void SetPosHigh (const Vector3 &pos)
const Vector3 & GetPosLow () const
Vector3 & GetPosLow ()
void SetPosLow (const Vector3 &pos)
int GetReadZ () const
void SetReadZ (int nReadZ)
const Vector2 & GetSize () const
Vector2 & GetSize ()
const Vector2 & GetSpeed () const
Vector2 & GetSpeed ()
void SetSpeed (const Vector2 &range)
const Color & GetStartColorHigh () const
Color & GetStartColorHigh ()
void SetStartColorHigh (const Color &color)
const Color & GetStartColorLow () const
Color & GetStartColorLow ()
void SetStartColorLow (const Color &color)
const Vector2 & GetYaw () const
void SetYaw (const Vector2 &range)
Public Member Functions inherited from RndAnimatable
 RndAnimatable ()
 Construct an animatable at frame 0 without children or filters.
 ~RndAnimatable () override
 Drop the references on the children and delete the filters.
virtual float EndFrame ()
 Report the frame at which the animation ends.
virtual void ListAnimObjects (std::list< RndObject * > &objects)
 Add the objects the animation uses to a list.
RndAnimatable * Parent ()
 Find the animatable whose children include this one.
void SetFrame (float fFrame)
 Filter a frame, apply it, and pass the result on to the children.
float FilterFrame (float fValue)
 Run a frame through the filters.
float UnfilterFrame (float fValue)
 Run a filtered frame back through the filters, last first.
float ChildrenEndFrame ()
 Report the latest end frame of the children, unfiltered through this animatable.
bool AddAnim (RndAnimatable *pAnim)
 Append a child.
void RemoveAnim (RndAnimatable *pAnim)
 Remove a child.
void RemoveAllAnims ()
 Remove every child.
const std::list< Filter * > & GetFilters () const
float GetFrame () const
float GetFilteredFrame () const
const std::list< RndAnimatable * > & GetAnims () const
std::list< Filter * > & GetFilters ()
Public Member Functions inherited from RndObject
 RndObject (const char *pszName)
 Construct an object and register it under a name.
virtual ~RndObject ()
 Notify every referrer, then erase the registration.
void SetName (const char *pszName)
 Register the object under a different name.
void AddRef (RndObject *pReferrer)
 Register an object as a store of a pointer to this one.
void RemoveRef (RndObject *pReferrer)
 Drop the first registration AddRef() made for a referrer.
const char * GetName () const
const std::list< RndObject * > & GetRefs () const
int GetInternal () const
void SetInternal (int nInternal)
Public Member Functions inherited from RndTransformable
 RndTransformable ()
 Construct a transformable with identity transforms, no origin offset, and no billboard.
 ~RndTransformable () override
 Drop the references on the children.
virtual void SetBillboard (int nBillboard)
 Set the billboard mode.
virtual int UpdateWorldXfm (RndTransformable *pParent, int bForce)
 Recompute the world transform when it, or the parent's, changed, and then the children's.
void DumpText (PrnStream &stream) override
 Write a description of the transformable.
void Save (BinStream &stream) override
 Write the transforms, the names of the children, the billboard mode, and the origin.
void Replace (RndObject *pFrom, RndObject *pTo) override
 Replace a child with another object.
void Copy (const RndObject *pSource, int nFlags) override
 Copy the transforms, the billboard mode, the origin, and the children when the flags request them.
void Load (BinStream &stream) override
 Read what Save() wrote, or an earlier version of it.
void SetOrigin (const Vector3 &origin)
 Set the point the world transform subtracts first when there is no billboard.
RndTransformable * Parent ()
 Find the transformable whose children include this object.
bool AddTrans (RndTransformable *pTrans)
 Append a child and mark its world transform dirty.
void RemoveTrans (RndTransformable *pTrans)
 Remove a child.
void ClearTrans ()
 Remove every child.
const Transform & BillboardXfm ()
 Report the world transform turned to face the current camera.
const Transform & GetLocalXfm () const
Transform & GetLocalXfm ()
void SetLocalXfm (const Transform &xfm)
const Transform & GetWorldXfm () const
Transform & GetWorldXfm ()
int GetDirty () const
void SetDirty (int nDirty)
const std::list< RndTransformable * > & GetTransList () const
Public Member Functions inherited from RndDrawable
 RndDrawable ()
 Construct a showing drawable without a highlight or children.
 ~RndDrawable () override
 Drop the references on the children.
virtual void SetShowing (int nShowing)
 Set whether the drawable draws at all.
virtual void SetHighlight (int nHighlight)
 Set whether the drawable draws with its highlight treatment.
virtual int DrawShowing ()
 Draw the drawable alone.
RndDrawable * Parent ()
 Find the drawable whose children include this one.
void Draw ()
 Draw the drawable and then its children, when it is showing.
bool AddDraw (RndDrawable *pDraw, RndDrawable *pBefore)
 Add a child before another.
void RemoveDraw (RndDrawable *pDraw)
 Remove a child.
void ClearDraws ()
 Remove every child.
int GetShowing () const
const std::list< RndDrawable * > & GetDraws () const

Static Public Member Functions

static RndObject * New (const char *pszName)
 Create a system.
Static Public Member Functions inherited from RndAnimatable
static Filter * NewFilter (int nType)
 Create a filter stage of a type, with its parameters unset.
static void CollectChildren (std::list< RndObject * > &objects, RndAnimatable *pAnimatable)
 Append every animation descendant of an animatable, depth first, each before its descendants.
Static Public Member Functions inherited from RndTransformable
static void CollectChildren (std::list< RndObject * > &objects, RndTransformable *pTransformable)
 Append every transform descendant of a transformable, depth first, each before its descendants.
Static Public Member Functions inherited from RndDrawable
static void CollectChildren (std::list< RndObject * > &objects, RndDrawable *pDrawable)
 Append every draw descendant of a drawable, depth first, each before its descendants.

Public Attributes

std::unique_ptr< Particle[]> mParticles

Static Public Attributes

static constexpr int kCopyShareParticles = 0x400
 The bit of the Copy() flags that shares the source's pool rather than allocating one.
static const char * sClassName
 The class name a .rnd file writes, ParticleSys.
static int sRev
 The format version Save() writes and Load() accepts.
static int sLoadRev
 The version Load() read last.
Static Public Attributes inherited from RndAnimatable
static int sRev
 The format version Save() writes and Load() accepts.
Static Public Attributes inherited from RndObject
static constexpr int kCopyChildLists = 0x200
 The bit of the Copy() flags that copies the child lists of the mix-ins.
Static Public Attributes inherited from RndTransformable
static int sRev
 The format version Save() writes and Load() accepts.
Static Public Attributes inherited from RndDrawable
static int sRev
 The format version Save() writes and Load() accepts.

Protected Member Functions

void AddObjectRefs ()
 Take the references on the material and the owner, and prepare the pool.
void RemoveObjectRefs ()
 Drop the references on the material and the owner, free the live particles, and withdraw from the sharers of the owner.
Protected Member Functions inherited from RndAnimatable
void ReleaseObjects ()
 Drop the references on the children without emptying the list, and delete the filters.
void AcquireAnimRefs ()
 Take a reference on every child.
Protected Member Functions inherited from RndTransformable
void ReleaseTransRefs ()
 Drop the reference on every child without emptying the list.
void AcquireTransRefs ()
 Take a reference on every child.
Protected Member Functions inherited from RndDrawable
void ReleaseDrawRefs ()
 Drop the reference on every child without emptying the list.
void AcquireDrawRefs ()
 Take a reference on every child.

Protected Attributes

Particle * mLiveParticles
RndMat * mMat
Mode mMode
int mReadZ
Protected Attributes inherited from RndAnimatable
std::list< RndAnimatable * > mAnims
std::list< Filter * > mFilters
float mFrame
float mFilteredFrame
Protected Attributes inherited from RndObject
std::list< RndObject * > mRefs
String mName
Protected Attributes inherited from RndTransformable
std::list< RndTransformable * > mTransList
Transform mLocalXfm
Transform mWorldXfm
Vector3 mOrigin
int mDirty
int mBillboard
Protected Attributes inherited from RndDrawable
int mShowing

Detailed Description

Emitter that spawns, moves, and fades a population of particles.

The RTTI includes the class name and records RndAnimatable, RndTransformable, and RndDrawable as bases. The pool belongs to mParticlesOwner, possibly another system. Each system has a separate live list, drawn from the free list of the owner. The platform subclass draws the particles.

Member Enumeration Documentation

◆ Mode

The primitive each particle is drawn as.

Enumerator
kModePoint 

A point.

kModeLine 

A line.

kModeSprite 

A sprite.

Constructor & Destructor Documentation

◆ RndParticleSys()

RndParticleSys::RndParticleSys ( const char * pszName)
explicit

Construct a system with a pool of 10 particles.

The particles are white, last 100 frames, start at the origin, and move at speed 1.

Parameters
pszNameThe registry key.
Ghidra address:
NTSC-U/C: 0x0023efb8
Ghidra address:
PAL: 0x00247ae8

◆ ~RndParticleSys()

RndParticleSys::~RndParticleSys ( )
override

Free the particles and the pool.

Ghidra address:
NTSC-U/C: 0x0023eb48
Ghidra address:
PAL: 0x00247678

Member Function Documentation

◆ operator new()

void * RndParticleSys::operator new ( size_t nSize)
inline

Allocate a system, billed to the class name.

Parameters
nSizeThe object size the compiler supplies.
Returns
The block.

◆ operator delete()

void RndParticleSys::operator delete ( void * pBlock)
inline

Release a system.

Parameters
pBlockThe block.

◆ SetFrameSelf()

int RndParticleSys::SetFrameSelf ( float fFrame)
overridevirtual

Move the particles on to a frame, then emit for the elapsed frames unless SetEmitFrame() clocks the emission.

The particles do not move on the first frame.

Parameters
fFrameThe frame.
Returns
1, to pass the frame on to the children.
Ghidra address:
NTSC-U/C: 0x0023e268
Ghidra address:
PAL: 0x00246d98

Reimplemented from RndAnimatable.

◆ ListDrawObjects()

void RndParticleSys::ListDrawObjects ( std::list< RndObject * > & objects)
overridevirtual

Add the system, the material, and the textures of the material's stages, last first, to a list.

Parameters
objectsThe list to add to.
Ghidra address:
NTSC-U/C: 0x0023f968
Ghidra address:
PAL: 0x00248498

Reimplemented from RndDrawable.

◆ ListDrawables()

void RndParticleSys::ListDrawables ( std::list< RndDrawable * > & drawables)
overridevirtual

Add the system, when a live particle is inside the view volume of the current camera, then the children, to a list.

Parameters
drawablesThe list to add to.
Ghidra address:
NTSC-U/C: 0x0023fb50
Ghidra address:
PAL: 0x00248680

Reimplemented from RndDrawable.

◆ DumpText()

void RndParticleSys::DumpText ( PrnStream & stream)
overridevirtual

Write a description of the system and its bases.

The pool is listed at a dump level of 2 and above.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x0023cb08
Ghidra address:
PAL: 0x00245688

Reimplemented from RndAnimatable.

◆ Save()

void RndParticleSys::Save ( BinStream & stream)
overridevirtual

Write the system and its bases.

The collision plane is written as a point on it followed by its normal.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x0023cf88
Ghidra address:
PAL: 0x00245b08

Reimplemented from RndAnimatable.

◆ Replace()

void RndParticleSys::Replace ( RndObject * pFrom,
RndObject * pTo )
overridevirtual

Replace a referenced object with another in the bases, the material, and the pool owner.

A pool owner replaced by null becomes the system itself.

Parameters
pFromThe object being replaced.
pToThe replacement, or null.
Ghidra address:
NTSC-U/C: 0x0023dfd8
Ghidra address:
PAL: 0x00246b08

Reimplemented from RndAnimatable.

◆ ClassName()

const char * RndParticleSys::ClassName ( ) const
inlineoverridevirtual

Report the class name.

Returns
sClassName.
Ghidra address:
NTSC-U/C: 0x00390708
Ghidra address:
PAL: 0x003fee10

Implements RndObject.

◆ Copy()

void RndParticleSys::Copy ( const RndObject * pSource,
int nFlags )
overridevirtual

Copy another system and its bases.

The line length is not copied. The pool is shared when the flags include kCopyShareParticles or the source is not the owner of its pool.

Parameters
pSourceThe system to copy from.
nFlagsThe set of fields to copy.
Ghidra address:
NTSC-U/C: 0x0023c938
Ghidra address:
PAL: 0x002454b8

Reimplemented from RndAnimatable.

◆ Load()

void RndParticleSys::Load ( BinStream & stream)
overridevirtual

Read what Save() wrote, or an earlier version of it.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x0023d648
Ghidra address:
PAL: 0x002461a8

Reimplemented from RndAnimatable.

◆ SetNumParticles()

void RndParticleSys::SetNumParticles ( int nCount)

Set the pool size, then reallocate the pool of the owner.

Parameters
nCountThe number of particles.
Ghidra address:
NTSC-U/C: 0x0023c8b8
Ghidra address:
PAL: 0x00245438

◆ SetParticlesOwner()

void RndParticleSys::SetParticlesOwner ( RndParticleSys * pOwner)

Set the system whose pool this one draws from.

Parameters
pOwnerThe owner, or this system.
Ghidra address:
NTSC-U/C: 0x0023c8f8
Ghidra address:
PAL: 0x00245478

◆ SetMat()

void RndParticleSys::SetMat ( RndMat * pMat)

Set the material the particles are drawn with.

Parameters
pMatThe material, or null.
Ghidra address:
NTSC-U/C: 0x0023f798
Ghidra address:
PAL: 0x002482c8

◆ NumLiveParticles()

int RndParticleSys::NumLiveParticles ( ) const

Report the number of live particles.

Returns
The length of the live list.
Ghidra address:
NTSC-U/C: 0x0023f930
Ghidra address:
PAL: 0x00248460

◆ AllocParticle()

Particle * RndParticleSys::AllocParticle ( )

Move a particle from the free list of the owner to the head of the live list.

Returns
The particle, or null when the pool is exhausted.
Ghidra address:
NTSC-U/C: 0x0023e158
Ghidra address:
PAL: 0x00246c88

◆ FreeParticle()

Particle * RndParticleSys::FreeParticle ( Particle * pParticle)

Move a live particle to the free list of the owner.

A particle that is already free is reported and not moved.

Parameters
pParticleThe particle, or null.
Returns
The particle after it in the live list, or null.
Ghidra address:
NTSC-U/C: 0x0023e1b0
Ghidra address:
PAL: 0x00246ce0

◆ FreeAllParticles()

void RndParticleSys::FreeAllParticles ( )

Free every live particle.

Ghidra address:
NTSC-U/C: 0x0023e7e0
Ghidra address:
PAL: 0x00247310

◆ SetEmitFrame()

void RndParticleSys::SetEmitFrame ( float fFrame)

Emit for the frames since the previous call, and clock the emission from then on in place of SetFrameSelf().

The first call does not emit particles. The name is inferred.

Parameters
fFrameThe frame.
Ghidra address:
NTSC-U/C: 0x0023e2f0
Ghidra address:
PAL: 0x00246e20

◆ ResetEmitFrame()

void RndParticleSys::ResetEmitFrame ( )

Return the emission clock to SetFrameSelf().

The name is inferred.

Ghidra address:
NTSC-U/C: 0x0023e348
Ghidra address:
PAL: 0x00246e78

◆ SpawnParticles()

void RndParticleSys::SpawnParticles ( float fDelta)

Emit the particles the emission rate owes for a number of frames.

The remaining fraction of a particle is retained for the next call, and dropped when the pool is exhausted.

Parameters
fDeltaThe number of frames.
Ghidra address:
NTSC-U/C: 0x0023e360
Ghidra address:
PAL: 0x00246e90

◆ RandomizeColorAndSize()

void RndParticleSys::RandomizeColorAndSize ( Particle * pParticle)

Give a particle a colour and a size from the start ranges.

Parameters
pParticleThe particle.
Ghidra address:
NTSC-U/C: 0x0023e760
Ghidra address:
PAL: 0x00247290

◆ UpdateParticles()

void RndParticleSys::UpdateParticles ( float fDelta)

Free the particles outside their lives, and move and fade the others over a number of frames.

A particle behind the collision plane that moves further behind it is reflected.

Parameters
fDeltaThe number of frames.
Ghidra address:
NTSC-U/C: 0x0023e830
Ghidra address:
PAL: 0x00247360

◆ New()

RndObject * RndParticleSys::New ( const char * pszName)
inlinestatic

Create a system.

Parameters
pszNameThe registry key.
Returns
The system.
Ghidra address:
NTSC-U/C: 0x00390790
Ghidra address:
PAL: 0x003fee98

◆ GetParticles()

Particle * RndParticleSys::GetParticles ( ) const
inline
Returns
The pool.

◆ GetBubble()

int RndParticleSys::GetBubble ( ) const
inline
Returns
Non-zero to add the bubble motion.

◆ SetBubble()

void RndParticleSys::SetBubble ( int nBubble)
inline
Parameters
nBubbleNon-zero to add the bubble motion.

◆ GetBubblePeriod()

const Vector2 & RndParticleSys::GetBubblePeriod ( ) const
inline
Returns
The range of the period of the bubble motion.

◆ SetBubblePeriod()

void RndParticleSys::SetBubblePeriod ( const Vector2 & range)
inline
Parameters
rangeThe range of the period of the bubble motion.

◆ GetBubbleSize() [1/2]

const Vector2 & RndParticleSys::GetBubbleSize ( ) const
inline
Returns
The range of the size of the bubble motion.

◆ GetBubbleSize() [2/2]

Vector2 & RndParticleSys::GetBubbleSize ( )
inline
Returns
The range of the size of the bubble motion, for writing.

◆ SetBubbleSize()

void RndParticleSys::SetBubbleSize ( const Vector2 & range)
inline
Parameters
rangeThe range of the size of the bubble motion.

◆ GetCollide()

int RndParticleSys::GetCollide ( ) const
inline
Returns
Non-zero to reflect the particles off mCollidePlane.

◆ SetCollide()

void RndParticleSys::SetCollide ( int nCollide)
inline
Parameters
nCollideNon-zero to reflect the particles off mCollidePlane.

◆ GetCollidePlane()

const Plane & RndParticleSys::GetCollidePlane ( ) const
inline
Returns
The collision plane, in world space.

◆ SetCollidePlane()

void RndParticleSys::SetCollidePlane ( const Plane & plane)
inline
Parameters
planeThe collision plane, in world space.

◆ GetEmitRate() [1/2]

const Vector2 & RndParticleSys::GetEmitRate ( ) const
inline
Returns
The range of the particles emitted per frame.

◆ GetEmitRate() [2/2]

Vector2 & RndParticleSys::GetEmitRate ( )
inline
Returns
The range of the particles emitted per frame, for writing.

◆ GetEndColorHigh() [1/2]

const Color & RndParticleSys::GetEndColorHigh ( ) const
inline
Returns
The high end of the colour a particle fades to.

◆ GetEndColorHigh() [2/2]

Color & RndParticleSys::GetEndColorHigh ( )
inline
Returns
The high end of the colour a particle fades to, for writing.

◆ SetEndColorHigh()

void RndParticleSys::SetEndColorHigh ( const Color & color)
inline
Parameters
colorThe high end of the colour a particle fades to.

◆ GetEndColorLow() [1/2]

const Color & RndParticleSys::GetEndColorLow ( ) const
inline
Returns
The low end of the colour a particle fades to.

◆ GetEndColorLow() [2/2]

Color & RndParticleSys::GetEndColorLow ( )
inline
Returns
The low end of the colour a particle fades to, for writing.

◆ SetEndColorLow()

void RndParticleSys::SetEndColorLow ( const Color & color)
inline
Parameters
colorThe low end of the colour a particle fades to.

◆ GetForce() [1/2]

const Vector3 & RndParticleSys::GetForce ( ) const
inline
Returns
The change of velocity per frame.

◆ GetForce() [2/2]

Vector3 & RndParticleSys::GetForce ( )
inline
Returns
The change of velocity per frame, for writing.

◆ SetForce()

void RndParticleSys::SetForce ( const Vector3 & force)
inline
Parameters
forceThe change of velocity per frame.

◆ GetLife() [1/2]

const Vector2 & RndParticleSys::GetLife ( ) const
inline
Returns
The range of the life, in frames.

◆ GetLife() [2/2]

Vector2 & RndParticleSys::GetLife ( )
inline
Returns
The range of the life, in frames, for writing.

◆ SetLife()

void RndParticleSys::SetLife ( const Vector2 & range)
inline
Parameters
rangeThe range of the life, in frames.

◆ GetLiveParticles()

Particle * RndParticleSys::GetLiveParticles ( ) const
inline
Returns
The head of the live list.

◆ GetMode()

Mode RndParticleSys::GetMode ( ) const
inline
Returns
The primitive each particle is drawn as.

◆ SetMode()

void RndParticleSys::SetMode ( Mode pMode)
inline
Parameters
pModeThe primitive each particle is drawn as.

◆ GetNumParticles()

int RndParticleSys::GetNumParticles ( ) const
inline
Returns
The size of the pool.

◆ GetParticlesOwner()

RndParticleSys * RndParticleSys::GetParticlesOwner ( ) const
inline
Returns
The system that has the pool. Borrowed.

◆ GetPitch()

const Vector2 & RndParticleSys::GetPitch ( ) const
inline
Returns
The range of the pitch of the direction, in radians.

◆ SetPitch()

void RndParticleSys::SetPitch ( const Vector2 & range)
inline
Parameters
rangeThe range of the pitch of the direction, in radians.

◆ GetPosHigh() [1/2]

const Vector3 & RndParticleSys::GetPosHigh ( ) const
inline
Returns
The high corner of the emission box, in local space.

◆ GetPosHigh() [2/2]

Vector3 & RndParticleSys::GetPosHigh ( )
inline
Returns
The high corner of the emission box, in local space, for writing.

◆ SetPosHigh()

void RndParticleSys::SetPosHigh ( const Vector3 & pos)
inline
Parameters
posThe high corner of the emission box, in local space.

◆ GetPosLow() [1/2]

const Vector3 & RndParticleSys::GetPosLow ( ) const
inline
Returns
The low corner of the emission box, in local space.

◆ GetPosLow() [2/2]

Vector3 & RndParticleSys::GetPosLow ( )
inline
Returns
The low corner of the emission box, in local space, for writing.

◆ SetPosLow()

void RndParticleSys::SetPosLow ( const Vector3 & pos)
inline
Parameters
posThe low corner of the emission box, in local space.

◆ GetReadZ()

int RndParticleSys::GetReadZ ( ) const
inline
Returns
Non-zero to test the particles against the depth buffer.

◆ SetReadZ()

void RndParticleSys::SetReadZ ( int nReadZ)
inline
Parameters
nReadZNon-zero to test the particles against the depth buffer.

◆ GetSize() [1/2]

const Vector2 & RndParticleSys::GetSize ( ) const
inline
Returns
The range of the size.

◆ GetSize() [2/2]

Vector2 & RndParticleSys::GetSize ( )
inline
Returns
The range of the size, for writing.

◆ GetSpeed() [1/2]

const Vector2 & RndParticleSys::GetSpeed ( ) const
inline
Returns
The range of the speed.

◆ GetSpeed() [2/2]

Vector2 & RndParticleSys::GetSpeed ( )
inline
Returns
The range of the speed, for writing.

◆ SetSpeed()

void RndParticleSys::SetSpeed ( const Vector2 & range)
inline
Parameters
rangeThe range of the speed.

◆ GetStartColorHigh() [1/2]

const Color & RndParticleSys::GetStartColorHigh ( ) const
inline
Returns
The high end of the colour a particle starts with.

◆ GetStartColorHigh() [2/2]

Color & RndParticleSys::GetStartColorHigh ( )
inline
Returns
The high end of the colour a particle starts with, for writing.

◆ SetStartColorHigh()

void RndParticleSys::SetStartColorHigh ( const Color & color)
inline
Parameters
colorThe high end of the colour a particle starts with.

◆ GetStartColorLow() [1/2]

const Color & RndParticleSys::GetStartColorLow ( ) const
inline
Returns
The low end of the colour a particle starts with.

◆ GetStartColorLow() [2/2]

Color & RndParticleSys::GetStartColorLow ( )
inline
Returns
The low end of the colour a particle starts with, for writing.

◆ SetStartColorLow()

void RndParticleSys::SetStartColorLow ( const Color & color)
inline
Parameters
colorThe low end of the colour a particle starts with.

◆ GetYaw()

const Vector2 & RndParticleSys::GetYaw ( ) const
inline
Returns
The range of the yaw of the direction, in radians.

◆ SetYaw()

void RndParticleSys::SetYaw ( const Vector2 & range)
inline
Parameters
rangeThe range of the yaw of the direction, in radians.

◆ AddObjectRefs()

void RndParticleSys::AddObjectRefs ( )
protected

Take the references on the material and the owner, and prepare the pool.

An owner reallocates its pool and empties the live list of every sharer. A sharer joins the sharers of its owner. The name is inferred.

Ghidra address:
NTSC-U/C: 0x0023dd38
Ghidra address:
PAL: 0x00246868

◆ RemoveObjectRefs()

void RndParticleSys::RemoveObjectRefs ( )
protected

Drop the references on the material and the owner, free the live particles, and withdraw from the sharers of the owner.

The name is inferred.

Ghidra address:
NTSC-U/C: 0x0023df00
Ghidra address:
PAL: 0x00246a30

Member Data Documentation

◆ kCopyShareParticles

int RndParticleSys::kCopyShareParticles = 0x400
staticconstexpr

The bit of the Copy() flags that shares the source's pool rather than allocating one.

◆ sClassName

const char* RndParticleSys::sClassName
static

The class name a .rnd file writes, ParticleSys.

Ghidra address:
NTSC-U/C: 0x003b0a38
Ghidra address:
PAL: 0x0042f8d0

◆ sRev

int RndParticleSys::sRev
static

The format version Save() writes and Load() accepts.

Ghidra address:
NTSC-U/C: 0x003b0a3c

◆ sLoadRev

int RndParticleSys::sLoadRev
static

The version Load() read last.

Ghidra address:
NTSC-U/C: 0x0043c7d4

◆ mParticles

std::unique_ptr<Particle[]> RndParticleSys::mParticles

The pool this system allocated.

◆ mLiveParticles

Particle* RndParticleSys::mLiveParticles
protected

The head of the live list.

◆ mMat

RndMat* RndParticleSys::mMat
protected

The material the particles are drawn with.

◆ mMode

Mode RndParticleSys::mMode
protected

The primitive each particle is drawn as.

◆ mReadZ

int RndParticleSys::mReadZ
protected

Non-zero to test the particles against the depth buffer.


The documentation for this class was generated from the following file: