wavelength 1.0.0
Loading...
Searching...
No Matches
armpart.h
Go to the documentation of this file.
1#pragma once
2
3#include "game/avatarpart.h"
4#include "math/transform.h"
5#include "math/vector3.h"
6#include "rnd/rndmesh.h"
7
8class Avatar;
9
18class ArmPart : public AvatarPart {
19public:
26 ~ArmPart() override = default;
27
37 ArmPart(int nPart, int nParent, Avatar *pAvatar);
38
48 void SetFrame(float fFrame) override;
49
61 void SetFrames(float fFrom, float fTo, float fBlend) override;
62
71 void Update() override;
72
82 void SetType(const char *pszType) override;
83
94 bool Rebuild() override;
95
96private:
97 float mUpperLength;
98 RndMesh *mForearm;
99 float mForearmLength;
100 RndMesh *mHand;
101
114 void SolveIK(const Transform &hand, const Vector3 &pole);
115};
void Update() override
Hang the upper arm, the forearm, and the hand from the joint of the torso.
void SetType(const char *pszType) override
Start loading the files of a choice of the left arm.
void SetFrame(float fFrame) override
Pose the arm at one frame of its animations.
ArmPart(int nPart, int nParent, Avatar *pAvatar)
Construct the model of an arm.
~ArmPart() override=default
Destroy the object.
bool Rebuild() override
Build the meshes of the arm and measure its bones.
void SetFrames(float fFrom, float fTo, float fBlend) override
Pose the arm between two frames of its animations.
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" secti...
One of the avatars the game can draw at a time, lent to the AvatarPartSet that shows.
Definition avatar.h:24
Triangle mesh with a material.
Definition rndmesh.h:31
Affine transform stored as three basis rows and a translation row.
Definition transform.h:18
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14