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

Triangle mesh with a material. More...

#include <rndmesh.h>

Inheritance diagram for RndMesh:
Collaboration diagram for RndMesh:

Classes

class  Vert
 One vertex. More...
class  Face
 One triangle, as indices into the vertices. More...
class  Edge
 One edge, as indices into the vertices. More...
struct  Bones
 The two bone transforms the vertex weights blend. More...

Public Types

enum  ZMode {
  kZModeDisable = 0 , kZModeZReadOnly = 1 , kZModeZReadWrite = 2 , kZModeWReadOnly = 3 ,
  kZModeWReadWrite = 4
}
 How drawing reads and writes depth. More...
enum  ZFunc {
  kZFuncNever = 0 , kZFuncLess = 1 , kZFuncEqual = 2 , kZFuncLessEqual = 3 ,
  kZFuncGreater = 4 , kZFuncNotEqual = 5 , kZFuncGreaterEqual = 6 , kZFuncAlways = 7
}
 The depth comparison. More...
enum  SyncFlags {
  kSyncPositions = 1 , kSyncNormals = 4 , kSyncColors = 8 , kSyncTexCoords = 0x10 ,
  kSyncVertexData = 0x1f , kSyncFaces = 0x20 , kSyncEdges = 0x40 , kSyncAll = 0x7f
}
 The parts of the geometry Sync() rebuilds. 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

 RndMesh (const char *pszName)
 Construct an empty mesh that draws with a Z depth test and write, passing when nearer.
 ~RndMesh () override
 Drop the references the mesh has.
void * operator new (size_t nSize)
 Allocate a mesh, billed to the class name.
void operator delete (void *pBlock)
 Release a mesh.
void ListDrawObjects (std::list< RndObject * > &objects) override
 Add the mesh, its material, its owners, the textures of the material stages from the last, and the bones to a list.
void ListDrawables (std::list< RndDrawable * > &drawables) override
 Add the mesh and then its children to a list, unless the mesh is outside the view of the current camera.
virtual void Sync (int nFlags)
 Rebuild what the back end derives from parts of the geometry.
void Collide (const Segment &segment, std::list< Collision > &collisions) override
 Add each face the segment strikes, then what the children strike, to a list.
void DumpText (PrnStream &stream) override
 Write a description of the mesh and its bases.
void Save (BinStream &stream) override
 Write the mesh and its bases.
void Replace (RndObject *pFrom, RndObject *pTo) override
 Replace a referenced object with another.
const char * ClassName () const override
 Report the class name.
void Copy (const RndObject *pSource, int nFlags) override
 Copy another mesh and its bases.
void Load (BinStream &stream) override
 Read what Save() wrote, or an earlier version of it.
void SetMat (RndMat *pMat)
 Set the material.
bool CheckLod (Sphere &worldSphere)
 Report whether the mesh itself is to be drawn, drawing a lower detail mesh in its place when the current camera shows it too small.
void BoundingBox (Box &box)
 Compute the bounding box of the vertices in the mesh's own space.
void TransformVerts (const Transform &xfm)
 Move every vertex of the geometry by a transform, then rebuild the positions and normals.
void AddQuad (unsigned short nV0, unsigned short nV1, unsigned short nV2, unsigned short nV3)
 Append the two triangles of a quad to the faces of mGeomOwner.
void AddQuadStrip (int nRowA, int nRowB, int nCount, int nStride, int nStep)
 Append the quads between two rows of vertices with AddQuad().
void FillEdges (int nEdgeA, int nEdgeB, int nCount, int nStride, const Vector3 &pointA0, const Vector3 &pointB0, const Vector3 &pointA1, const Vector3 &pointB1, const Vector2 &texA0, const Vector2 &texB0, const Vector2 &texA1, const Vector2 &texB1, const Vector2 &weightsA0, const Vector2 &weightsB0, const Vector2 &weightsA1, const Vector2 &weightsB1, const Color &colorA0, const Color &colorB0, const Color &colorA1, const Color &colorB1, const Vector3 &normA, const Vector3 &normB)
 Fill the vertices of two edges of a tunnel panel, interpolating every field along them.
