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;
351 return m_transformation.w_pos;
359 double getMinDistance()
const
369 double getMaxDistance()
const
379 double getAperture()
const
389 unsigned int getNumRays()
const
401 return ((m_object != NULL) && (m_numRays != 0));
411 void computeRayPoints();
417 void updateGraphicalRepresentation();
448 unsigned int m_numRays;
472 QVector<wVector> m_startingRayPoints;
480 QVector<wVector> m_endingRayPoints;
523 virtual void update();
532 virtual void setSensorActive(
int i,
bool active);
543 void setGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
550 const QVector<SingleIR>& sensors()
const
559 QVector<SingleIR> m_sensors;
606 virtual void update();
615 virtual void setSensorActive(
int i,
bool active);
626 void setGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
633 const QVector<SingleIR>& sensors()
const
642 QVector<SingleIR> m_sensors;
686 virtual void update();