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

Mesh drawn once at each of a list of transforms. More...

#include <rndmultimesh.h>

Inheritance diagram for RndMultiMesh:
Collaboration diagram for RndMultiMesh:

Public Member Functions

 RndMultiMesh (const char *pszName)
 Construct a multimesh without a mesh or instances.
 ~RndMultiMesh () override
 Drop the reference on the mesh.
void ListDrawObjects (std::list< RndObject * > &objects) override
 Add the draw objects of the mesh to a list.
void ListDrawables (std::list< RndDrawable * > &drawables) override
 Add the multimesh, when the mesh has something to draw at an instance, then the children, to a list.
int DrawShowing () override
 Draw the mesh at each instance.
void DumpText (PrnStream &stream) override
 Write a description of the multimesh and its base.
void Save (BinStream &stream) override
 Write the multimesh and its base.
void Replace (RndObject *pFrom, RndObject *pTo) override
 Replace a child, or the mesh, with another object.
const char * ClassName () const override
 Report the class name.
void Copy (const RndObject *pSource, int nFlags) override
 Copy another multimesh and its base.
void Load (BinStream &stream) override
 Read what Save() wrote.
void SetMesh (RndMesh *pMesh)
 Set the mesh to draw.
RndMesh * GetMesh () const
const std::list< Transform > & GetTransforms () const
std::list< Transform > & GetTransforms ()
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.
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
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)

Static Public Member Functions

static RndObject * New (const char *pszName)
 Create a multimesh.
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.

Static Public Attributes

static const char * sClassName
 The class name a .rnd file writes, MultiMesh.
static int sRev
 The format version Save() writes and Load() accepts.
static int sLoadRev
 The version Load() read last.
Static Public Attributes inherited from RndDrawable
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.

Protected Member Functions

void AcquireRefs ()
 Take a reference on the mesh.
void ReleaseRefs ()
 Drop the reference on the mesh.
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

RndMesh * mMesh
std::list< Transform > mTransforms
Protected Attributes inherited from RndDrawable
int mShowing
Protected Attributes inherited from RndObject
std::list< RndObject * > mRefs
String mName

Detailed Description

Mesh drawn once at each of a list of transforms.

The RTTI includes the class name and records RndDrawable as the one base. Each draw moves the mesh to an instance transform. The mesh is moved back afterwards.

Constructor & Destructor Documentation

◆ RndMultiMesh()

RndMultiMesh::RndMultiMesh ( const char * pszName)
explicit

Construct a multimesh without a mesh or instances.

Parameters
pszNameThe registry key.
Ghidra address:
NTSC-U/C: 0x0023b9e8
Ghidra address:
PAL: 0x00244568

◆ ~RndMultiMesh()

RndMultiMesh::~RndMultiMesh ( )
override

Drop the reference on the mesh.

Ghidra address:
NTSC-U/C: 0x0023b798
Ghidra address:
PAL: 0x00244318

Member Function Documentation

◆ ListDrawObjects()

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

Add the draw objects of the mesh to a list.

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

Reimplemented from RndDrawable.

◆ ListDrawables()

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

Add the multimesh, when the mesh has something to draw at an instance, then the children, to a list.

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

Reimplemented from RndDrawable.

◆ DrawShowing()

int RndMultiMesh::DrawShowing ( )
overridevirtual

Draw the mesh at each instance.

Returns
1, to draw the children.
Ghidra address:
NTSC-U/C: 0x0023b5d8
Ghidra address:
PAL: 0x00244158

Reimplemented from RndDrawable.

◆ DumpText()

void RndMultiMesh::DumpText ( PrnStream & stream)
overridevirtual

Write a description of the multimesh and its base.

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

Reimplemented from RndDrawable.

◆ Save()

void RndMultiMesh::Save ( BinStream & stream)
overridevirtual

Write the multimesh and its base.

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

Reimplemented from RndDrawable.

◆ Replace()

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

Replace a child, or the mesh, with another object.

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

Reimplemented from RndDrawable.

◆ ClassName()

const char * RndMultiMesh::ClassName ( ) const
inlineoverridevirtual

Report the class name.

Returns
sClassName.
Ghidra address:
NTSC-U/C: 0x00390158
Ghidra address:
PAL: 0x003fe860

Implements RndObject.

◆ Copy()

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

Copy another multimesh and its base.

Parameters
pSourceThe multimesh to copy from.
nFlagsThe set of fields to copy.
Ghidra address:
NTSC-U/C: 0x0023b178
Ghidra address:
PAL: 0x00243cf8

Reimplemented from RndDrawable.

◆ Load()

void RndMultiMesh::Load ( BinStream & stream)
overridevirtual

Read what Save() wrote.

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

Reimplemented from RndDrawable.

◆ SetMesh()

void RndMultiMesh::SetMesh ( RndMesh * pMesh)

Set the mesh to draw.

Parameters
pMeshThe mesh, or null.
Ghidra address:
NTSC-U/C: 0x0023bc78
Ghidra address:
PAL: 0x002447f8

◆ New()

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

Create a multimesh.

Parameters
pszNameThe registry key.
Returns
The multimesh.
Ghidra address:
NTSC-U/C: 0x00390170
Ghidra address:
PAL: 0x003fe878

◆ GetMesh()

RndMesh * RndMultiMesh::GetMesh ( ) const
inline
Returns
The mesh to draw.

◆ GetTransforms() [1/2]

const std::list< Transform > & RndMultiMesh::GetTransforms ( ) const
inline
Returns
The transform of each instance, as the mesh's local.

◆ GetTransforms() [2/2]

std::list< Transform > & RndMultiMesh::GetTransforms ( )
inline
Returns
The transform of each instance, as the mesh's local, for writing.

◆ AcquireRefs()

void RndMultiMesh::AcquireRefs ( )
protected

Take a reference on the mesh.

The name is inferred.

Ghidra address:
NTSC-U/C: 0x0023b4a0
Ghidra address:
PAL: 0x00244020

◆ ReleaseRefs()

void RndMultiMesh::ReleaseRefs ( )
protected

Drop the reference on the mesh.

The name is inferred.

Ghidra address:
NTSC-U/C: 0x0023b4d0
Ghidra address:
PAL: 0x00244050

Member Data Documentation

◆ sClassName

const char* RndMultiMesh::sClassName
static

The class name a .rnd file writes, MultiMesh.

Ghidra address:
NTSC-U/C: 0x003b0a30
Ghidra address:
PAL: 0x0042f8c8

◆ sRev

int RndMultiMesh::sRev
static

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

Ghidra address:
NTSC-U/C: 0x003b0a34
Ghidra address:
PAL: 0x0042f8cc

◆ sLoadRev

int RndMultiMesh::sLoadRev
static

The version Load() read last.

Ghidra address:
NTSC-U/C: 0x0043c7d0

◆ mMesh

RndMesh* RndMultiMesh::mMesh
protected

The mesh to draw.

◆ mTransforms

std::list<Transform> RndMultiMesh::mTransforms
protected

The transform of each instance, as the mesh's local.


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