Blender V2.61 - r43446
|
#include <BL_ShapeActionActuator.h>
Public Member Functions | |
Py_Header | BL_ShapeActionActuator (SCA_IObject *gameobj, const STR_String &propname, const STR_String &framepropname, float starttime, float endtime, struct bAction *action, short playtype, short blendin, short priority, float stride) |
virtual | ~BL_ShapeActionActuator () |
virtual bool | Update (double curtime, bool frame) |
virtual CValue * | GetReplica () |
virtual void | ProcessReplica () |
void | SetBlendTime (float newtime) |
void | BlendShape (struct Key *key, float weigth) |
bAction * | GetAction () |
void | SetAction (bAction *act) |
Protected Member Functions | |
void | SetStartTime (float curtime) |
void | SetLocalTime (float curtime) |
bool | ClampLocalTime () |
Protected Attributes | |
MT_Point3 | m_lastpos |
float | m_blendframe |
int | m_flag |
float | m_startframe |
float | m_endframe |
float | m_starttime |
float | m_localtime |
float | m_lastUpdate |
float | m_blendin |
float | m_blendstart |
float | m_stridelength |
short | m_playtype |
short | m_priority |
struct bAction * | m_action |
STR_String | m_framepropname |
STR_String | m_propname |
vector< float > | m_blendshape |
struct PointerRNA * | m_idptr |
Definition at line 42 of file BL_ShapeActionActuator.h.
BL_ShapeActionActuator::BL_ShapeActionActuator | ( | SCA_IObject * | gameobj, |
const STR_String & | propname, | ||
const STR_String & | framepropname, | ||
float | starttime, | ||
float | endtime, | ||
struct bAction * | action, | ||
short | playtype, | ||
short | blendin, | ||
short | priority, | ||
float | stride | ||
) |
Definition at line 60 of file BL_ShapeActionActuator.cpp.
References BL_DeformableGameObject::GetDeformer(), BL_ShapeDeformer::GetKey(), SCA_ILogicBrick::GetParent(), Key::id, m_idptr, and RNA_id_pointer_create().
Referenced by GetReplica().
BL_ShapeActionActuator::~BL_ShapeActionActuator | ( | ) | [virtual] |
Definition at line 95 of file BL_ShapeActionActuator.cpp.
References m_idptr.
void BL_ShapeActionActuator::BlendShape | ( | struct Key * | key, |
float | weigth | ||
) |
Definition at line 171 of file BL_ShapeActionActuator.cpp.
References Key::block, KeyBlock::curval, ListBase::first, m_blendshape, and KeyBlock::next.
Referenced by Update().
bool BL_ShapeActionActuator::ClampLocalTime | ( | ) | [protected] |
Definition at line 120 of file BL_ShapeActionActuator.cpp.
References m_endframe, m_localtime, and m_startframe.
bAction* BL_ShapeActionActuator::GetAction | ( | ) | [inline] |
Definition at line 64 of file BL_ShapeActionActuator.h.
References m_action.
CValue * BL_ShapeActionActuator::GetReplica | ( | void | ) | [virtual] |
Implements CValue.
Definition at line 113 of file BL_ShapeActionActuator.cpp.
References BL_ShapeActionActuator(), and ProcessReplica().
void BL_ShapeActionActuator::ProcessReplica | ( | ) | [virtual] |
Makes sure any internal data owned by this class is deep copied.
Reimplemented from SCA_IActuator.
Definition at line 101 of file BL_ShapeActionActuator.cpp.
References m_lastUpdate, m_localtime, and m_startframe.
Referenced by GetReplica().
void BL_ShapeActionActuator::SetAction | ( | bAction * | act | ) | [inline] |
Definition at line 65 of file BL_ShapeActionActuator.h.
References m_action.
void BL_ShapeActionActuator::SetBlendTime | ( | float | newtime | ) |
Definition at line 108 of file BL_ShapeActionActuator.cpp.
References m_blendframe.
Referenced by BL_DeformableGameObject::SetActiveAction().
void BL_ShapeActionActuator::SetLocalTime | ( | float | curtime | ) | [protected] |
Definition at line 158 of file BL_ShapeActionActuator.cpp.
References ACT_FLAG_REVERSE, KX_KetsjiEngine::GetAnimFrameRate(), m_endframe, m_flag, m_localtime, m_startframe, and m_starttime.
Referenced by Update().
void BL_ShapeActionActuator::SetStartTime | ( | float | curtime | ) | [protected] |
Definition at line 148 of file BL_ShapeActionActuator.cpp.
References ACT_FLAG_REVERSE, KX_KetsjiEngine::GetAnimFrameRate(), m_endframe, m_flag, m_localtime, m_startframe, and m_starttime.
Referenced by Update().
bool BL_ShapeActionActuator::Update | ( | double | curtime, |
bool | frame | ||
) | [virtual] |
Update(...) Update the actuator based upon the events received since the last call to Update, the current time and deltatime the time elapsed in this frame ? It is the responsibility of concrete Actuators to clear their event's. This is usually done in the Update() method via a call to RemoveAllEvents()
Reimplemented from SCA_IActuator.
Definition at line 187 of file BL_ShapeActionActuator.cpp.
References ACT_ACTION_FLIPPER, ACT_ACTION_FROM_PROP, ACT_ACTION_LOOP_END, ACT_ACTION_LOOP_STOP, ACT_ACTION_MOTION, ACT_ACTION_PINGPONG, ACT_ACTION_PLAY, ACT_FLAG_ACTIVE, ACT_FLAG_KEYUP, ACT_FLAG_LOCKINPUT, ACT_FLAG_REVERSE, animsys_evaluate_action(), BlendShape(), BLI_freelistN(), Key::block, KeyBlock::curval, ListBase::first, KX_KetsjiEngine::GetAnimFrameRate(), BL_DeformableGameObject::GetDeformer(), BL_ShapeDeformer::GetKey(), CValue::GetNumber(), SCA_ILogicBrick::GetParent(), CValue::GetProperty(), BL_DeformableGameObject::GetShape(), KX_KetsjiEngine::GetSuspendedDelta(), MT_Vector3::length(), length(), m_action, m_blendframe, m_blendin, m_blendshape, m_blendstart, m_endframe, m_flag, m_framepropname, m_idptr, m_lastpos, m_lastUpdate, m_localtime, SCA_IActuator::m_negevent, m_playtype, SCA_IActuator::m_posevent, m_priority, m_propname, m_startframe, m_starttime, m_stridelength, KeyBlock::next, KX_GameObject::NodeGetWorldPosition(), NULL, CValue::Release(), SCA_IActuator::RemoveAllEvents(), BL_DeformableGameObject::SetActiveAction(), SetLocalTime(), CValue::SetProperty(), SetStartTime(), and CValue::SetValue().
struct bAction* BL_ShapeActionActuator::m_action [protected] |
Definition at line 137 of file BL_ShapeActionActuator.h.
Referenced by GetAction(), SetAction(), and Update().
float BL_ShapeActionActuator::m_blendframe [protected] |
Definition at line 120 of file BL_ShapeActionActuator.h.
Referenced by SetBlendTime(), and Update().
float BL_ShapeActionActuator::m_blendin [protected] |
Definition at line 132 of file BL_ShapeActionActuator.h.
Referenced by Update().
vector<float> BL_ShapeActionActuator::m_blendshape [protected] |
Definition at line 140 of file BL_ShapeActionActuator.h.
Referenced by BlendShape(), and Update().
float BL_ShapeActionActuator::m_blendstart [protected] |
Definition at line 133 of file BL_ShapeActionActuator.h.
Referenced by Update().
float BL_ShapeActionActuator::m_endframe [protected] |
The frame this action ends
Definition at line 125 of file BL_ShapeActionActuator.h.
Referenced by ClampLocalTime(), SetLocalTime(), SetStartTime(), and Update().
int BL_ShapeActionActuator::m_flag [protected] |
Definition at line 121 of file BL_ShapeActionActuator.h.
Referenced by SetLocalTime(), SetStartTime(), and Update().
STR_String BL_ShapeActionActuator::m_framepropname [protected] |
Definition at line 138 of file BL_ShapeActionActuator.h.
Referenced by Update().
struct PointerRNA* BL_ShapeActionActuator::m_idptr [protected] |
Definition at line 141 of file BL_ShapeActionActuator.h.
Referenced by BL_ShapeActionActuator(), Update(), and ~BL_ShapeActionActuator().
MT_Point3 BL_ShapeActionActuator::m_lastpos [protected] |
Definition at line 119 of file BL_ShapeActionActuator.h.
Referenced by Update().
float BL_ShapeActionActuator::m_lastUpdate [protected] |
Definition at line 131 of file BL_ShapeActionActuator.h.
Referenced by ProcessReplica(), and Update().
float BL_ShapeActionActuator::m_localtime [protected] |
The current time of the action
Definition at line 129 of file BL_ShapeActionActuator.h.
Referenced by ClampLocalTime(), ProcessReplica(), SetLocalTime(), SetStartTime(), and Update().
short BL_ShapeActionActuator::m_playtype [protected] |
Definition at line 135 of file BL_ShapeActionActuator.h.
Referenced by Update().
short BL_ShapeActionActuator::m_priority [protected] |
Definition at line 136 of file BL_ShapeActionActuator.h.
Referenced by Update().
STR_String BL_ShapeActionActuator::m_propname [protected] |
Definition at line 139 of file BL_ShapeActionActuator.h.
Referenced by Update().
float BL_ShapeActionActuator::m_startframe [protected] |
The frame this action starts
Definition at line 123 of file BL_ShapeActionActuator.h.
Referenced by ClampLocalTime(), ProcessReplica(), SetLocalTime(), SetStartTime(), and Update().
float BL_ShapeActionActuator::m_starttime [protected] |
The time this action started
Definition at line 127 of file BL_ShapeActionActuator.h.
Referenced by SetLocalTime(), SetStartTime(), and Update().
float BL_ShapeActionActuator::m_stridelength [protected] |
Definition at line 134 of file BL_ShapeActionActuator.h.
Referenced by Update().