const std::vector< Face > & GetFaces () const
std::vector< Face > & GetFaces ()
RndMesh * GetGeomOwner () const
RndMat * GetMat () const
float GetMinScreen () const
int GetMutable () const
void SetMutable (int nMutable)
const Sphere & GetSphere () const
Sphere & GetSphere ()
const std::vector< Vert > & GetVerts () const
std::vector< Vert > & GetVerts ()
int GetZFunc () const
void SetZFunc (int nZFunc)
int GetZMode () const
void SetZMode (int nZMode)
virtual void Collide (const Vector2 &point, std::list< Collision > &collisions)
 Test a screen point against the collideable and add what it strikes to a list.
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
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 RndCollideable
 RndCollideable ()
 Construct a collideable without children.
 ~RndCollideable () override
 Drop the references on the children.
RndCollideable * Parent ()
 Find the collideable whose children include this one.
bool AddCollide (RndCollideable *pCollide)
 Append a child.
void RemoveCollide (RndCollideable *pCollide)
 Remove a child.

Static Public Member Functions

static RndObject * New (const char *pszName)
 Create a mesh.
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 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 RndCollideable
static void CollectChildren (std::list< RndObject * > &objects, RndCollideable *pCollideable)
 Append every collision descendant of a collideable, depth first, each before its descendants.

Static Public Attributes

static constexpr int kCopyShareGeometry = 8
 The bit of the Copy() flags that shares the source's geometry rather than copying it.
static constexpr int kCopyBones = 0x20
 The bit of the Copy() flags that copies the bones.
static const char * sClassName
 The class name a .rnd file writes, Mesh.
static int sRev
 The format version Save() writes and Load() accepts.
static int sLoadRev
 The version Load() read last, which the vertex and face readers read by.
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.
Static Public Attributes inherited from RndTransformable
static int sRev
 The format version Save() writes and Load() accepts.
Static Public Attributes inherited from RndCollideable
static int sRev
 The format version Save() writes and Load() accepts.

Protected Member Functions

void ReleaseRefs ()
 Drop the references on the next mesh, the material, the owners, and the bones, and delete the bones.
void AcquireRefs ()
 Take references on the next mesh, the material, the owners, and the bones, then rebuild everything.
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 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 RndCollideable
void ReleaseCollideRefs ()
 Drop the reference on every child without emptying the list.
void AcquireCollideRefs ()
 Take a reference on every child.

Protected Attributes

int mZMode
int mZFunc
std::vector< Vert > mVerts
std::vector< Face > mFaces
std::vector< Edge > mEdges
RndMat * mMat
Sphere mSphere
RndMesh * mGeomOwner
RndTransformable * mTransOwner
std::unique_ptr< Bones > mBones
float mMinScreen
RndMesh * mNext
int mMutable
Protected Attributes inherited from RndDrawable
int mShowing
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

Detailed Description

Triangle mesh with a material.

The RTTI includes the class name and records RndDrawable, RndTransformable, and RndCollideable as bases. The geometry may be shared, in which case mGeomOwner identifies the mesh that has it, and the transform may come from another transformable, mTransOwner. A chain of lower detail meshes follows mNext.

Member Enumeration Documentation

◆ ZMode

How drawing reads and writes depth.

Enumerator
kZModeDisable 

No depth test or write.

kZModeZReadOnly 

Z depth test without a write.

kZModeZReadWrite 

Z depth test and write.

kZModeWReadOnly 

W depth test without a write.

kZModeWReadWrite 

W depth test and write.

◆ ZFunc

The depth comparison.

Enumerator
kZFuncNever 

Never pass.

kZFuncLess 

Pass when nearer.

kZFuncEqual 

Pass when equal.

kZFuncLessEqual 

Pass when nearer or equal.

kZFuncGreater 

Pass when farther.

kZFuncNotEqual 

Pass when different.

kZFuncGreaterEqual 

Pass when farther or equal.

kZFuncAlways 

Always pass.

◆ SyncFlags

The parts of the geometry Sync() rebuilds.

Enumerator
kSyncPositions 

The vertex positions.

kSyncNormals 

The vertex normals.

kSyncColors 

The vertex colours.

kSyncTexCoords 

The vertex texture coordinates.

kSyncVertexData 

Every vertex field.

kSyncFaces 

The faces.

kSyncEdges 

The edges.

kSyncAll 

Everything.

Constructor & Destructor Documentation

◆ RndMesh()

RndMesh::RndMesh ( const char * pszName)
explicit

Construct an empty mesh that draws with a Z depth test and write, passing when nearer.

The mesh is its own geometry owner and its own transform owner.

Parameters
pszNameThe registry key.
Ghidra address:
NTSC-U/C: 0x00232570
Ghidra address:
PAL: 0x0023b138

