|
resonance 1.0.1
|
Indexed triangle mesh with one material. More...
#include <mesh.h>


Public Types | |
| enum | ZMode { kZModeDisable = 0 , kZModeZReadOnly = 1 , kZModeZReadWrite = 2 , kZModeWReadOnly = 3 , kZModeWReadWrite = 4 } |
| Depth buffer read and write mode, as the text dump labels the values. More... | |
| enum | ZFunc { kZFuncNever = 0 , kZFuncLess = 1 , kZFuncEqual = 2 , kZFuncLessEqual = 3 , kZFuncGreater = 4 , kZFuncNotEqual = 5 , kZFuncGreaterEqual = 6 , kZFuncAlways = 7 } |
| Depth comparison, as the text dump labels the values. More... | |
| enum | { kSyncAllMask = 0x7f } |
| Every bit SyncAll() reports as changed. More... | |
| enum | { kSyncPoints = 0x01 , kSyncNorms = 0x08 , kSyncColors = 0x10 , kSyncTexs = 0x20 } |
| Bits of the changed-parts mask SyncChanged() receives. More... | |
| enum | { kCopyShareVerts = 0x08 , kCopyShareFaces = 0x10 , kCopyShareTransforms = 0x20 } |
| Bits of the copy flags Copy() tests. More... | |
| enum | { kSerialVersion = 10 } |
| Serial version this build writes, and the highest version it loads. More... | |
| Public Types inherited from Rnd::Transformable | |
| enum | Billboard { kBillboardNone = 0 , kBillboardX = 1 , kBillboardY = 2 , kBillboardZ = 4 , kBillboardXZ = 8 , kBillboardXYZ = 16 , kBillboardSimpleXYZ = 32 , kBillboardLocalRotate = 64 , kBillboardScaleX = 129 , kBillboardScaleY = 130 , kBillboardScaleZ = 132 , kBillboardScaleXZ = 136 , kBillboardScaleXYZ = 144 , kBillboardScaleSimpleXYZ = 160 } |
| Mode mBillboard selects, recovered from the name dumper at 0x004f26f0. More... | |
Public Member Functions | |
| Mesh (const HxStr &name) | |
| Construct an empty mesh that owns its own geometry. | |
| virtual | ~Mesh () |
| void * | operator new (size_t nSize) |
| Allocate a mesh from the tagged heap under the tag "Rnd::Mesh". | |
| void | operator delete (void *pBlock) |
| Release a mesh to the tagged heap under the same tag. | |
| virtual void | DumpText (Dbg &sink) |
| Write the mesh to the engine text sink. | |
| virtual void | Save (Stream &stream) |
| Serialise the mesh. | |
| virtual void | Replace (Object *pFrom, Object *pTo) |
| Replace one object reference with another. | |
| virtual const HxStr & | ClassName () const |
| Return the registered class name, "Mesh". | |
| virtual void | Copy (const Object *pSource, unsigned nFlags) |
| Copy another mesh over this one. | |
| virtual void | Load (Stream &stream) |
| Load the mesh. | |
| void | SetMat (Mat *pMat) |
| Point the mesh at a material. | |
| void | SetTransOwner (Transformable *pOwner) |
| Point the mesh at the transform it draws with. | |
| void | SetNext (Mesh *pNext, float flMinScreen) |
| Set the smallest screen size to draw at, and the mesh to draw in its place below it. | |
| void | SetTrans1Owner (Transformable *pOwner) |
| Point the mesh at its second transform owner. | |
| void | SetTrans2Owner (Transformable *pOwner) |
| Point the mesh at its third transform owner. | |
| Sphere | WorldSphere () |
| Report the bounding sphere in world space. | |
| void | ForwardSync () |
| Dispatch Sync(). | |
| Sphere | BoundingSphere () |
| Compute a bounding sphere of the vertices. | |
| Box | BoundingBox () |
| Compute the bounding box of the vertices. | |
| void | MakeCube (float flHalfSize) |
| Replace the geometry with an axis-aligned cube. | |
| void | ComputeNormals (bool bPositionOnly) |
| Recompute the vertex normals of mVertsOwner from the faces of mFacesOwner. | |
| void | WeldVerts (bool bAverageColors) |
| Merge duplicate vertices and remove the faces and edges the merge makes redundant. | |
| void | SetVertsOwner (Mesh *pOwner) |
| Point the mesh at the mesh whose vertices it draws. | |
| void | SetFacesOwner (Mesh *pOwner) |
| Point the mesh at the mesh whose triangles and edges it draws. | |
| void | SetMaterialChain (Mat *pMat) |
| Set the material of this mesh and of every coarser level of its mNext chain. | |
| void | SetDepthChain (ZMode zMode, ZFunc zFunc) |
| Set the depth mode and comparison of this mesh and of every coarser level of its mNext chain. | |
| void | SetVertexColor (const Color &color) |
| Give every vertex of mVertsOwner one colour and report the change through SyncChanged(). | |
| void | MirrorX () |
| Mirror the mesh across its local x axis by negating the x row of its local transform, and mark the transform dirty. | |
| void | ScaleUniform (float flScale) |
| Scale the three basis rows of the local transform by one factor, and mark the transform dirty. | |
| 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 mFacesOwner. | |
| void | AddQuadStrip (int nRowA, int nRowB, int nCount, int nStep) |
| Append the quads between two rows of vertices with AddQuad(). | |
| int | PrepareDraw (Sphere &worldSphere) |
| Decide whether this mesh draws, and yield its world bounding sphere. | |
| virtual void | FindCollisions (const Segment &ray, std::list< Collision > &collisions) |
| Test a ray against this mesh and append what it strikes to sink. | |
| virtual void | Sync () |
| Rebuild whatever the platform subclass derives from the geometry. | |
| virtual void | SyncChanged (int nMask) |
| Report which parts of the mesh have changed. | |
| virtual void | SyncAll () |
| Report every part of the mesh as changed. | |
| Public Member Functions inherited from Rnd::Drawable | |
| Drawable () | |
| Construct a visible drawable with no children. | |
| virtual | ~Drawable () |
| Drop this object's references on its children. | |
| void | Draw () |
| Draw this object followed by each of its children. | |
| Drawable * | Parent () |
| Report the drawable that draws this one. | |
| void | AddDraw (Drawable *pDraw, Drawable *pBefore) |
| Insert pDraw into mDraws in front of pBefore. | |
| void | AddDraw (Drawable *pDraw) |
| Insert pDraw at the front of mDraws. | |
| void | RemoveDraw (Drawable *pDraw) |
| Erase pDraw from mDraws. | |
| void | RemoveAllDraws () |
| Empty mDraws, dropping this object's reference on every entry. | |
| void | MoveDraw (Drawable *pDraw, int nSteps) |
| Move pDraw nSteps places later in mDraws, or earlier for a negative count. | |
| virtual void | SetShowing (int nShowing) |
| Set whether this object draws at all. | |
| void | SetShowingRecursive (int nShowing) |
| Set whether this object and every drawable beneath it in mDraws draw at all. | |
| virtual void | SetHighlight (int nHighlight) |
| Set whether this object draws with its highlight treatment. | |
| int | GetHighlight () const |
| Report the highlight flag. | |
| int | GetShowing () const |
| Report the showing flag. | |
| std::list< Drawable * > & | GetDraws () |
| Report the child list. | |
| Public Member Functions inherited from Rnd::Object | |
| Object () | |
| Construct an unnamed object. | |
| Object (const HxStr &name) | |
| Construct an object and register it under name. | |
| virtual | ~Object () |
| Erase the registry entry and release the name buffer. | |
| void | SetName (const HxStr &name) |
| Re-register this object under a different name. | |
| void | AddRef (Object *pReferrer) |
| Register pReferrer as a store of a pointer to this object. | |
| void | RemoveRef (Object *pReferrer) |
| Drop one registration made by AddRef(). | |
| Public Member Functions inherited from Rnd::Transformable | |
| Transformable () | |
| Construct a dirty transformable with identity transforms and no children. | |
| virtual | ~Transformable () |
| Drop this object's references on its children. | |
| void | AddTrans (Transformable *pTrans) |
| Append pTrans to mTransList and mark it dirty. | |
| void | RemoveTrans (Transformable *pTrans) |
| Erase pTrans from mTransList. | |
| void | RemoveAllTranses () |
| Drop this object's reference on every mTransList entry and empty the list. | |
| Transformable * | Parent () |
| Report the transformable that positions this one. | |
| virtual void | SetBillboard (int nBillboard) |
| Set the billboard mode and mark the transform dirty. | |
| virtual int | UpdateWorldXfm (Transformable *pParent, int nForce) |
| Compose mWorldXfm from mLocalXfm and the parent's world transform. | |
| void | SetOrigin (const float *pOrigin) |
| Set the origin row and mark the transform dirty. | |
| float * | GetDrawXfm () |
| Build the transform this object draws with and return it. | |
| Public Member Functions inherited from Rnd::Collideable | |
| Collideable () | |
| Construct a collideable with no children. | |
| virtual | ~Collideable () |
| Drop this object's references on its children. | |
| Collideable * | Parent () |
| Report the collideable that hit-tests this one. | |
| void | AddCollide (Collideable *pCollide) |
| Append pCollide to mCollides. | |
| void | RemoveCollide (Collideable *pCollide) |
| Erase pCollide from mCollides. | |
| virtual void | FindCollisions (const Vector2 &point, std::list< Collision > &collisions) |
| Test a screen point against this object and append what it strikes to collisions. | |
Public Attributes | |
| ZMode | mZMode |
| ZFunc | mZFunc |
| std::vector< MeshVert > | mVerts |
| std::vector< MeshFace > | mFaces |
| std::vector< MeshEdge > | mEdges |
| Mat * | mMat |
| Mesh * | mVertsOwner |
| Mesh * | mFacesOwner |
| float | mMinScreen |
| Mesh * | mNext |
| Public Attributes inherited from Rnd::Drawable | |
| int | mShowing |
| Public Attributes inherited from Rnd::Object | |
| HxStr | mName |
| int | mInternal |
| Public Attributes inherited from Rnd::Transformable | |
| float | mLocalXfm [kXfmRowCount][kXfmRowFloatCount] |
| Transform this object is positioned by, before the parent transform is applied. | |
| float | mWorldXfm [kXfmRowCount][kXfmRowFloatCount] |
| Composed world transform. | |
| int | mDirty |
| Set by every writer of a transform field and cleared once UpdateWorldXfm has recomposed. | |
Static Public Attributes | |
| static Mesh *(* | sNew )(const HxStr &name) |
| Creator the registered "Mesh" class builds through. | |
| static HxStr | sClassName |
| Registered class name of Rnd::Mesh, the string "Mesh". | |
Protected Member Functions | |
| virtual void | AddRefObjects () |
| Restore the reference bookkeeping and resynchronise after a load or a copy. | |
| Protected Member Functions inherited from Rnd::Drawable | |
| virtual int | DrawShowing () |
| Draw this object alone. | |
| void | ReleaseDrawsRefs () |
| Drop this object's reference on every mDraws entry without emptying the list. | |
| Protected Member Functions inherited from Rnd::Object | |
| void | ReleaseAllRefs () |
| Tell every referrer to drop its pointer to this object. | |
| Protected Member Functions inherited from Rnd::Transformable | |
| void | AdoptXfmFrom (const Transformable &owner) |
| Adopt the transform of an owner this object is being detached from. | |
| void | ReleaseTransRefs () |
| Drop this object's reference on every mTransList entry without emptying the list. | |
| Protected Member Functions inherited from Rnd::Collideable | |
| void | ReleaseCollidesRefs () |
| Drop this object's reference on every mCollides entry without emptying the list. | |
Protected Attributes | |
| Sphere | mSphere |
| Transformable * | mTransOwner |
| int | mMaxVerts |
| Protected Attributes inherited from Rnd::Object | |
| std::list< Object * > | mRefs |
| Protected Attributes inherited from Rnd::Transformable | |
| float | mOrigin [kXfmRowFloatCount] |
| int | mBillboard |
Friends | |
| bool | JoinFaces (Mesh *pMesh, FlatFace &primary, FlatFace &face) |
| Add face to the fan that primary heads when the two share a vertex of pMesh, their normals are within two degrees, and the shared vertices retain one pivot for the whole fan. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Rnd::Drawable | |
| static Drawable * | Find (const HxStr &name) |
| Resolve a registry key to a drawable. | |
Indexed triangle mesh with one material.
Its RTTI descriptor is at 0x008eed58. It has three public non-virtual bases: Rnd::Drawable at +0x00, Rnd::Transformable at +0x20, and Rnd::Collideable at +0xd0. All three derive virtually from Rnd::Object. One shared Object subobject sits at +0x150 and the whole object is 0x16c bytes; the factory rounds the allocation to 0x170.
Geometry is shared rather than copied. A mesh whose mVertsOwner is another mesh draws that mesh's vertices, and its own vertex vector is released after a load or a copy. The same applies to mFacesOwner for the face and edge vectors. A newly constructed mesh owns its own geometry, because the constructor sets both owners to this.
The drawing implementation belongs to the platform subclass. Rnd::PsMesh supplies DrawShowing() and Sync(), and GfxDevice::Init() replaces the creator hook at 0x006eed60 with the PsMesh factory, so every mesh a file loads on the PlayStation 2 is a PsMesh.
The compiler-generated GetTypeInfo() is at 0x00492528.
| enum Rnd::Mesh::ZMode |
Depth buffer read and write mode, as the text dump labels the values.
| enum Rnd::Mesh::ZFunc |
| anonymous enum |
Every bit SyncAll() reports as changed.
| Enumerator | |
|---|---|
| kSyncAllMask | |
| anonymous enum |
Bits of the changed-parts mask SyncChanged() receives.
Four of the seven bits of kSyncAllMask are recovered. Three come from the channels of Rnd::MeshAnim::SetFrameSelf() that report them after writing into the vertex vector, and kSyncNorms comes from ComputeNormals(). The remaining three bits have no recovered producer.
| Enumerator | |
|---|---|
| kSyncPoints | The vertex positions changed. |
| kSyncNorms | The vertex normals changed. |
| kSyncColors | The vertex colours changed. |
| kSyncTexs | The first texture coordinate of each vertex changed. |
| anonymous enum |
Bits of the copy flags Copy() tests.
The flags belong to the Rnd::Object copy interface. Only the three bits the mesh reads are recovered, and their names are inferred from the effect each one has.
| anonymous enum |
| Rnd::Mesh::Mesh | ( | const HxStr & | name | ) |
Construct an empty mesh that owns its own geometry.
| name | The object name, passed to the Rnd::Object constructor. |
|
virtual |
| void * Rnd::Mesh::operator new | ( | size_t | nSize | ) |
Allocate a mesh from the tagged heap under the tag "Rnd::Mesh".
NewMesh() inlines the call, and the out-of-line copy has no caller.
| nSize | The object size the compiler supplies. |
| void Rnd::Mesh::operator delete | ( | void * | pBlock | ) |
Release a mesh to the tagged heap under the same tag.
The out-of-line copy has no caller.
| pBlock | The block. |
|
virtual |
Write the mesh to the engine text sink.
Emits the three base dumps, then the "[Mesh]" block. The whole block is suppressed while the dump level of the sink is zero or negative.
| sink | The text sink. |
Reimplemented from Rnd::Drawable.
|
virtual |
Serialise the mesh.
Writes kSerialVersion, the three base subobjects, the two depth fields, each object reference as a name, the bounding sphere, the level of detail fields, and finally the vertex, face, and edge vectors.
| stream | The stream to write to. |
Reimplemented from Rnd::Drawable.
Replace one object reference with another.
Forwards to the three bases, then swaps the material and the five mesh references whose current value is the old object. A null replacement makes the mesh adopt what it was sharing rather than lose it.
| pFrom | The object being replaced. |
| pTo | The object to point at, which may be null. |
Reimplemented from Rnd::Drawable.
|
virtual |
Return the registered class name, "Mesh".
The key is the one a data file writes for the class, which the registry at Rnd::Manager::Init() maps to the creator below.
Implements Rnd::Object.
|
virtual |
Copy another mesh over this one.
Bit 3 of the flags shares the vertex vector instead of copying it, bit 4 does the same for the face and edge vectors, and bit 5 does the same for the three transform references. A shared vector is then released by ClearSharedGeometry().
| pSource | The source object, which has to be a mesh for the copy to have any effect. |
| nFlags | The copy flags. |
Reimplemented from Rnd::Drawable.
|
virtual |
Load the mesh.
Reports "Can't load new Mesh" through the failure sink when the file version exceeds kSerialVersion. Object references arrive as names and resolve through Rnd::TheManager with a checked cast. A name that no loaded object matches produces a null reference. Versions below 10 are all still readable, and each version test is documented at its reading site.
| stream | The stream to read from. |
Reimplemented from Rnd::Drawable.
| void Rnd::Mesh::SetMat | ( | Mat * | pMat | ) |
Point the mesh at a material.
Drops the reference on the previous material, stores the argument, and takes a reference on a non-null material.
| pMat | The material, or null. |
| void Rnd::Mesh::SetTransOwner | ( | Transformable * | pOwner | ) |
Point the mesh at the transform it draws with.
Drops the reference on the previous owner, stores the argument, and takes a reference on a non-null owner.
| pOwner | The transform, or null. |
| void Rnd::Mesh::SetNext | ( | Mesh * | pNext, |
| float | flMinScreen ) |
Set the smallest screen size to draw at, and the mesh to draw in its place below it.
Stores flMinScreen into mMinScreen, then swaps the reference on mNext the same way as SetMat() and SetTransOwner(), storing pNext whether or not it is null. The pointer arrives in $a1 and the float in $f12, so the order of the two parameters in the source cannot be recovered. Rnd::MultiMesh::DrawShowing() and Rnd::LodMesh inline it, and the out-of-line copy has no caller. The title is inferred from the members it writes.
| pNext | The next mesh in the chain, or null. |
| flMinScreen | The smallest screen size to draw this mesh at, or zero to always draw it. |
| void Rnd::Mesh::SetTrans1Owner | ( | Transformable * | pOwner | ) |
Point the mesh at its second transform owner.
The same shape as SetTransOwner(). Load() and Copy() inline it, and the out-of-line copy has no caller. The title is inferred.
| pOwner | The owner, or null. |
| void Rnd::Mesh::SetTrans2Owner | ( | Transformable * | pOwner | ) |
Point the mesh at its third transform owner.
Recorded on the same evidence as SetTrans1Owner().
| pOwner | The owner, or null. |
| Sphere Rnd::Mesh::WorldSphere | ( | ) |
Report the bounding sphere in world space.
The centre is transformed by mTransOwner's world transform, and the radius is copied unscaled. The out-of-line copy has no caller. The title is inferred.
| void Rnd::Mesh::ForwardSync | ( | ) |
Dispatch Sync().
The out-of-line copy has no caller. The title is inferred.
| Sphere Rnd::Mesh::BoundingSphere | ( | ) |
Compute a bounding sphere of the vertices.
The centre is the middle of the vertices' bounding box, and the radius reaches the farthest vertex and is then scaled by the largest axis scale of this mesh's world transform. Only the third axis scale is taken as an absolute value. A mesh with no vertices reports the origin with a zero radius. The routine has no caller, and the title is inferred.
| Box Rnd::Mesh::BoundingBox | ( | ) |
Compute the bounding box of the vertices.
The first vertex seeds both corners, so the mesh must have one. The routine has no caller, and the title is inferred.
| void Rnd::Mesh::MakeCube | ( | float | flHalfSize | ) |
Replace the geometry with an axis-aligned cube.
The eight vertices sit at plus or minus flHalfSize on each axis with white colour and zero normals and texture coordinates. Twelve triangles and the twelve cube edges follow, and the mesh then runs SyncAll() and Sync(). The routine has no caller, and the title is inferred.
| flHalfSize | Half the length of a side. |
| void Rnd::Mesh::ComputeNormals | ( | bool | bPositionOnly | ) |
Recompute the vertex normals of mVertsOwner from the faces of mFacesOwner.
With a flat material, each face writes its unit normal into its first vertex only, and the routine returns without reporting a change. Otherwise each vertex is welded to the first earlier vertex at the same position (and, unless bPositionOnly, of the same colour), and takes the normalised sum of the unit normals of every face corner welded to it, each weighted by the corner angle in radians. The smooth path then reports kSyncNorms through SyncChanged().
A world transform whose axes form a left-handed basis negates the results. The flat path negates only one normal, read through the face past the end of the face vector.
The routine has no caller, and the title is inferred.
| bPositionOnly | Weld vertices by position alone, ignoring colour. |
| void Rnd::Mesh::WeldVerts | ( | bool | bAverageColors | ) |
Merge duplicate vertices and remove the faces and edges the merge makes redundant.
A vertex used by a face or an edge absorbs every later vertex still in use at the same position. With a textured material the first texture coordinates must match as well, and without a flat material a later vertex used by a face must also match in colour. Surviving vertices move down over the removed ones, and every animation that references this mesh and owns its keys moves and trims its keyframes to match. Degenerate and repeated faces and edges are then erased, and an animation channel whose keyframes all match is emptied.
With a flat material, each face first records its colour (the colour of its first vertex, or with bAverageColors the mean of its three), then AssignFlatVerts() runs, and each face's new first vertex takes the recorded colour. SyncAll() and Sync() follow. The routine has no caller, and the title is inferred.
| bAverageColors | Give each flat face the mean colour of its vertices. |
| void Rnd::Mesh::SetVertsOwner | ( | Mesh * | pOwner | ) |
Point the mesh at the mesh whose vertices it draws.
Drops the reference on the previous owner, stores the argument even when it is null, takes a reference on a non-null owner, empties the vectors now shared through ClearSharedGeometry(), and calls SyncAll().
| pOwner | The owner, or null. |
| void Rnd::Mesh::SetFacesOwner | ( | Mesh * | pOwner | ) |
Point the mesh at the mesh whose triangles and edges it draws.
The same shape as SetVertsOwner(), ending with Sync() instead of SyncAll().
| pOwner | The owner, or null. |
| void Rnd::Mesh::SetMaterialChain | ( | Mat * | pMat | ) |
Set the material of this mesh and of every coarser level of its mNext chain.
| pMat | The material, or null. |
Set the depth mode and comparison of this mesh and of every coarser level of its mNext chain.
| zMode | The depth buffer read and write mode. |
| zFunc | The depth comparison. |
| void Rnd::Mesh::SetVertexColor | ( | const Color & | color | ) |
Give every vertex of mVertsOwner one colour and report the change through SyncChanged().
| color | The colour. |
|
inline |
Mirror the mesh across its local x axis by negating the x row of its local transform, and mark the transform dirty.
Defined in the header. The one out-of-line copy is emitted in FreqAppearanceDetail's translation unit and has no caller, and FreqAppearanceDetail::unpack() expands the body. The title is inferred.
|
inline |
Scale the three basis rows of the local transform by one factor, and mark the transform dirty.
Defined below the class. The one out-of-line copy is emitted in MetFreqMakerInventoryScreen's translation unit and has no caller, and that screen's slot 38 expands the body. The title is inferred.
| flScale | The factor. |
|
inline |
Append the two triangles of a quad to the faces of mFacesOwner.
The triangles are (nV0, nV1, nV2) and (nV2, nV1, nV3). The only out-of-line copy sits in the Rnd::Tunnel unit, and every caller is a Rnd::Tunnel routine.
| nV0 | The first corner. |
| nV1 | The corner after nV0 along the first row. |
| nV2 | The corner of the second row beside nV0. |
| nV3 | The corner of the second row beside nV1. |
|
inline |
Append the quads between two rows of vertices with AddQuad().
Each row holds nCount vertices, and a quad spans nStep of them. The only out-of-line copy sits in the Rnd::Tunnel unit.
| nRowA | The first vertex of the first row. |
| nRowB | The first vertex of the second row. |
| nCount | The vertices in each row. |
| nStep | The vertices a quad spans. |
| int Rnd::Mesh::PrepareDraw | ( | Sphere & | worldSphere | ) |
Decide whether this mesh draws, and yield its world bounding sphere.
A mesh with neither faces nor edges is rejected. A sphere of zero radius is accepted without a test. Otherwise the local sphere is brought through the transform owner's world transform and tested against the current camera's frustum.
A non-zero mMinScreen then estimates the projected size, and a mesh too small for its own threshold is not simply rejected: the mNext chain is walked for a level of detail whose threshold admits that size, that mesh is drawn instead, and this one reports no draw. The substitution is why the name is not a question.
| worldSphere | Receives the bounding sphere in world space. |
|
virtual |
Test a ray against this mesh and append what it strikes to sink.
Rnd::Collideable vtable slot 1. A bounding sphere with a non-zero radius rejects the ray first, in world space. The faces are then tested in the local space of mTransOwner, so the ray is brought there through the inverse of the owner's world transform rather than every vertex being brought out. Each face of mFacesOwner is tested against the vertices of mVertsOwner, with the cull mode of the material deciding whether a back-facing hit counts, and a strike appends this mesh and the distance along the ray. The base implementation runs last, so the children are tested after this mesh's own faces.
| ray | The segment to test along. |
| collisions | The list to append intersections to. |
Reimplemented from Rnd::Collideable.
|
virtual |
Rebuild whatever the platform subclass derives from the geometry.
Rnd::Drawable vtable slot 4. Empty in Rnd::Mesh. Rnd::PsMesh rebuilds its triangle strips here. The name is inferred from the slot it fills.
Public rather than protected because Rnd::Text::BuildGlyphMesh() at 0x004c9c00 dispatches the slot on the mesh it owns, and Rnd::Text derives from Rnd::Drawable rather than from this class, which protected access cannot express. A friend declaration would fit the image equally well; public asserts the weaker of the two.
Reimplemented in Rnd::PsMesh.
|
virtual |
Report which parts of the mesh have changed.
Rnd::Drawable vtable slot 5. Empty in Rnd::Mesh and in Rnd::PsMesh. The name is inferred from the slot it fills. Public because Rnd::MeshAnim::SetFrameSelf() at 0x004876b0 calls it on the mesh it animates, from outside this hierarchy and with no accessor in the image.
| nMask | The changed parts, a set of the kSync bits above. |
|
virtual |
Report every part of the mesh as changed.
Rnd::Drawable vtable slot 6. Public on the same evidence as Sync(), the same builder dispatching the slot at 0x004c9be8.
|
protectedvirtual |
Restore the reference bookkeeping and resynchronise after a load or a copy.
Adds a reference for each of the seven object references, then calls SyncAll() followed by Sync().
Reimplemented in Rnd::PsMesh.
|
friend |
Add face to the fan that primary heads when the two share a vertex of pMesh, their normals are within two degrees, and the shared vertices retain one pivot for the whole fan.
Records primary in face.mPrimaryFace whether or not it joins. AssignFlatVerts() is the only caller.
Creator the registered "Mesh" class builds through.
GfxDevice::Init() overwrites the hook with the Rnd::PsMesh creator. A mesh loaded from a file on the PlayStation 2 is therefore a PsMesh. Rnd::Blur, HudDisplay, and Rnd::Tunnel also build their meshes through it.
|
static |
Registered class name of Rnd::Mesh, the string "Mesh".
| ZMode Rnd::Mesh::mZMode |
< Depth buffer read and write mode. Rnd::PsMesh::DrawShowing() reads it to build the GS register writes. Public rather than protected on two counts: Rnd::PsMesh::SelectDepthRegsForPass() reads it through a Rnd::Mesh & that is not its own object, and Rnd::Text::BuildGlyphMesh() at 0x004c9ad4 writes it on the mesh it owns from outside this hierarchy. A friend declaration would fit the image equally well; public asserts the weaker of the two. +0xe0 Depth comparison. Public on the same evidence as mZMode, the same builder writing it at 0x004c9acc. +0xe4
| ZFunc Rnd::Mesh::mZFunc |
| std::vector<MeshVert> Rnd::Mesh::mVerts |
< Vertices, owned when mVertsOwner is this mesh. Public because Rnd::Blur::RebuildBlurMesh() at 0x004b9b30 fills the vector directly and the image has no accessor for it. +0xe8 Triangles, owned when mFacesOwner is this mesh. Public on the same evidence as mVerts, the builder at 0x004b9b30 writing all three pointers of the vector. +0xf4
| std::vector<MeshFace> Rnd::Mesh::mFaces |
Drawn edges. Public because Rnd::Text::BuildGlyphMesh() at 0x004c9780 writes the vector directly. +0x100
| std::vector<MeshEdge> Rnd::Mesh::mEdges |
| Mat* Rnd::Mesh::mMat |
< Material this mesh draws with. Rnd::PsMesh::DrawShowing() reads it to select it, and public rather than protected because Rnd::PsMultiMesh::DrawShowing() at 0x005b2f58 reads it out of the mesh it instances, from outside this hierarchy. +0x10c
|
protected |
| Mesh* Rnd::Mesh::mVertsOwner |
< Mesh whose vertices this one draws, itself for a mesh that owns them. Public because the blur builder at 0x004b9b30 reads it to decide whether it may refill mVerts. +0x130 Mesh whose triangles and edges this one draws, itself for a mesh that owns them. Public on the same evidence as mVertsOwner. +0x134
| Mesh* Rnd::Mesh::mFacesOwner |
|
protected |
|
protected |
| float Rnd::Mesh::mMinScreen |
< Projected size below which this mesh yields to a coarser link of the mNext chain. Zero disables the substitution. SetNext() writes it. Public because Rnd::MultiMesh::DrawShowing() at 0x004e83f4 and Rnd::LodMesh read it directly, and the image has no accessor for it. +0x148 Next coarser level of detail, or null at the end of the chain. Public on the same evidence: the same routine reads it at 0x004e8444 to hand it back to SetNext(). +0x14c
| Mesh* Rnd::Mesh::mNext |