27 static constexpr float kNever = 1.0e7f;
48 void Set(
const char *pszAnim,
int nKey);
266 void SetPose(
const char *pszPose,
bool bImmediate);
279 void SetBaseAnim(
const char *pszAnim,
bool bOneShot,
bool bImmediate);
355 std::vector<std::unique_ptr<AvatarPart>> mParts;
361 float mBodyBlendStart;
364 float mPoseBlendStart;
366 const char *mPrevPose;
367 float mPoseChangeTime;
375 static float sAnimBlend;
382 static float sTimeToIdle;
396 static float sCamBlend;
404 static std::unique_ptr<RndLoader> sLoader;
412 static RndTex *sTargetTex;
428 static const char *sNone;
436 static const char *sIdle;
460 static const char *sCurrentCam;
468 static const char *sPreviousCam;
476 static float sCamBlendStart;
484 static int sFreqSize;
507 static std::vector<std::unique_ptr<Avatar>> sAvatars;
517 void UpdateInstrument();
533 SetPartFrames(
const Anim *pFrom,
const Anim *pTo,
float *pfBlendStart,
int nFirst,
int nEnd);
Parts and colours of a player's avatar, the Freq the Freq maker edits.
Definition avatarpartset.h:23
The model of one part of an avatar that an Avatar draws.
Definition avatarpart.h:29
The position in one of the anims of the avatar entry of the "db" section.
Definition avatar.h:34
void Set(const char *pszAnim, int nKey)
Start an animation.
int GetLoop() const
Definition avatar.h:85
float Frame() const
Report the frame at Avatar::sTime.
void SetAnim(const char *pszAnim)
Set only the animation, without a frame range.
Definition avatar.h:80
bool IsDone() const
Report whether an animation that does not loop has passed its last frame.
const char * GetAnim() const
Definition avatar.h:71
~Avatar()
Delete the part models.
void SetBaseAnim(const char *pszAnim, bool bOneShot, bool bImmediate)
Change the body animation.
static void SnapCamera(const char *pszCam)
Move the shared camera to one of the cams at once, with no blend.
static void GetDepthRange(float *pfNear, float *pfFar)
Report the depth range the shared camera draws into.
static void Init()
Read the avatar entry of the "db" section, load the base model, and build the avatars.
static void SetDepthRange(float fNear, float fFar)
Set the depth range the shared camera draws into.
static RndTex * GetTargetTex()
Definition avatar.h:350
static int NumAvatars()
Report the number of avatars.
static constexpr float kNever
The time a blend that never started or already ended records.
Definition avatar.h:27
int GetIndex() const
Definition avatar.h:335
static Avatar * GetAvatar(int nIndex)
Report an avatar.
void SetUser(AvatarPartSet *pUser)
Set mUser.
static void SetViewAngles(float fTilt, float fTurn)
Turn the avatars in front of the shared camera.
void SetPose(const char *pszPose, bool bImmediate)
Change the pose, and with it the model of the instrument.
void CatchGem(int nKey, int bRestartPose)
React to a gem the player of the avatar caught.
Avatar(int nIndex)
Build an avatar and its part models.
AvatarPart * GetPart(int nPart)
Report the model of a part.
static void DrawCamera()
Draw the shared camera alone, and restore the current camera and environment.
void Reset()
Return to the idle animation with no pose.
static void SetCamera(const char *pszCam)
Blend the shared camera to one of the cams, unless it already heads there.
void Draw(const Rect *pScreenRect)
Pose the part models at sTime and draw them with the shared camera.
static bool IsShown()
Report whether the avatar display is shown at all.
static void Poll(float fTime)
Advance every avatar to a time.
static void Terminate()
Delete the avatars and the loader of the base model.
static void SetFreqSize(int nFreqSize, bool bSnap)
Choose the camera for a size of the avatar display.
AvatarPartSet * GetUser()
Definition avatar.h:340
static const char * GetNone()
Definition avatar.h:345
Reference-counted array of script data nodes.
Definition dataarray.h:20
Camera.
Definition rndcam.h:23
Texture, a bitmap loaded from a file or rendered to.
Definition rndtex.h:17
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
Axis-aligned rectangle given by a corner and a size.
Definition rect.h:11