Blender V2.61 - r43446
|
#include <KX_IpoActuator.h>
Public Types | |
enum | IpoActType { KX_ACT_IPO_NODEF = 0, KX_ACT_IPO_PLAY, KX_ACT_IPO_PINGPONG, KX_ACT_IPO_FLIPPER, KX_ACT_IPO_LOOPSTOP, KX_ACT_IPO_LOOPEND, KX_ACT_IPO_KEY2KEY, KX_ACT_IPO_FROM_PROP, KX_ACT_IPO_MAX } |
Public Member Functions | |
int | string2mode (const char *modename) |
KX_IpoActuator (SCA_IObject *gameobj, const STR_String &propname, const STR_String &framePropname, float starttime, float endtime, bool recurse, int acttype, bool ipo_as_force, bool ipo_add, bool ipo_local) | |
virtual | ~KX_IpoActuator () |
virtual CValue * | GetReplica () |
void | SetStart (float starttime) |
void | SetEnd (float endtime) |
virtual bool | Update (double curtime, bool frame) |
Public Attributes | |
int | m_type |
Static Public Attributes | |
static const char * | S_KX_ACT_IPO_PLAY_STRING = "Play" |
static const char * | S_KX_ACT_IPO_PINGPONG_STRING = "PingPong" |
static const char * | S_KX_ACT_IPO_FLIPPER_STRING = "Flipper" |
static const char * | S_KX_ACT_IPO_LOOPSTOP_STRING = "LoopStop" |
static const char * | S_KX_ACT_IPO_LOOPEND_STRING = "LoopEnd" |
static const char * | S_KX_ACT_IPO_KEY2KEY_STRING = "Key2key" |
static const char * | S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp" |
Protected Member Functions | |
void | ResetStartTime () |
Protected Attributes | |
bool | m_bNegativeEvent |
float | m_startframe |
float | m_endframe |
bool | m_recurse |
float | m_localtime |
float | m_starttime |
float | m_direction |
STR_String | m_propname |
STR_String | m_framepropname |
bool | m_ipo_as_force |
bool | m_ipo_add |
bool | m_ipo_local |
bool | m_bIpoPlaying |
Definition at line 38 of file KX_IpoActuator.h.
KX_ACT_IPO_NODEF | |
KX_ACT_IPO_PLAY | |
KX_ACT_IPO_PINGPONG | |
KX_ACT_IPO_FLIPPER | |
KX_ACT_IPO_LOOPSTOP | |
KX_ACT_IPO_LOOPEND | |
KX_ACT_IPO_KEY2KEY | |
KX_ACT_IPO_FROM_PROP | |
KX_ACT_IPO_MAX |
Definition at line 94 of file KX_IpoActuator.h.
KX_IpoActuator::KX_IpoActuator | ( | SCA_IObject * | gameobj, |
const STR_String & | propname, | ||
const STR_String & | framePropname, | ||
float | starttime, | ||
float | endtime, | ||
bool | recurse, | ||
int | acttype, | ||
bool | ipo_as_force, | ||
bool | ipo_add, | ||
bool | ipo_local | ||
) |
Definition at line 59 of file KX_IpoActuator.cpp.
References m_bIpoPlaying, and ResetStartTime().
Referenced by GetReplica().
virtual KX_IpoActuator::~KX_IpoActuator | ( | ) | [inline, virtual] |
Definition at line 135 of file KX_IpoActuator.h.
virtual CValue* KX_IpoActuator::GetReplica | ( | void | ) | [inline, virtual] |
Implements CValue.
Definition at line 137 of file KX_IpoActuator.h.
References KX_IpoActuator(), and SCA_IActuator::ProcessReplica().
void KX_IpoActuator::ResetStartTime | ( | ) | [protected] |
Reset/Update the start time
Definition at line 380 of file KX_IpoActuator.cpp.
References fabs(), m_endframe, m_startframe, and m_starttime.
Referenced by KX_IpoActuator(), and Update().
void KX_IpoActuator::SetEnd | ( | float | endtime | ) |
Definition at line 92 of file KX_IpoActuator.cpp.
References m_endframe.
void KX_IpoActuator::SetStart | ( | float | starttime | ) |
Definition at line 87 of file KX_IpoActuator.cpp.
References m_startframe.
int KX_IpoActuator::string2mode | ( | const char * | modename | ) |
Definition at line 385 of file KX_IpoActuator.cpp.
References KX_ACT_IPO_FLIPPER, KX_ACT_IPO_FROM_PROP, KX_ACT_IPO_KEY2KEY, KX_ACT_IPO_LOOPEND, KX_ACT_IPO_LOOPSTOP, KX_ACT_IPO_NODEF, KX_ACT_IPO_PINGPONG, KX_ACT_IPO_PLAY, S_KX_ACT_IPO_FLIPPER_STRING, S_KX_ACT_IPO_FROM_PROP_STRING, S_KX_ACT_IPO_KEY2KEY_STRING, S_KX_ACT_IPO_LOOPEND_STRING, S_KX_ACT_IPO_LOOPSTOP_STRING, S_KX_ACT_IPO_PINGPONG_STRING, and S_KX_ACT_IPO_PLAY_STRING.
bool KX_IpoActuator::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 156 of file KX_IpoActuator.cpp.
References fabs(), CValue::GetNumber(), SCA_ILogicBrick::GetParent(), CValue::GetProperty(), KX_KetsjiEngine::GetSuspendedDelta(), KX_GameObject::InitIPO(), SCA_IActuator::IsNegativeEvent(), KX_ACT_IPO_FLIPPER, KX_ACT_IPO_FROM_PROP, KX_ACT_IPO_KEY2KEY, KX_ACT_IPO_LOOPEND, KX_ACT_IPO_LOOPSTOP, KX_ACT_IPO_PINGPONG, KX_ACT_IPO_PLAY, m_bIpoPlaying, m_bNegativeEvent, m_direction, m_endframe, m_framepropname, m_ipo_add, m_ipo_as_force, m_ipo_local, m_localtime, SCA_IActuator::m_negevent, SCA_IActuator::m_posevent, m_propname, m_recurse, m_startframe, m_starttime, m_type, CValue::Release(), SCA_IActuator::RemoveAllEvents(), ResetStartTime(), CValue::SetProperty(), CValue::SetValue(), and KX_GameObject::UpdateIPO().
bool KX_IpoActuator::m_bIpoPlaying [protected] |
Definition at line 88 of file KX_IpoActuator.h.
Referenced by KX_IpoActuator(), and Update().
bool KX_IpoActuator::m_bNegativeEvent [protected] |
Definition at line 53 of file KX_IpoActuator.h.
Referenced by Update().
float KX_IpoActuator::m_direction [protected] |
play backwards or forwards? (positive means forward).
Definition at line 71 of file KX_IpoActuator.h.
Referenced by Update().
float KX_IpoActuator::m_endframe [protected] |
End frame of the ipo.
Definition at line 59 of file KX_IpoActuator.h.
Referenced by ResetStartTime(), SetEnd(), and Update().
STR_String KX_IpoActuator::m_framepropname [protected] |
Name of the property where we write the current frame number
Definition at line 77 of file KX_IpoActuator.h.
Referenced by Update().
bool KX_IpoActuator::m_ipo_add [protected] |
Add Ipo curve to current loc/rot/scale
Definition at line 83 of file KX_IpoActuator.h.
Referenced by Update().
bool KX_IpoActuator::m_ipo_as_force [protected] |
Interpret the ipo as a force?
Definition at line 80 of file KX_IpoActuator.h.
Referenced by Update().
bool KX_IpoActuator::m_ipo_local [protected] |
The Ipo curve is applied in local coordinates
Definition at line 86 of file KX_IpoActuator.h.
Referenced by Update().
float KX_IpoActuator::m_localtime [protected] |
Current active frame of the ipo.
Definition at line 65 of file KX_IpoActuator.h.
Referenced by Update().
STR_String KX_IpoActuator::m_propname [protected] |
Name of the property (only used in from_prop mode).
Definition at line 74 of file KX_IpoActuator.h.
Referenced by Update().
bool KX_IpoActuator::m_recurse [protected] |
Include children in the transforms?
Definition at line 62 of file KX_IpoActuator.h.
Referenced by Update().
float KX_IpoActuator::m_startframe [protected] |
Begin frame of the ipo.
Definition at line 56 of file KX_IpoActuator.h.
Referenced by ResetStartTime(), SetStart(), and Update().
float KX_IpoActuator::m_starttime [protected] |
The time this ipo started at.
Definition at line 68 of file KX_IpoActuator.h.
Referenced by ResetStartTime(), and Update().
Reimplemented from SCA_IActuator.
Definition at line 123 of file KX_IpoActuator.h.
Referenced by Update().
const char * KX_IpoActuator::S_KX_ACT_IPO_FLIPPER_STRING = "Flipper" [static] |
Definition at line 115 of file KX_IpoActuator.h.
Referenced by string2mode().
const char * KX_IpoActuator::S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp" [static] |
Definition at line 119 of file KX_IpoActuator.h.
Referenced by string2mode().
const char * KX_IpoActuator::S_KX_ACT_IPO_KEY2KEY_STRING = "Key2key" [static] |
Definition at line 118 of file KX_IpoActuator.h.
Referenced by string2mode().
const char * KX_IpoActuator::S_KX_ACT_IPO_LOOPEND_STRING = "LoopEnd" [static] |
Definition at line 117 of file KX_IpoActuator.h.
Referenced by string2mode().
const char * KX_IpoActuator::S_KX_ACT_IPO_LOOPSTOP_STRING = "LoopStop" [static] |
Definition at line 116 of file KX_IpoActuator.h.
Referenced by string2mode().
const char * KX_IpoActuator::S_KX_ACT_IPO_PINGPONG_STRING = "PingPong" [static] |
Definition at line 114 of file KX_IpoActuator.h.
Referenced by string2mode().
const char * KX_IpoActuator::S_KX_ACT_IPO_PLAY_STRING = "Play" [static] |
Definition at line 113 of file KX_IpoActuator.h.
Referenced by string2mode().