Blender V2.61 - r43446
|
#include <KX_SteeringActuator.h>
Public Types | |
enum | KX_STEERINGACT_MODE { KX_STEERING_NODEF = 0, KX_STEERING_SEEK, KX_STEERING_FLEE, KX_STEERING_PATHFOLLOWING, KX_STEERING_MAX } |
Public Member Functions | |
KX_SteeringActuator (class SCA_IObject *gameobj, int mode, KX_GameObject *target, KX_GameObject *navmesh, float distance, float velocity, float acceleration, float turnspeed, bool isSelfTerminated, int pathUpdatePeriod, KX_ObstacleSimulation *simulation, short facingmode, bool normalup, bool enableVisualization) | |
virtual | ~KX_SteeringActuator () |
virtual bool | Update (double curtime, bool frame) |
virtual CValue * | GetReplica () |
virtual void | ProcessReplica () |
virtual void | Relink (CTR_Map< CTR_HashedPtr, void * > *obj_map) |
virtual bool | UnlinkObject (SCA_IObject *clientobj) |
const MT_Vector3 & | GetSteeringVec () |
Static Public Member Functions | |
static PyObject * | pyattr_get_target (void *self, const struct KX_PYATTRIBUTE_DEF *attrdef) |
static int | pyattr_set_target (void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) |
static PyObject * | pyattr_get_navmesh (void *self, const struct KX_PYATTRIBUTE_DEF *attrdef) |
static int | pyattr_set_navmesh (void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) |
static PyObject * | pyattr_get_steeringVec (void *self, const struct KX_PYATTRIBUTE_DEF *attrdef) |
Definition at line 40 of file KX_SteeringActuator.h.
KX_STEERING_NODEF | |
KX_STEERING_SEEK | |
KX_STEERING_FLEE | |
KX_STEERING_PATHFOLLOWING | |
KX_STEERING_MAX |
Definition at line 70 of file KX_SteeringActuator.h.
KX_SteeringActuator::KX_SteeringActuator | ( | class SCA_IObject * | gameobj, |
int | mode, | ||
KX_GameObject * | target, | ||
KX_GameObject * | navmesh, | ||
float | distance, | ||
float | velocity, | ||
float | acceleration, | ||
float | turnspeed, | ||
bool | isSelfTerminated, | ||
int | pathUpdatePeriod, | ||
KX_ObstacleSimulation * | simulation, | ||
short | facingmode, | ||
bool | normalup, | ||
bool | enableVisualization | ||
) |
Definition at line 44 of file KX_SteeringActuator.cpp.
References SG_Spatial::GetLocalOrientation(), KX_ObstacleSimulation::GetObstacle(), KX_GameObject::GetParent(), KX_GameObject::GetSGNode(), and SCA_IObject::RegisterActuator().
Referenced by GetReplica().
KX_SteeringActuator::~KX_SteeringActuator | ( | ) | [virtual] |
Definition at line 95 of file KX_SteeringActuator.cpp.
References SCA_IObject::UnregisterActuator().
CValue * KX_SteeringActuator::GetReplica | ( | void | ) | [virtual] |
Implements CValue.
Definition at line 103 of file KX_SteeringActuator.cpp.
References KX_SteeringActuator(), and ProcessReplica().
const MT_Vector3 & KX_SteeringActuator::GetSteeringVec | ( | ) |
Definition at line 308 of file KX_SteeringActuator.cpp.
Referenced by pyattr_get_steeringVec().
void KX_SteeringActuator::ProcessReplica | ( | ) | [virtual] |
Makes sure any internal data owned by this class is deep copied.
Reimplemented from SCA_IActuator.
Definition at line 111 of file KX_SteeringActuator.cpp.
References SCA_IObject::RegisterActuator().
Referenced by GetReplica().
PyObject * KX_SteeringActuator::pyattr_get_navmesh | ( | void * | self, |
const struct KX_PYATTRIBUTE_DEF * | attrdef | ||
) | [static] |
Definition at line 582 of file KX_SteeringActuator.cpp.
PyObject * KX_SteeringActuator::pyattr_get_steeringVec | ( | void * | self, |
const struct KX_PYATTRIBUTE_DEF * | attrdef | ||
) | [static] |
Definition at line 616 of file KX_SteeringActuator.cpp.
References GetSteeringVec().
PyObject * KX_SteeringActuator::pyattr_get_target | ( | void * | self, |
const struct KX_PYATTRIBUTE_DEF * | attrdef | ||
) | [static] |
Definition at line 554 of file KX_SteeringActuator.cpp.
int KX_SteeringActuator::pyattr_set_navmesh | ( | void * | self, |
const struct KX_PYATTRIBUTE_DEF * | attrdef, | ||
PyObject * | value | ||
) | [static] |
Definition at line 591 of file KX_SteeringActuator.cpp.
References NULL, SCA_IObject::RegisterActuator(), and SCA_IObject::UnregisterActuator().
int KX_SteeringActuator::pyattr_set_target | ( | void * | self, |
const struct KX_PYATTRIBUTE_DEF * | attrdef, | ||
PyObject * | value | ||
) | [static] |
Definition at line 563 of file KX_SteeringActuator.cpp.
References NULL, SCA_IObject::RegisterActuator(), and SCA_IObject::UnregisterActuator().
void KX_SteeringActuator::Relink | ( | CTR_Map< CTR_HashedPtr, void * > * | obj_map | ) | [virtual] |
Reimplemented from SCA_ILogicBrick.
Definition at line 136 of file KX_SteeringActuator.cpp.
References SCA_IObject::RegisterActuator(), and SCA_IObject::UnregisterActuator().
bool KX_SteeringActuator::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 121 of file KX_SteeringActuator.cpp.
References NULL.
bool KX_SteeringActuator::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 155 of file KX_SteeringActuator.cpp.
References KX_ObstacleSimulation::AdjustObstacleVelocity(), KX_GameObject::ApplyMovement(), KX_NavMeshObject::DrawPath(), KX_Obstacle::dvel, KX_NavMeshObject::FindPath(), MT_Vector3::fuzzyZero(), KX_GameObject::GetLinearVelocity(), SCA_ILogicBrick::GetParent(), KX_GameObject::IsDynamic(), SCA_IActuator::IsNegativeEvent(), KX_RasterizerDrawDebugLine(), KX_STEERING_FLEE, KX_STEERING_PATHFOLLOWING, KX_STEERING_SEEK, MT_Vector3::length2(), M_PI, SCA_IActuator::m_posevent, MAX_PATH_LENGTH, KX_GameObject::NodeGetWorldPosition(), MT_Vector3::normalize(), NULL, SCA_IActuator::RemoveAllEvents(), KX_GameObject::setLinearVelocity(), MT_Tuple3::setValue(), and MT_Tuple3::z().