|
wavelength 1.0.0
|
The model of the instrument an avatar plays. More...
#include <instrpart.h>


Public Member Functions | |
| ~InstrPart () override=default | |
| Destroy the object. | |
| InstrPart (int nParent, Avatar *pAvatar) | |
| Construct the model of the instrument. | |
| void | SetType (const char *pszType) override |
| Start loading the instrument file on the first call, then show a choice once the file has loaded. | |
| bool | Rebuild () override |
| Show the mesh of the pending choice once the instrument file has loaded. | |
| void | ReleaseType () override |
| Return to the choice the mesh shows. | |
| 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. | |
| 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. | |
The model of the instrument an avatar plays.
The RTTI includes the name and records AvatarPart as the base. The object is 0x80 bytes. Every instrument mesh comes from the one file the rnd_dir of the part names. A choice of the types array gives the number of its mesh, avatar<n>_instr_<number>.mesh.
|
overridedefault |
Destroy the object.
| InstrPart::InstrPart | ( | int | nParent, |
| Avatar * | pAvatar ) |
Construct the model of the instrument.
| nParent | The part the model hangs from. |
| pAvatar | The avatar the part belongs to. |
|
overridevirtual |
Start loading the instrument file on the first call, then show a choice once the file has loaded.
The name follows the base.
| pszType | The choice, a symbol. |
Reimplemented from AvatarPart.
|
overridevirtual |
Show the mesh of the pending choice once the instrument file has loaded.
The first call after the load renames the objects of the file for the avatar. The name follows the base.
Reimplemented from AvatarPart.
|
overridevirtual |
Return to the choice the mesh shows.
The instrument file stays loaded.
The name follows the base.
Reimplemented from AvatarPart.