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

The model of the torso of an avatar, with the emblem. More...

#include <torsopart.h>

Inheritance diagram for TorsoPart:
Collaboration diagram for TorsoPart:

Public Member Functions

 TorsoPart (int nParent, Avatar *pAvatar)
 Construct the model of the torso without an emblem.
 ~TorsoPart () override
 Abandon the load of the emblem and destroy the model.
bool Rebuild () override
 Build the meshes of the torso and show the emblem on them.
void ReleaseType () override
 Abandon the loads of the torso and of the emblem.
void SetEmblem (const char *pszEmblem)
 Start loading the file of an emblem.
bool RebuildEmblem ()
 Take the texture of the emblem SetEmblem() loaded and show it.
const char * GetEmblem () const
Public Member Functions inherited from AvatarPart
 AvatarPart (int nPart, int nParent, Avatar *pAvatar)
 Construct the model of a part from its entry of the parts array of the avatar entry of the "db" section.
virtual ~AvatarPart ()
 Delete the animations and the loaders of the model.
virtual void SetFrame (float fFrame)
 Pose the model at one frame of its animations.
virtual void SetFrames (float fFrom, float fTo, float fBlend)
 Pose the model between two frames of its animations.
virtual void Update ()
 Hang the model from the joint of its parent.
virtual void SetType (const char *pszType)
 Start loading the files of a choice of the part.
void Draw ()
 Draw the model, when it has a mesh.
void SetBlend (float fBlend)
 Set the alpha of the material of the model, when it has one.
void SetColor (const Color *pColor)
 Colour the model.
const char * GetType () const
const char * GetPendingType () const
void SetPendingType (const char *pszType)
 Set the choice SetType() last requested.
void SetMat (RndMat *pMat)
 Set the material of the model.
RndMesh * GetTransRoot ()
const std::vector< std::unique_ptr< RndTransAnim > > & GetAnims () const

Additional Inherited Members

Protected Member Functions inherited from AvatarPart
void SetMatTree (RndMesh *pMesh)
 Give a mesh and every mesh drawn under it the material of the model.
void FindJoint ()
 Find the joint mesh the model hangs from, avatar<n>_<trans_root>_joint.mesh.
Static Protected Member Functions inherited from AvatarPart
static void RotationAt (const RndTransAnim *pAnim, float fFrame, Quat &out)
 Interpolate the rotation keys of an animation at a frame.
static void BlendRotation (const RndTransAnim *pAnim, float fFrom, float fTo, float fBlend, Quat &out)
 Blend the rotations of an animation at two frames.
static void BlendTranslation (const RndTransAnim *pAnim, float fFrom, float fTo, float fBlend, Vector3 &out)
 Blend the translations of an animation at two frames.
static RndMesh * FindMesh (const char *pszName)
 Find a mesh by name.
static void ResetLocalXfm (RndMesh *pMesh)
 Set the local transform of a mesh to the identity and mark it out of date.
Protected Attributes inherited from AvatarPart
Callback mCallback
DataArray * mData
const char * mType
const char * mPendingType
Color mColor
RndMesh * mMesh
RndMesh * mTransRoot
RndMesh * mJoint
RndMat * mMat
std::vector< std::unique_ptr< RndTransAnim > > mAnims
 The animations of the bones the anims array lists, in its order, deleted with the part.
AvatarPart * mParent
Avatar * mAvatar
std::unique_ptr< RndLoader > mLoader
std::unique_ptr< RndLoader > mPendingLoader
 The load of the first file of mPendingType, or null.
std::unique_ptr< RndLoader > mPendingExtraLoader
 The load of the second file of mPendingType, or null.

Detailed Description

The model of the torso of an avatar, with the emblem.

The RTTI includes the name and records AvatarPart as the base. The object is 0x80 bytes. The emblem is a texture from a file the emblem array of the part lists, shown on the last stage of the material of the torso.

Constructor & Destructor Documentation

◆ TorsoPart()

TorsoPart::TorsoPart ( int nParent,
Avatar * pAvatar )

Construct the model of the torso without an emblem.

Parameters
nParentThe part the model hangs from.
pAvatarThe avatar the part belongs to.
Ghidra address:
NTSC-U/C: 0x002747e8
Ghidra address:
PAL: 0x0027e308

◆ ~TorsoPart()

TorsoPart::~TorsoPart ( )
override

Abandon the load of the emblem and destroy the model.

Ghidra address:
NTSC-U/C: 0x00274840
Ghidra address:
PAL: 0x0027e360

Member Function Documentation

◆ Rebuild()

bool TorsoPart::Rebuild ( )
overridevirtual

Build the meshes of the torso and show the emblem on them.

The name follows the base.

Returns
False while a file is still loading, otherwise true.
Ghidra address:
NTSC-U/C: 0x00274990
Ghidra address:
PAL: 0x0027e4b0

Reimplemented from AvatarPart.

◆ ReleaseType()

void TorsoPart::ReleaseType ( )
overridevirtual

Abandon the loads of the torso and of the emblem.

The name follows the base.

Ghidra address:
NTSC-U/C: 0x002749e0
Ghidra address:
PAL: 0x0027e500

Reimplemented from AvatarPart.

◆ SetEmblem()

void TorsoPart::SetEmblem ( const char * pszEmblem)

Start loading the file of an emblem.

The load replaces any load of an emblem in progress. The name is inferred.

Parameters
pszEmblemThe emblem, a symbol.
Ghidra address:
NTSC-U/C: 0x00274898
Ghidra address:
PAL: 0x0027e3b8

◆ RebuildEmblem()

bool TorsoPart::RebuildEmblem ( )

Take the texture of the emblem SetEmblem() loaded and show it.

The texture is taken out of the file before the loader is deleted, and renamed for the avatar. The name is inferred.

Returns
False while the file is still loading, otherwise true.
Ghidra address:
NTSC-U/C: 0x00274a28
Ghidra address:
PAL: 0x0027e548

◆ GetEmblem()

const char * TorsoPart::GetEmblem ( ) const
inline
Returns
The emblem shown, the symbol of no emblem for none.

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