Blender V2.61 - r43446
|
#include <KX_NearSensor.h>
Public Member Functions | |
KX_NearSensor (class SCA_EventManager *eventmgr, class KX_GameObject *gameobj, float margin, float resetmargin, bool bFindMaterial, const STR_String &touchedpropname, PHY_IPhysicsController *ctrl) | |
virtual | ~KX_NearSensor () |
virtual void | SynchronizeTransform () |
virtual CValue * | GetReplica () |
virtual void | ProcessReplica () |
virtual void | SetPhysCtrlRadius () |
virtual bool | Evaluate () |
virtual void | ReParent (SCA_IObject *parent) |
virtual bool | NewHandleCollision (void *obj1, void *obj2, const PHY_CollData *coll_data) |
virtual bool | BroadPhaseFilterCollision (void *obj1, void *obj2) |
virtual bool | BroadPhaseSensorFilterCollision (void *obj1, void *obj2) |
virtual sensortype | GetSensorType () |
Protected Attributes | |
float | m_Margin |
float | m_ResetMargin |
KX_ClientObjectInfo * | m_client_info |
Definition at line 42 of file KX_NearSensor.h.
KX_NearSensor::KX_NearSensor | ( | class SCA_EventManager * | eventmgr, |
class KX_GameObject * | gameobj, | ||
float | margin, | ||
float | resetmargin, | ||
bool | bFindMaterial, | ||
const STR_String & | touchedpropname, | ||
PHY_IPhysicsController * | ctrl | ||
) |
Definition at line 45 of file KX_NearSensor.cpp.
References KX_GameObject::getClientInfo(), m_client_info, m_Margin, KX_TouchSensor::m_physCtrl, KX_ClientObjectInfo::m_sensors, KX_ClientObjectInfo::SENSOR, PHY_IPhysicsController::SetMargin(), PHY_IController::setNewClientInfo(), and SynchronizeTransform().
Referenced by GetReplica().
KX_NearSensor::~KX_NearSensor | ( | ) | [virtual] |
Definition at line 130 of file KX_NearSensor.cpp.
References m_client_info, KX_TouchSensor::m_physCtrl, and NULL.
bool KX_NearSensor::BroadPhaseFilterCollision | ( | void * | obj1, |
void * | obj2 | ||
) | [virtual] |
Reimplemented from KX_TouchSensor.
Definition at line 183 of file KX_NearSensor.cpp.
References KX_ClientObjectInfo::ACTOR, assert, SCA_ILogicBrick::GetParent(), CValue::GetProperty(), STR_String::Length(), KX_ClientObjectInfo::m_gameobject, KX_TouchSensor::m_physCtrl, KX_TouchSensor::m_touchedpropname, KX_ClientObjectInfo::m_type, and NULL.
virtual bool KX_NearSensor::BroadPhaseSensorFilterCollision | ( | void * | obj1, |
void * | obj2 | ||
) | [inline, virtual] |
Reimplemented from KX_TouchSensor.
Definition at line 79 of file KX_NearSensor.h.
bool KX_NearSensor::Evaluate | ( | ) | [virtual] |
Reimplemented from KX_TouchSensor.
Definition at line 163 of file KX_NearSensor.cpp.
References KX_TouchSensor::m_bLastTriggered, KX_TouchSensor::m_bTriggered, and SetPhysCtrlRadius().
CValue * KX_NearSensor::GetReplica | ( | void | ) | [virtual] |
Reimplemented from KX_TouchSensor.
Reimplemented in KX_RadarSensor.
Definition at line 93 of file KX_NearSensor.cpp.
References KX_NearSensor(), and ProcessReplica().
virtual sensortype KX_NearSensor::GetSensorType | ( | ) | [inline, virtual] |
Reimplemented from KX_TouchSensor.
Reimplemented in KX_RadarSensor.
Definition at line 80 of file KX_NearSensor.h.
References SCA_ISensor::ST_NEAR.
bool KX_NearSensor::NewHandleCollision | ( | void * | obj1, |
void * | obj2, | ||
const PHY_CollData * | coll_data | ||
) | [virtual] |
Reimplemented from KX_TouchSensor.
Definition at line 211 of file KX_NearSensor.cpp.
References CListValue::Add(), CValue::AddRef(), PHY_IController::getNewClientInfo(), KX_TouchSensor::m_bTriggered, KX_TouchSensor::m_colliders, KX_ClientObjectInfo::m_gameobject, KX_TouchSensor::m_hitObject, SCA_ISensor::m_links, KX_TouchSensor::m_physCtrl, SCA_ISensor::m_suspended, NULL, and CListValue::SearchValue().
void KX_NearSensor::ProcessReplica | ( | ) | [virtual] |
Makes sure any internal data owned by this class is deep copied.
Reimplemented from KX_TouchSensor.
Definition at line 100 of file KX_NearSensor.cpp.
References PHY_IPhysicsController::GetReplica(), m_client_info, KX_ClientObjectInfo::m_gameobject, m_Margin, KX_TouchSensor::m_physCtrl, KX_ClientObjectInfo::SENSOR, PHY_IPhysicsController::SetMargin(), and PHY_IController::setNewClientInfo().
Referenced by GetReplica(), and KX_RadarSensor::GetReplica().
void KX_NearSensor::ReParent | ( | SCA_IObject * | parent | ) | [virtual] |
Reimplemented from KX_TouchSensor.
Definition at line 119 of file KX_NearSensor.cpp.
References m_client_info, KX_ClientObjectInfo::m_gameobject, KX_ClientObjectInfo::m_sensors, and SynchronizeTransform().
void KX_NearSensor::SetPhysCtrlRadius | ( | ) | [virtual] |
Definition at line 146 of file KX_NearSensor.cpp.
References KX_TouchSensor::m_bTriggered, m_Margin, KX_TouchSensor::m_physCtrl, m_ResetMargin, and PHY_IPhysicsController::SetRadius().
Referenced by Evaluate().
void KX_NearSensor::SynchronizeTransform | ( | ) | [virtual] |
Reimplemented from KX_TouchSensor.
Reimplemented in KX_RadarSensor.
Definition at line 76 of file KX_NearSensor.cpp.
References PHY_IPhysicsController::GetMotionState(), SCA_ILogicBrick::GetParent(), KX_TouchSensor::m_physCtrl, KX_GameObject::NodeGetWorldOrientation(), KX_GameObject::NodeGetWorldPosition(), PHY_IMotionState::setWorldOrientation(), PHY_IMotionState::setWorldPosition(), and PHY_IPhysicsController::WriteMotionStateToDynamics().
Referenced by KX_NearSensor(), and ReParent().
KX_ClientObjectInfo* KX_NearSensor::m_client_info [protected] |
Definition at line 49 of file KX_NearSensor.h.
Referenced by KX_NearSensor(), KX_RadarSensor::KX_RadarSensor(), ProcessReplica(), ReParent(), and ~KX_NearSensor().
float KX_NearSensor::m_Margin [protected] |
Definition at line 46 of file KX_NearSensor.h.
Referenced by KX_NearSensor(), ProcessReplica(), and SetPhysCtrlRadius().
float KX_NearSensor::m_ResetMargin [protected] |
Definition at line 47 of file KX_NearSensor.h.
Referenced by SetPhysCtrlRadius().