Blender V2.61 - r43446
|
#include <KX_RadarSensor.h>
Public Types | |
enum | RadarAxis { KX_RADAR_AXIS_POS_X = 0, KX_RADAR_AXIS_POS_Y, KX_RADAR_AXIS_POS_Z, KX_RADAR_AXIS_NEG_X, KX_RADAR_AXIS_NEG_Y, KX_RADAR_AXIS_NEG_Z } |
Public Member Functions | |
KX_RadarSensor (SCA_EventManager *eventmgr, KX_GameObject *gameobj, PHY_IPhysicsController *physCtrl, double coneradius, double coneheight, int axis, double margin, double resetmargin, bool bFindMaterial, const STR_String &touchedpropname) | |
KX_RadarSensor () | |
virtual | ~KX_RadarSensor () |
virtual void | SynchronizeTransform () |
virtual CValue * | GetReplica () |
virtual sensortype | GetSensorType () |
Protected Attributes | |
Py_Header float | m_coneradius |
float | m_coneheight |
int | m_axis |
float | m_cone_origin [3] |
float | m_cone_target [3] |
Radar 'cone' sensor. Very similar to a near-sensor, but instead of a sphere, a cone is used.
Definition at line 41 of file KX_RadarSensor.h.
KX_RADAR_AXIS_POS_X | |
KX_RADAR_AXIS_POS_Y | |
KX_RADAR_AXIS_POS_Z | |
KX_RADAR_AXIS_NEG_X | |
KX_RADAR_AXIS_NEG_Y | |
KX_RADAR_AXIS_NEG_Z |
Definition at line 84 of file KX_RadarSensor.h.
KX_RadarSensor::KX_RadarSensor | ( | SCA_EventManager * | eventmgr, |
KX_GameObject * | gameobj, | ||
PHY_IPhysicsController * | physCtrl, | ||
double | coneradius, | ||
double | coneheight, | ||
int | axis, | ||
double | margin, | ||
double | resetmargin, | ||
bool | bFindMaterial, | ||
const STR_String & | touchedpropname | ||
) |
RadarSensor constructor. Creates a near-sensor derived class, with a cone collision shape.
Definition at line 43 of file KX_RadarSensor.cpp.
References KX_NearSensor::m_client_info, KX_ClientObjectInfo::m_type, and KX_ClientObjectInfo::SENSOR.
KX_RadarSensor::KX_RadarSensor | ( | ) |
Referenced by GetReplica().
KX_RadarSensor::~KX_RadarSensor | ( | ) | [virtual] |
Definition at line 74 of file KX_RadarSensor.cpp.
CValue * KX_RadarSensor::GetReplica | ( | void | ) | [virtual] |
Reimplemented from KX_NearSensor.
Definition at line 79 of file KX_RadarSensor.cpp.
References KX_RadarSensor(), and KX_NearSensor::ProcessReplica().
virtual sensortype KX_RadarSensor::GetSensorType | ( | ) | [inline, virtual] |
Reimplemented from KX_NearSensor.
Definition at line 94 of file KX_RadarSensor.h.
References SCA_ISensor::ST_RADAR.
void KX_RadarSensor::SynchronizeTransform | ( | ) | [virtual] |
Transforms the collision object. A cone is not correctly centered for usage.
Reimplemented from KX_NearSensor.
Definition at line 89 of file KX_RadarSensor.cpp.
References MT_Transform::getBasis(), PHY_IPhysicsController::GetMotionState(), MT_Transform::getOrigin(), SCA_ILogicBrick::GetParent(), m_axis, m_cone_origin, m_cone_target, m_coneheight, KX_TouchSensor::m_physCtrl, MT_radians(), MT_Transform::rotate(), SENS_RADAR_NEG_X_AXIS, SENS_RADAR_NEG_Y_AXIS, SENS_RADAR_NEG_Z_AXIS, SENS_RADAR_X_AXIS, SENS_RADAR_Y_AXIS, SENS_RADAR_Z_AXIS, MT_Transform::setBasis(), MT_Transform::setOrigin(), PHY_IMotionState::setWorldOrientation(), PHY_IMotionState::setWorldPosition(), MT_Transform::translate(), and PHY_IPhysicsController::WriteMotionStateToDynamics().
int KX_RadarSensor::m_axis [protected] |
Definition at line 52 of file KX_RadarSensor.h.
Referenced by SynchronizeTransform().
float KX_RadarSensor::m_cone_origin[3] [protected] |
The previous position of the origin of the cone.
Definition at line 57 of file KX_RadarSensor.h.
Referenced by SynchronizeTransform().
float KX_RadarSensor::m_cone_target[3] [protected] |
The previous direction of the cone (origin to bottom plane).
Definition at line 62 of file KX_RadarSensor.h.
Referenced by SynchronizeTransform().
float KX_RadarSensor::m_coneheight [protected] |
Height of the cone.
Definition at line 51 of file KX_RadarSensor.h.
Referenced by SynchronizeTransform().
Py_Header float KX_RadarSensor::m_coneradius [protected] |
Definition at line 46 of file KX_RadarSensor.h.