Blender V2.61 - r43446
|
#include <KX_ObjectActuator.h>
Public Types | |
enum | KX_OBJECT_ACT_VEC_TYPE { KX_OBJECT_ACT_NODEF = 0, KX_OBJECT_ACT_FORCE, KX_OBJECT_ACT_TORQUE, KX_OBJECT_ACT_DLOC, KX_OBJECT_ACT_DROT, KX_OBJECT_ACT_LINEAR_VELOCITY, KX_OBJECT_ACT_ANGULAR_VELOCITY, KX_OBJECT_ACT_MAX } |
Public Member Functions | |
bool | isValid (KX_OBJECT_ACT_VEC_TYPE type) |
KX_ObjectActuator (SCA_IObject *gameobj, KX_GameObject *refobj, const MT_Vector3 &force, const MT_Vector3 &torque, const MT_Vector3 &dloc, const MT_Vector3 &drot, const MT_Vector3 &linV, const MT_Vector3 &angV, const short damping, const KX_LocalFlags &flag) | |
~KX_ObjectActuator () | |
CValue * | GetReplica () |
void | ProcessReplica () |
bool | UnlinkObject (SCA_IObject *clientobj) |
void | Relink (CTR_Map< CTR_HashedPtr, void * > *obj_map) |
void | SetForceLoc (const double force[3]) |
void | UpdateFuzzyFlags () |
virtual bool | Update () |
Definition at line 81 of file KX_ObjectActuator.h.
KX_OBJECT_ACT_NODEF | |
KX_OBJECT_ACT_FORCE | |
KX_OBJECT_ACT_TORQUE | |
KX_OBJECT_ACT_DLOC | |
KX_OBJECT_ACT_DROT | |
KX_OBJECT_ACT_LINEAR_VELOCITY | |
KX_OBJECT_ACT_ANGULAR_VELOCITY | |
KX_OBJECT_ACT_MAX |
Definition at line 113 of file KX_ObjectActuator.h.
KX_ObjectActuator::KX_ObjectActuator | ( | SCA_IObject * | gameobj, |
KX_GameObject * | refobj, | ||
const MT_Vector3 & | force, | ||
const MT_Vector3 & | torque, | ||
const MT_Vector3 & | dloc, | ||
const MT_Vector3 & | drot, | ||
const MT_Vector3 & | linV, | ||
const MT_Vector3 & | angV, | ||
const short | damping, | ||
const KX_LocalFlags & | flag | ||
) |
Definition at line 46 of file KX_ObjectActuator.cpp.
References KX_LocalFlags::Force, KX_LocalFlags::LinearVelocity, SCA_IObject::RegisterActuator(), KX_LocalFlags::ServoControl, and UpdateFuzzyFlags().
Referenced by GetReplica().
KX_ObjectActuator::~KX_ObjectActuator | ( | ) |
Definition at line 89 of file KX_ObjectActuator.cpp.
References SCA_IObject::UnregisterActuator().
CValue * KX_ObjectActuator::GetReplica | ( | void | ) | [virtual] |
Implements CValue.
Definition at line 275 of file KX_ObjectActuator.cpp.
References KX_ObjectActuator(), and ProcessReplica().
bool KX_ObjectActuator::isValid | ( | KX_ObjectActuator::KX_OBJECT_ACT_VEC_TYPE | type | ) |
Check whether this is a valid vector mode
Definition at line 313 of file KX_ObjectActuator.cpp.
References KX_OBJECT_ACT_MAX, and KX_OBJECT_ACT_NODEF.
void KX_ObjectActuator::ProcessReplica | ( | ) | [virtual] |
Makes sure any internal data owned by this class is deep copied.
Reimplemented from SCA_IActuator.
Definition at line 283 of file KX_ObjectActuator.cpp.
References SCA_IObject::RegisterActuator().
Referenced by GetReplica().
void KX_ObjectActuator::Relink | ( | CTR_Map< CTR_HashedPtr, void * > * | obj_map | ) | [virtual] |
Reimplemented from SCA_ILogicBrick.
Definition at line 301 of file KX_ObjectActuator.cpp.
References SCA_IObject::RegisterActuator(), and SCA_IObject::UnregisterActuator().
void KX_ObjectActuator::SetForceLoc | ( | const double | force[3] | ) | [inline] |
Definition at line 147 of file KX_ObjectActuator.h.
bool KX_ObjectActuator::UnlinkObject | ( | SCA_IObject * | clientobj | ) | [virtual] |
UnlinkObject(...) Certain actuator use gameobject pointers (like TractTo actuator) This function can be called when an object is removed to make sure that the actuator will not use it anymore.
Reimplemented from SCA_IActuator.
Definition at line 290 of file KX_ObjectActuator.cpp.
References NULL.
bool KX_ObjectActuator::Update | ( | void | ) | [virtual] |
Reimplemented from SCA_IActuator.
Definition at line 95 of file KX_ObjectActuator.cpp.
References KX_GameObject::addLinearVelocity(), KX_LocalFlags::AddOrSetLinV, KX_LocalFlags::AngularVelocity, KX_GameObject::ApplyForce(), KX_GameObject::ApplyMovement(), KX_GameObject::ApplyRotation(), KX_GameObject::ApplyTorque(), KX_LocalFlags::DLoc, MT_Vector3::dot(), KX_LocalFlags::DRot, credits_svn_gen::e, KX_LocalFlags::Force, KX_GameObject::GetAngularVelocity(), KX_GameObject::GetLinearVelocity(), KX_GameObject::GetMass(), SCA_ILogicBrick::GetParent(), KX_GameObject::GetVelocity(), I, SCA_IActuator::IsNegativeEvent(), KX_LocalFlags::LinearVelocity, MT_EPSILON(), KX_GameObject::NodeGetWorldOrientation(), KX_GameObject::NodeGetWorldPosition(), SCA_IActuator::RemoveAllEvents(), KX_GameObject::ResolveCombinedVelocities(), KX_LocalFlags::ServoControl, KX_GameObject::setAngularVelocity(), KX_GameObject::setLinearVelocity(), MT_Tuple3::setValue(), KX_LocalFlags::Torque, MT_Tuple3::x(), MT_Tuple3::y(), MT_Tuple3::z(), KX_LocalFlags::ZeroAngularVelocity, KX_LocalFlags::ZeroDLoc, KX_LocalFlags::ZeroDRot, KX_LocalFlags::ZeroForce, KX_LocalFlags::ZeroLinearVelocity, and KX_LocalFlags::ZeroTorque.
void KX_ObjectActuator::UpdateFuzzyFlags | ( | ) | [inline] |
Definition at line 148 of file KX_ObjectActuator.h.
References MT_Vector3::length2(), MT_fuzzyZero(), KX_LocalFlags::ZeroAngularVelocity, KX_LocalFlags::ZeroDLoc, KX_LocalFlags::ZeroDRot, KX_LocalFlags::ZeroForce, KX_LocalFlags::ZeroLinearVelocity, and KX_LocalFlags::ZeroTorque.
Referenced by KX_ObjectActuator().