◆ ~RndMesh()

RndMesh::~RndMesh ( )
override

Drop the references the mesh has.

Ghidra address:
NTSC-U/C: 0x0038b0b0
Ghidra address:
PAL: 0x003f97b8

Member Function Documentation

◆ operator new()

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

Allocate a mesh, billed to the class name.

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

◆ operator delete()

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

Release a mesh.

Parameters
pBlockThe block.

◆ ListDrawObjects()

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

Add the mesh, its material, its owners, the textures of the material stages from the last, and the bones to a list.

The children are not added.

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

Reimplemented from RndDrawable.

◆ ListDrawables()

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

Add the mesh and then its children to a list, unless the mesh is outside the view of the current camera.

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

Reimplemented from RndDrawable.

◆ Sync()

virtual void RndMesh::Sync ( int nFlags)
inlinevirtual

Rebuild what the back end derives from parts of the geometry.

The base body does nothing. The name is inferred.

Parameters
nFlagsThe SyncFlags bits of the parts.
Ghidra address:
NTSC-U/C: 0x0038b610
Ghidra address:
PAL: 0x003f9d18

Reimplemented in PsMesh.

◆ Collide() [1/2]

void RndMesh::Collide ( const Segment & segment,
std::list< Collision > & collisions )
overridevirtual

Add each face the segment strikes, then what the children strike, to a list.

A hidden mesh adds nothing, and nor does a mesh whose bounding sphere the segment misses.

Parameters
segmentThe segment, in world space.
collisionsThe list to add to.
Ghidra address:
NTSC-U/C: 0x00232060
Ghidra address:
PAL: 0x0023ac28

Reimplemented from RndCollideable.

◆ DumpText()

void RndMesh::DumpText ( PrnStream & stream)
overridevirtual

Write a description of the mesh and its bases.

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

Reimplemented from RndDrawable.

◆ Save()

void RndMesh::Save ( BinStream & stream)
overridevirtual

Write the mesh and its bases.

Without bones, the mesh writes a 0 where the first bone name would go.

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

Reimplemented from RndDrawable.

◆ Replace()

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

Replace a referenced object with another.

An owner replaced by null becomes the mesh itself. Bones without a first bone are deleted.

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

Reimplemented from RndDrawable.

◆ ClassName()

const char * RndMesh::ClassName ( ) const
inlineoverridevirtual

Report the class name.

Returns
sClassName.
Ghidra address:
NTSC-U/C: 0x0038b5e8
Ghidra address:
PAL: 0x003f9cf0

Implements RndObject.

◆ Copy()

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

Copy another mesh and its bases.

The geometry is copied when the source has its own and the flags do not request sharing. Otherwise the source's geometry owner becomes this one's.

Parameters
pSourceThe mesh to copy from.
nFlagsThe set of fields to copy.
Ghidra address:
NTSC-U/C: 0x00234398
Ghidra address:
PAL: 0x0023cf18

Reimplemented from RndDrawable.

◆ Load()

void RndMesh::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: 0x00233738
Ghidra address:
PAL: 0x0023c2f0

Reimplemented from RndDrawable.

◆ SetMat()

void RndMesh::SetMat ( RndMat * pMat)

Set the material.

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

◆ CheckLod()

bool RndMesh::CheckLod ( Sphere & worldSphere)

Report whether the mesh itself is to be drawn, drawing a lower detail mesh in its place when the current camera shows it too small.

A mesh without a bounding sphere is always drawn, and one outside the view never is. The name is inferred.

Parameters
worldSphereReceives the bounding sphere in world space when the mesh has one.
Returns
Whether to draw the mesh.
Ghidra address:
NTSC-U/C: 0x00232b30
Ghidra address:
PAL: 0x0023b6f8

◆ BoundingBox()

void RndMesh::BoundingBox ( Box & box)

Compute the bounding box of the vertices in the mesh's own space.

A mesh without vertices reports a box with both corners at the origin.

Parameters
boxReceives the box.
Ghidra address:
NTSC-U/C: 0x00234d50
Ghidra address:
PAL: 0x0023d8d0

◆ TransformVerts()

void RndMesh::TransformVerts ( const Transform & xfm)

Move every vertex of the geometry by a transform, then rebuild the positions and normals.

The normals turn with the basis and are normalised. The name is inferred.

Parameters
xfmThe transform.
Ghidra address:
NTSC-U/C: 0x00234df8
Ghidra address:
PAL: 0x0023d978

