Blender V2.61 - r43446
|
#include <KX_ConstraintActuator.h>
Definition at line 43 of file KX_ConstraintActuator.h.
KX_ACT_CONSTRAINT_NORMAL | |
KX_ACT_CONSTRAINT_MATERIAL | |
KX_ACT_CONSTRAINT_PERMANENT | |
KX_ACT_CONSTRAINT_DISTANCE | |
KX_ACT_CONSTRAINT_LOCAL | |
KX_ACT_CONSTRAINT_DOROTFH |
Definition at line 108 of file KX_ConstraintActuator.h.
Definition at line 82 of file KX_ConstraintActuator.h.
KX_ConstraintActuator::KX_ConstraintActuator | ( | SCA_IObject * | gameobj, |
int | posDamptime, | ||
int | rotDampTime, | ||
float | min, | ||
float | max, | ||
float | refDir[3], | ||
int | locrot, | ||
int | time, | ||
int | option, | ||
char * | property | ||
) |
Definition at line 51 of file KX_ConstraintActuator.cpp.
References cos(), SCA_ILogicBrick::GetName(), KX_ACT_CONSTRAINT_NODEF, KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ, len(), MT_Vector3::length(), m_activeTime, m_locrot, m_maximumBound, m_maximumSine, m_minimumBound, m_minimumSine, m_option, m_posDampTime, m_property, m_refDirection, m_refDirVector, m_rotDampTime, MT_fuzzyZero(), and sin().
Referenced by GetReplica().
KX_ConstraintActuator::~KX_ConstraintActuator | ( | ) | [virtual] |
Definition at line 114 of file KX_ConstraintActuator.cpp.
void KX_ConstraintActuator::Clamp | ( | MT_Scalar & | var, |
float | min, | ||
float | max | ||
) | [protected] |
Clamp to <min>, <max>. Borders are included (in as far as float comparisons are good for equality...).
Definition at line 542 of file KX_ConstraintActuator.cpp.
Referenced by Update().
virtual CValue* KX_ConstraintActuator::GetReplica | ( | void | ) | [inline, virtual] |
Implements CValue.
Definition at line 131 of file KX_ConstraintActuator.h.
References KX_ConstraintActuator(), and SCA_IActuator::ProcessReplica().
bool KX_ConstraintActuator::IsValidMode | ( | KX_ConstraintActuator::KX_CONSTRAINTTYPE | m | ) |
Definition at line 553 of file KX_ConstraintActuator.cpp.
References KX_ACT_CONSTRAINT_MAX, and KX_ACT_CONSTRAINT_NODEF.
bool KX_ConstraintActuator::NeedRayCast | ( | KX_ClientObjectInfo * | client | ) |
Definition at line 153 of file KX_ConstraintActuator.cpp.
References KX_ClientObjectInfo::ACTOR, and KX_ClientObjectInfo::m_type.
static int KX_ConstraintActuator::pyattr_check_direction | ( | void * | self, |
const struct KX_PYATTRIBUTE_DEF * | attrdef | ||
) | [static] |
static int KX_ConstraintActuator::pyattr_check_min | ( | void * | self, |
const struct KX_PYATTRIBUTE_DEF * | attrdef | ||
) | [static] |
bool KX_ConstraintActuator::RayHit | ( | KX_ClientObjectInfo * | client, |
KX_RayCast * | result, | ||
void *const | data | ||
) |
Definition at line 119 of file KX_ConstraintActuator.cpp.
References CValue::GetProperty(), STR_String::IsEmpty(), KX_ACT_CONSTRAINT_MATERIAL, KX_ClientObjectInfo::m_auxilary_info, KX_ClientObjectInfo::m_gameobject, KX_RayCast::m_hitFound, m_hitObject, m_option, m_property, NULL, and STR_String::Ptr().
bool KX_ConstraintActuator::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 166 of file KX_ConstraintActuator.cpp.
References KX_GameObject::AlignAxisToVect(), Clamp(), MT_Vector3::cross(), distance(), MT_Vector3::dot(), filter(), KX_IPhysicsController::GetAngularVelocity(), KX_IPhysicsController::GetLinearVelocity(), SG_Spatial::GetLocalPosition(), SCA_ILogicBrick::GetName(), KX_GameObject::GetParent(), SCA_ILogicBrick::GetParent(), KX_GameObject::GetPhysicsController(), KX_Scene::GetPhysicsEnvironment(), KX_IPhysicsController::GetRadius(), KX_GameObject::GetSGNode(), KX_GameObject::GetVelocity(), KX_IPhysicsController::IsDyna(), SCA_IActuator::IsNegativeEvent(), KX_ACT_CONSTRAINT_DIRNX, KX_ACT_CONSTRAINT_DIRNY, KX_ACT_CONSTRAINT_DIRNZ, KX_ACT_CONSTRAINT_DIRPX, KX_ACT_CONSTRAINT_DIRPY, KX_ACT_CONSTRAINT_DIRPZ, KX_ACT_CONSTRAINT_DISTANCE, KX_ACT_CONSTRAINT_DOROTFH, KX_ACT_CONSTRAINT_FHNX, KX_ACT_CONSTRAINT_FHNY, KX_ACT_CONSTRAINT_FHNZ, KX_ACT_CONSTRAINT_FHPX, KX_ACT_CONSTRAINT_FHPY, KX_ACT_CONSTRAINT_FHPZ, KX_ACT_CONSTRAINT_LOCAL, KX_ACT_CONSTRAINT_LOCX, KX_ACT_CONSTRAINT_LOCY, KX_ACT_CONSTRAINT_LOCZ, KX_ACT_CONSTRAINT_NORMAL, KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ, KX_ACT_CONSTRAINT_PERMANENT, KX_GetActiveScene(), length(), MT_Vector3::length2(), m_activeTime, m_currentTime, KX_RayCast::m_hitNormal, m_hitObject, KX_RayCast::m_hitPoint, m_locrot, m_maximumBound, m_maximumSine, m_minimumBound, m_minimumSine, m_option, m_posDampTime, m_refDirVector, m_rotDampTime, MT_EPSILON(), MT_fuzzyZero(), MT_fuzzyZero2(), KX_GameObject::NodeGetWorldOrientation(), KX_GameObject::NodeGetWorldPosition(), KX_GameObject::NodeSetLocalPosition(), KX_GameObject::NodeSetWorldPosition(), MT_Vector3::normalize(), NULL, KX_RayCast::RayTest(), CValue::Release(), SCA_IActuator::RemoveAllEvents(), KX_IPhysicsController::SetAngularVelocity(), KX_IPhysicsController::SetLinearVelocity(), and TNT::sign().
int KX_ConstraintActuator::m_activeTime [protected] |
Definition at line 64 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().
int KX_ConstraintActuator::m_currentTime [protected] |
Definition at line 65 of file KX_ConstraintActuator.h.
Referenced by Update().
KX_GameObject* KX_ConstraintActuator::m_hitObject [protected] |
Definition at line 71 of file KX_ConstraintActuator.h.
int KX_ConstraintActuator::m_locrot [protected] |
Definition at line 62 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().
float KX_ConstraintActuator::m_maximumBound [protected] |
Definition at line 53 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().
float KX_ConstraintActuator::m_maximumSine [protected] |
Definition at line 57 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().
float KX_ConstraintActuator::m_minimumBound [protected] |
Definition at line 51 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().
float KX_ConstraintActuator::m_minimumSine [protected] |
Definition at line 55 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().
int KX_ConstraintActuator::m_option [protected] |
Definition at line 67 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), RayHit(), and Update().
int KX_ConstraintActuator::m_posDampTime [protected] |
Definition at line 48 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().
STR_String KX_ConstraintActuator::m_property [protected] |
Definition at line 69 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and RayHit().
float KX_ConstraintActuator::m_refDirection[3] [protected] |
Definition at line 59 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator().
MT_Vector3 KX_ConstraintActuator::m_refDirVector [protected] |
Definition at line 60 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().
int KX_ConstraintActuator::m_rotDampTime [protected] |
Definition at line 49 of file KX_ConstraintActuator.h.
Referenced by KX_ConstraintActuator(), and Update().