Support Forum       G3D Web Page     
Public Member Functions | Static Public Member Functions | Public Attributes | Static Protected Member Functions | List of all members
G3D::MD3Model::Pose Class Reference

Animation pose based on AnimType and animation time. More...

Inherits G3D::Model::Pose.

Public Member Functions

 Pose ()
 
shared_ptr< Model::Poseclone () const override
 
virtual bool differentBounds (const shared_ptr< Model::Pose > &other) const override
 Returns true if other is null, has a different type than this, or would cause a Model of the appropriate type to change its bounding boxes. More...
 

Static Public Member Functions

static shared_ptr< Posecreate ()
 

Public Attributes

AnimType anim [NUM_ANIMATED_PARTS]
 
AnimType prevAnim [NUM_ANIMATED_PARTS]
 
int prevFrame [NUM_ANIMATED_PARTS]
 
Matrix3 rotation [NUM_PARTS]
 Applying a rotation rotates this part and everything attached to it relative to its parent. More...
 
shared_ptr< Skinskin
 If nullptr, use the model's default skin. More...
 
SimTime time [NUM_ANIMATED_PARTS]
 

Static Protected Member Functions

template<class T , class ... ArgTypes>
static shared_ptr< T > createShared (ArgTypes &&... args)
 Like std::make_shared, but works for protected constructors. More...
 

Detailed Description

Animation pose based on AnimType and animation time.

Each animation time ( legsTime and torsoTime ) is total time in the current animation which allows for looping based on the parameters in animation.cfg.

The skins must be the base name of each skin file found in the same directory as the model parts.

Textures for each skin are loaded on first use.

Constructor & Destructor Documentation

◆ Pose()

G3D::MD3Model::Pose::Pose ( )

Member Function Documentation

◆ clone()

shared_ptr<Model::Pose> G3D::MD3Model::Pose::clone ( ) const
inlineoverridevirtual

Implements G3D::Model::Pose.

◆ create()

static shared_ptr<Pose> G3D::MD3Model::Pose::create ( )
inlinestatic

◆ createShared()

template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared ( ArgTypes &&...  args)
inlinestaticprotectedinherited

Like std::make_shared, but works for protected constructors.

Call as createShared<myclass>.

◆ differentBounds()

virtual bool G3D::MD3Model::Pose::differentBounds ( const shared_ptr< Model::Pose > &  other) const
inlineoverridevirtual

Returns true if other is null, has a different type than this, or would cause a Model of the appropriate type to change its bounding boxes.

Implements G3D::Model::Pose.

Member Data Documentation

◆ anim

AnimType G3D::MD3Model::Pose::anim[NUM_ANIMATED_PARTS]

◆ prevAnim

AnimType G3D::MD3Model::Pose::prevAnim[NUM_ANIMATED_PARTS]

◆ prevFrame

int G3D::MD3Model::Pose::prevFrame[NUM_ANIMATED_PARTS]

◆ rotation

Matrix3 G3D::MD3Model::Pose::rotation[NUM_PARTS]

Applying a rotation rotates this part and everything attached to it relative to its parent.

Rotations are typically used to make the torso point towards a target or the head in the look direction.

◆ skin

shared_ptr<Skin> G3D::MD3Model::Pose::skin

If nullptr, use the model's default skin.

◆ time

SimTime G3D::MD3Model::Pose::time[NUM_ANIMATED_PARTS]

documentation generated on Wed Nov 24 2021 08:01:58 using doxygen 1.8.15