NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
m3d::fanm_c Class Reference

#include <game/mLib/m_3d/fanm.hpp>

Inheritance diagram for m3d::fanm_c:
[legend]

Description

Animation object.

Definition at line 7 of file fanm.hpp.

Public Member Functions

 fanm_c ()
 Constructs an animation object.
 
virtual ~fanm_c ()
 Destroys the animation object.
 
virtual void play ()
 Updates the animation. Call this function every frame to update the animation.
 
void set (float duration, m3d::playMode_e playMode, float updateRate, float startFrame)
 Starts the animation with the given parameters.
 
void setFrame (float frame)
 Jumps to the specified frame in the animation.
 
bool isStop () const
 Checks whether the animation is stopped.
 
bool checkFrame (float frame) const
 Checks whether the animation has reached the specified frame.
 
- Public Member Functions inherited from m3d::banm_c
virtual anmType_e getType () const =0
 
virtual void remove ()
 
bool createAllocator (mAllocator_c *allocator, size_t *size)
 
bool IsBound () const
 
float getFrame () const
 
void setFrameOnly (float frame)
 
float getRate () const
 
void setRate (float rate)
 
nw4r::g3d::AnmObjgetObj ()
 

Public Attributes

float mFrameMax
 The last frame number of the animation.
 
float mFrameStart
 The first frame number of the animation.
 
float mCurrFrame
 The frame the animation is currently on.
 
u8 mPlayMode
 The play mode of the animation.
 

Additional Inherited Members

- Public Types inherited from m3d::banm_c
enum  anmType_e {
  TYPE_ANM_CHR ,
  TYPE_ANM_VIS ,
  TYPE_ANM_MAT_CLR ,
  TYPE_ANM_TEX_PAT ,
  TYPE_ANM_TEX_SRT ,
  TYPE_ANM_OTHER
}
 
- Protected Attributes inherited from m3d::banm_c
nw4r::g3d::AnmObjmpObj
 
EGG::FrmHeapmpHeap
 
mAllocator_c mAllocator
 

Constructor & Destructor Documentation

◆ fanm_c()

m3d::fanm_c::fanm_c ( )

Constructs an animation object.

Definition at line 3 of file fanm.cpp.

◆ ~fanm_c()

m3d::fanm_c::~fanm_c ( )
virtual

Destroys the animation object.

Definition at line 9 of file fanm.cpp.

Member Function Documentation

◆ play()

void m3d::fanm_c::play ( )
virtual

Updates the animation. Call this function every frame to update the animation.

Reimplemented from m3d::banm_c.

Definition at line 11 of file fanm.cpp.

◆ set()

void m3d::fanm_c::set ( float duration,
m3d::playMode_e playMode,
float updateRate,
float startFrame )

Starts the animation with the given parameters.

Parameters
durationThe number of frames in the animation.
playModeThe play mode of the animation.
updateRateThe speed of the animation.
startFrameThe starting frame of the animation. Set to -1 to start from the beginning.

Definition at line 51 of file fanm.cpp.

◆ setFrame()

void m3d::fanm_c::setFrame ( float frame)

Jumps to the specified frame in the animation.

Parameters
frameThe frame to jump to.

Definition at line 71 of file fanm.cpp.

◆ isStop()

bool m3d::fanm_c::isStop ( ) const

Checks whether the animation is stopped.

Definition at line 76 of file fanm.cpp.

◆ checkFrame()

bool m3d::fanm_c::checkFrame ( float frame) const

Checks whether the animation has reached the specified frame.

Parameters
frameThe frame to check.

Definition at line 90 of file fanm.cpp.

Member Data Documentation

◆ mFrameMax

float m3d::fanm_c::mFrameMax

The last frame number of the animation.

Definition at line 37 of file fanm.hpp.

◆ mFrameStart

float m3d::fanm_c::mFrameStart

The first frame number of the animation.

Definition at line 38 of file fanm.hpp.

◆ mCurrFrame

float m3d::fanm_c::mCurrFrame

The frame the animation is currently on.

Definition at line 39 of file fanm.hpp.

◆ mPlayMode

u8 m3d::fanm_c::mPlayMode

The play mode of the animation.

Definition at line 40 of file fanm.hpp.