Inherits G3D::Model::Pose.
|
template<class T , class ... ArgTypes> |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
| Like std::make_shared, but works for protected constructors. More...
|
|
◆ Pose() [1/2]
G3D::MD2Model::Pose::Pose |
( |
| ) |
|
|
inline |
◆ Pose() [2/2]
◆ ~Pose()
virtual G3D::MD2Model::Pose::~Pose |
( |
| ) |
|
|
inlinevirtual |
◆ clone()
shared_ptr<Model::Pose> G3D::MD2Model::Pose::clone |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ completelyDead()
bool G3D::MD2Model::Pose::completelyDead |
( |
| ) |
const |
True if the death animation has played and this object is now lying on the ground.
Typically used to decide when to remove dead bodies.
◆ create()
static shared_ptr<Pose> G3D::MD2Model::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::MD2Model::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.
◆ onSimulation()
void G3D::MD2Model::Pose::onSimulation |
( |
SimTime |
deltaTime, |
|
|
const Action & |
a |
|
) |
| |
Given a time and state flags indicating a character's desires, computes the new pose.
This may not be ideal for all applications; it is provided as a helper function.
If any death is triggered while crouching, the crouch death will be played instead.
Game logic should generally not use the JUMP animation, or the jump parameter to choosePose that triggers it. Instead, play the JUMP_UP animation when the character leaves the ground and the JUMP_DOWN animation when they hit it again.
◆ operator!=()
bool G3D::MD2Model::Pose::operator!= |
( |
const Pose & |
other | ) |
const |
◆ operator==()
bool G3D::MD2Model::Pose::operator== |
( |
const Pose & |
other | ) |
const |
◆ animation
◆ preFrameNumber
int G3D::MD2Model::Pose::preFrameNumber |
When time is negative, this frame is blended into the first frame of the animation (which will occur at time 0) over PRE_BLEND_TIME.
This allows disjoint animations to be smoothly connected.
MD2Model::choosePose will set time to -PRE_BLEND_TIME and set preFrame. If you are manually constructing a pose, MD2Model::getFrameNumber will return a value you can use.
◆ time
Time since the start of the animation.
Animations loop, so times after the final animation frame time are allowed. This must be less than 100000.0.
Referenced by Pose().