◆ AddQuad()

void RndMesh::AddQuad ( unsigned short nV0,
unsigned short nV1,
unsigned short nV2,
unsigned short nV3 )

Append the two triangles of a quad to the faces of mGeomOwner.

The triangles are (nV0, nV1, nV2) and (nV2, nV1, nV3). The only out-of-line copy is in the tunnel geometry unit.

Parameters
nV0The first corner.
nV1The corner after nV0 along the first row.
nV2The corner of the second row beside nV0.
nV3The corner of the second row beside nV1.
Ghidra address:
NTSC-U/C: 0x001cb608
Ghidra address:
PAL: 0x001d43a8

◆ AddQuadStrip()

void RndMesh::AddQuadStrip ( int nRowA,
int nRowB,
int nCount,
int nStride,
int nStep )

Append the quads between two rows of vertices with AddQuad().

Each row has nCount vertices nStride apart, and a quad spans nStep of them. The only out-of-line copy is in the tunnel geometry unit.

Parameters
nRowAThe first vertex of the first row.
nRowBThe first vertex of the second row.
nCountThe vertices in each row.
nStrideThe distance between two neighbouring vertices of a row.
nStepThe vertices a quad spans.
Ghidra address:
NTSC-U/C: 0x001cba30
Ghidra address:
PAL: 0x001d47d0

◆ FillEdges()

void RndMesh::FillEdges ( int nEdgeA,
int nEdgeB,
int nCount,
int nStride,
const Vector3 & pointA0,
const Vector3 & pointB0,
const Vector3 & pointA1,
const Vector3 & pointB1,
const Vector2 & texA0,
const Vector2 & texB0,
const Vector2 & texA1,
const Vector2 & texB1,
const Vector2 & weightsA0,
const Vector2 & weightsB0,
const Vector2 & weightsA1,
const Vector2 & weightsB1,
const Color & colorA0,
const Color & colorB0,
const Color & colorA1,
const Color & colorB1,
const Vector3 & normA,
const Vector3 & normB )

Fill the vertices of two edges of a tunnel panel, interpolating every field along them.

Each edge blends in a straight line between two corners. The vertex vector grows to twice nCount first when it is shorter.

Parameters
nEdgeAThe first vertex of the first edge.
nEdgeBThe first vertex of the second edge.
nCountThe vertices of each edge.
nStrideThe distance between two neighbouring vertices of an edge.
pointA0The position at the start of the first edge.
pointB0The position at the start of the second edge.
pointA1The position at the end of the first edge.
pointB1The position at the end of the second edge.
texA0The first texture coordinate at the start of the first edge.
texB0The first texture coordinate at the start of the second edge.
texA1The first texture coordinate at the end of the first edge.
texB1The first texture coordinate at the end of the second edge.
weightsA0The two vertex weights at the start of the first edge.
weightsB0The two vertex weights at the start of the second edge.
weightsA1The two vertex weights at the end of the first edge.
weightsB1The two vertex weights at the end of the second edge.
colorA0The colour at the start of the first edge.
colorB0The colour at the start of the second edge.
colorA1The colour at the end of the first edge.
colorB1The colour at the end of the second edge.
normAThe normal of the first edge.
normBThe normal of the second edge.
Ghidra address:
NTSC-U/C: 0x001cbac8
Ghidra address:
PAL: 0x001d4868

◆ New()

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

Create a mesh.

Parameters
pszNameThe registry key.
Returns
The mesh.
Ghidra address:
NTSC-U/C: 0x0038b650
Ghidra address:
PAL: 0x003f9d58

◆ GetFaces() [1/2]

const std::vector< Face > & RndMesh::GetFaces ( ) const
inline
Returns
The triangles.

◆ GetFaces() [2/2]

std::vector< Face > & RndMesh::GetFaces ( )
inline
Returns
The triangles, for writing.

◆ GetGeomOwner()

RndMesh * RndMesh::GetGeomOwner ( ) const
inline
Returns
The mesh that has the geometry.

◆ GetMat()

RndMat * RndMesh::GetMat ( ) const
inline
Returns
The material, or null.

◆ GetMinScreen()

float RndMesh::GetMinScreen ( ) const
inline
Returns
The least projected size to draw at, or 0 for any.

◆ GetMutable()

int RndMesh::GetMutable ( ) const
inline
Returns
Non-zero when the geometry changes at run time.

