23 #ifndef SENSORCONTROLLERS_H
24 #define SENSORCONTROLLERS_H
28 #include "phyobject.h"
64 virtual void update() = 0;
83 void setEnabled(
bool b)
153 return m_activations.size();
163 double activation(
int i)
const
165 return m_activations[i];
174 bool sensorIsActive(
int i)
const
176 return m_activeSensor[i];
187 virtual void setSensorActive(
int i,
bool active);
205 namespace __SingleIR_internal {
246 SingleIR(
WObject* obj,
wMatrix mtr,
double minDist,
double maxDist,
double aperture,
unsigned int numRays);
306 void set(
WObject* obj,
wMatrix mtr,
double minDist,
double maxDist,
double aperture,
unsigned int numRays);
318 void setGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
339 return m_transformation;
347 double getMinDistance()
const
357 double getMaxDistance()
const
367 double getAperture()
const
377 unsigned int getNumRays()
const
389 return ((m_object != NULL) && (m_numRays != 0));
399 void computeRayPoints();
405 void updateGraphicalRepresentation();
436 unsigned int m_numRays;
460 QVector<wVector> m_startingRayPoints;
468 QVector<wVector> m_endingRayPoints;
511 virtual void update();
520 virtual void setSensorActive(
int i,
bool active);
531 void setGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
537 QVector<SingleIR> m_sensors;
584 virtual void update();
593 virtual void setSensorActive(
int i,
bool active);
604 void setGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
610 QVector<SingleIR> m_sensors;
654 virtual void update();