Blender V2.61 - r43446
|
#include <KX_TouchSensor.h>
Definition at line 51 of file KX_TouchSensor.h.
KX_TouchSensor::KX_TouchSensor | ( | class SCA_EventManager * | eventmgr, |
class KX_GameObject * | gameobj, | ||
bool | bFindMaterial, | ||
bool | bTouchPulse, | ||
const STR_String & | touchedpropname | ||
) |
Definition at line 101 of file KX_TouchSensor.cpp.
References KX_GameObject::getClientInfo(), KX_GameObject::GetPhysicsController(), Init(), m_colliders, m_physCtrl, KX_ClientObjectInfo::m_sensors, and MT_assert.
Referenced by GetReplica().
KX_TouchSensor::~KX_TouchSensor | ( | ) | [virtual] |
Definition at line 136 of file KX_TouchSensor.cpp.
References m_colliders, and CValue::Release().
virtual bool KX_TouchSensor::BroadPhaseFilterCollision | ( | void * | obj1, |
void * | obj2 | ||
) | [inline, virtual] |
Reimplemented in KX_NearSensor.
Definition at line 104 of file KX_TouchSensor.h.
bool KX_TouchSensor::BroadPhaseSensorFilterCollision | ( | void * | obj1, |
void * | obj2 | ||
) | [virtual] |
Reimplemented in KX_NearSensor.
Definition at line 200 of file KX_TouchSensor.cpp.
References KX_ClientObjectInfo::ACTOR, assert, PHY_IController::getNewClientInfo(), KX_GameObject::GetParent(), SCA_ILogicBrick::GetParent(), CValue::GetProperty(), STR_String::IsEmpty(), KX_ClientObjectInfo::m_auxilary_info, m_bFindMaterial, KX_ClientObjectInfo::m_gameobject, m_physCtrl, m_touchedpropname, KX_ClientObjectInfo::m_type, NULL, KX_ClientObjectInfo::OBACTORSENSOR, STR_String::Ptr(), and CValue::Release().
void KX_TouchSensor::EndFrame | ( | ) | [virtual] |
Definition at line 58 of file KX_TouchSensor.cpp.
References m_bColliderHash, m_bTriggered, m_colliders, m_hitObject, NULL, and CListValue::ReleaseAndRemoveAll().
Referenced by UnregisterToManager().
bool KX_TouchSensor::Evaluate | ( | ) | [virtual] |
Implements SCA_ISensor.
Reimplemented in KX_NearSensor.
Definition at line 73 of file KX_TouchSensor.cpp.
References CListValue::GetCount(), m_bColliderHash, m_bLastColliderHash, m_bLastCount, m_bLastTriggered, m_bTouchPulse, m_bTriggered, m_colliders, m_hitObject, SCA_ISensor::m_level, SCA_ISensor::m_reset, and NULL.
class PHY_IPhysicsController* KX_TouchSensor::GetPhysicsController | ( | ) | [inline] |
Definition at line 117 of file KX_TouchSensor.h.
References m_physCtrl.
Referenced by MergeScene_LogicBrick().
CValue * KX_TouchSensor::GetReplica | ( | void | ) | [virtual] |
Implements SCA_ISensor.
Reimplemented in KX_NearSensor, and KX_RadarSensor.
Definition at line 142 of file KX_TouchSensor.cpp.
References KX_TouchSensor(), and ProcessReplica().
virtual sensortype KX_TouchSensor::GetSensorType | ( | ) | [inline, virtual] |
Reimplemented from SCA_ISensor.
Reimplemented in KX_NearSensor, and KX_RadarSensor.
Definition at line 106 of file KX_TouchSensor.h.
References SCA_ISensor::ST_TOUCH.
void KX_TouchSensor::Init | ( | void | ) | [virtual] |
Reimplemented from SCA_ISensor.
Definition at line 125 of file KX_TouchSensor.cpp.
References m_bColliderHash, m_bCollision, m_bLastColliderHash, m_bLastCount, m_bLastTriggered, m_bTriggered, m_hitObject, SCA_ISensor::m_invert, SCA_ISensor::m_reset, and NULL.
Referenced by KX_TouchSensor(), and ProcessReplica().
virtual bool KX_TouchSensor::IsPositiveTrigger | ( | ) | [inline, virtual] |
Reimplemented from SCA_ISensor.
Definition at line 109 of file KX_TouchSensor.h.
References m_bTriggered, and SCA_ISensor::m_invert.
bool KX_TouchSensor::NewHandleCollision | ( | void * | obj1, |
void * | obj2, | ||
const PHY_CollData * | colldata | ||
) | [virtual] |
Reimplemented in KX_NearSensor.
Definition at line 239 of file KX_TouchSensor.cpp.
References CListValue::Add(), CValue::AddRef(), PHY_IController::getNewClientInfo(), SCA_ILogicBrick::GetParent(), CValue::GetProperty(), KX_ClientObjectInfo::isActor(), STR_String::IsEmpty(), KX_ClientObjectInfo::m_auxilary_info, m_bColliderHash, m_bFindMaterial, m_bTouchPulse, m_bTriggered, m_colliders, KX_ClientObjectInfo::m_gameobject, m_hitObject, SCA_ISensor::m_links, m_physCtrl, SCA_ISensor::m_suspended, m_touchedpropname, NULL, STR_String::Ptr(), and CListValue::SearchValue().
Referenced by KX_TouchEventManager::NextFrame().
void KX_TouchSensor::ProcessReplica | ( | ) | [virtual] |
Makes sure any internal data owned by this class is deep copied.
Reimplemented from SCA_ISensor.
Reimplemented in KX_NearSensor.
Definition at line 149 of file KX_TouchSensor.cpp.
References Init(), and m_colliders.
Referenced by GetReplica().
void KX_TouchSensor::RegisterSumo | ( | KX_TouchEventManager * | touchman | ) | [virtual] |
Definition at line 172 of file KX_TouchSensor.cpp.
References PHY_IPhysicsEnvironment::addSensor(), PHY_IController::getNewClientInfo(), KX_TouchEventManager::GetPhysicsEnvironment(), KX_ClientObjectInfo::isSensor(), m_physCtrl, and PHY_IPhysicsEnvironment::requestCollisionCallback().
Referenced by KX_TouchEventManager::RegisterSensor().
void KX_TouchSensor::ReParent | ( | SCA_IObject * | parent | ) | [virtual] |
Reimplemented from SCA_ISensor.
Reimplemented in KX_NearSensor.
Definition at line 156 of file KX_TouchSensor.cpp.
References KX_GameObject::getClientInfo(), m_physCtrl, and KX_ClientObjectInfo::m_sensors.
void KX_TouchSensor::SynchronizeTransform | ( | ) | [virtual] |
Reimplemented in KX_NearSensor, and KX_RadarSensor.
Definition at line 51 of file KX_TouchSensor.cpp.
void KX_TouchSensor::UnregisterSumo | ( | KX_TouchEventManager * | touchman | ) | [virtual] |
Definition at line 184 of file KX_TouchSensor.cpp.
References PHY_IController::getNewClientInfo(), KX_TouchEventManager::GetPhysicsEnvironment(), KX_ClientObjectInfo::isSensor(), m_physCtrl, PHY_IPhysicsEnvironment::removeCollisionCallback(), and PHY_IPhysicsEnvironment::removeSensor().
Referenced by KX_TouchEventManager::RemoveSensor().
void KX_TouchSensor::UnregisterToManager | ( | ) | [virtual] |
Reimplemented from SCA_ISensor.
Definition at line 66 of file KX_TouchSensor.cpp.
References EndFrame().
uint_ptr KX_TouchSensor::m_bColliderHash [protected] |
Definition at line 71 of file KX_TouchSensor.h.
Referenced by EndFrame(), Evaluate(), Init(), and NewHandleCollision().
bool KX_TouchSensor::m_bCollision [protected] |
Definition at line 65 of file KX_TouchSensor.h.
Referenced by Init().
bool KX_TouchSensor::m_bFindMaterial [protected] |
Definition at line 60 of file KX_TouchSensor.h.
Referenced by BroadPhaseSensorFilterCollision(), and NewHandleCollision().
uint_ptr KX_TouchSensor::m_bLastColliderHash [protected] |
Definition at line 72 of file KX_TouchSensor.h.
Referenced by Evaluate(), and Init().
int KX_TouchSensor::m_bLastCount [protected] |
Definition at line 70 of file KX_TouchSensor.h.
Referenced by Evaluate(), and Init().
bool KX_TouchSensor::m_bLastTriggered [protected] |
Definition at line 67 of file KX_TouchSensor.h.
Referenced by Evaluate(), KX_NearSensor::Evaluate(), and Init().
bool KX_TouchSensor::m_bTouchPulse [protected] |
Definition at line 61 of file KX_TouchSensor.h.
Referenced by Evaluate(), and NewHandleCollision().
bool KX_TouchSensor::m_bTriggered [protected] |
Definition at line 66 of file KX_TouchSensor.h.
Referenced by EndFrame(), Evaluate(), KX_NearSensor::Evaluate(), Init(), IsPositiveTrigger(), KX_NearSensor::NewHandleCollision(), NewHandleCollision(), and KX_NearSensor::SetPhysCtrlRadius().
class CListValue* KX_TouchSensor::m_colliders [protected] |
Definition at line 75 of file KX_TouchSensor.h.
Referenced by EndFrame(), Evaluate(), KX_TouchSensor(), KX_NearSensor::NewHandleCollision(), NewHandleCollision(), ProcessReplica(), and ~KX_TouchSensor().
SCA_IObject* KX_TouchSensor::m_hitObject [protected] |
Definition at line 74 of file KX_TouchSensor.h.
Referenced by EndFrame(), Evaluate(), Init(), KX_NearSensor::NewHandleCollision(), and NewHandleCollision().
class PHY_IPhysicsController* KX_TouchSensor::m_physCtrl [protected] |
Definition at line 63 of file KX_TouchSensor.h.
Referenced by KX_NearSensor::BroadPhaseFilterCollision(), BroadPhaseSensorFilterCollision(), GetPhysicsController(), KX_NearSensor::KX_NearSensor(), KX_TouchSensor(), KX_NearSensor::NewHandleCollision(), NewHandleCollision(), KX_NearSensor::ProcessReplica(), RegisterSumo(), ReParent(), KX_NearSensor::SetPhysCtrlRadius(), KX_RadarSensor::SynchronizeTransform(), KX_NearSensor::SynchronizeTransform(), UnregisterSumo(), and KX_NearSensor::~KX_NearSensor().
Py_Header STR_String KX_TouchSensor::m_touchedpropname [protected] |
The sensor should only look for objects with this property.
Definition at line 59 of file KX_TouchSensor.h.
Referenced by KX_NearSensor::BroadPhaseFilterCollision(), BroadPhaseSensorFilterCollision(), and NewHandleCollision().