◆ SetMutable()

void RndMesh::SetMutable ( int nMutable)
inline
Parameters
nMutableNon-zero when the geometry changes at run time.

◆ GetSphere() [1/2]

const Sphere & RndMesh::GetSphere ( ) const
inline
Returns
The bounding sphere, of radius 0 for none.

◆ GetSphere() [2/2]

Sphere & RndMesh::GetSphere ( )
inline
Returns
The bounding sphere, of radius 0 for none, for writing.

◆ GetVerts() [1/2]

const std::vector< Vert > & RndMesh::GetVerts ( ) const
inline
Returns
The vertices.

◆ GetVerts() [2/2]

std::vector< Vert > & RndMesh::GetVerts ( )
inline
Returns
The vertices, for writing.

◆ GetZFunc()

int RndMesh::GetZFunc ( ) const
inline
Returns
The ZFunc.

◆ SetZFunc()

void RndMesh::SetZFunc ( int nZFunc)
inline
Parameters
nZFuncThe ZFunc.

◆ GetZMode()

int RndMesh::GetZMode ( ) const
inline
Returns
The ZMode.

◆ SetZMode()

void RndMesh::SetZMode ( int nZMode)
inline
Parameters
nZModeThe ZMode.

◆ ReleaseRefs()

void RndMesh::ReleaseRefs ( )
protected

Drop the references on the next mesh, the material, the owners, and the bones, and delete the bones.

The name is inferred.

Ghidra address:
NTSC-U/C: 0x00233598
Ghidra address:
PAL: 0x0023c150

◆ AcquireRefs()

void RndMesh::AcquireRefs ( )
protected

Take references on the next mesh, the material, the owners, and the bones, then rebuild everything.

The name is inferred.

Ghidra address:
NTSC-U/C: 0x00233660
Ghidra address:
PAL: 0x0023c218

◆ Collide() [2/2]

virtual void RndCollideable::Collide ( const Vector2 & point,
std::list< Collision > & collisions )
virtual

Test a screen point against the collideable and add what it strikes to a list.

The base body tests the children.

Parameters
pointThe screen point.
collisionsThe list to add to.
Ghidra address:
NTSC-U/C: 0x00222568
Ghidra address:
PAL: 0x0022b338

Reimplemented from RndCollideable.

Member Data Documentation

◆ kCopyShareGeometry

int RndMesh::kCopyShareGeometry = 8
staticconstexpr

The bit of the Copy() flags that shares the source's geometry rather than copying it.

◆ kCopyBones

int RndMesh::kCopyBones = 0x20
staticconstexpr

The bit of the Copy() flags that copies the bones.

◆ sClassName

const char* RndMesh::sClassName
static

The class name a .rnd file writes, Mesh.

Ghidra address:
NTSC-U/C: 0x003b09ec
Ghidra address:
PAL: 0x0042f884

◆ sRev

int RndMesh::sRev
static

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

Ghidra address:
NTSC-U/C: 0x003b09f0

◆ sLoadRev

int RndMesh::sLoadRev
static

The version Load() read last, which the vertex and face readers read by.

Ghidra address:
NTSC-U/C: 0x0043c690

◆ mZMode

int RndMesh::mZMode
protected

The ZMode.

◆ mZFunc

int RndMesh::mZFunc
protected

The ZFunc.

◆ mVerts

std::vector<Vert> RndMesh::mVerts
protected

The vertices.

◆ mFaces

std::vector<Face> RndMesh::mFaces
protected

The triangles.

◆ mEdges

std::vector<Edge> RndMesh::mEdges
protected

The edges.

◆ mMat

RndMat* RndMesh::mMat
protected

The material, or null.

◆ mSphere

Sphere RndMesh::mSphere
protected

The bounding sphere, of radius 0 for none.

◆ mGeomOwner

RndMesh* RndMesh::mGeomOwner
protected

The mesh that has the geometry.

◆ mTransOwner

RndTransformable* RndMesh::mTransOwner
protected

The transformable whose world transform places the mesh.

◆ mBones

std::unique_ptr<Bones> RndMesh::mBones
protected

The bones, or null.

◆ mMinScreen

float RndMesh::mMinScreen
protected

The least projected size to draw at, or 0 for any.

◆ mNext

RndMesh* RndMesh::mNext
protected

The next lower detail mesh, or null.

◆ mMutable

int RndMesh::mMutable
protected

Non-zero when the geometry changes at run time.


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