27 #include "neuroninterfaces.h"
30 #include "wheeledexperimenthelper.h"
31 #include "baseexception.h"
32 #include "helperresources.h"
91 static void describe(QString type);
96 virtual void update();
169 static void describe( QString type );
193 namespace __LinearCamera_internal {
257 const QColor& colorForReceptor(
int i)
const
259 return m_receptors[i];
267 double getAperture()
const
277 unsigned int getNumReceptors()
const
279 return m_numReceptors;
288 QColor getBackgroundColor()
const
290 return m_backgroundColor;
299 void setBackgroundColor(QColor color)
301 m_backgroundColor = color;
309 void drawCamera(
bool d);
319 virtual void resourceChanged(QString resourceName, ResourceChangeType changeType);
324 QVector<QColor> m_receptors;
339 const wMatrix m_transformation;
344 const double m_aperture;
349 const unsigned int m_numReceptors;
356 QColor m_backgroundColor;
363 const double m_apertureMin;
370 const double m_apertureMax;
377 const double m_receptorRange;
417 strncpy(m_filename, filename, 256);
418 m_filename[255] =
'\0';
419 strncpy(m_description, description, 256);
420 m_description[255] =
'\0';
421 sprintf(m_errorMessage,
"Error when loading the file with IR samples \"%s\". Description: %s", m_filename, m_description);
422 m_errorMessage[1023] =
'\0';
433 strncpy(m_filename, other.m_filename, 256);
434 m_filename[255] =
'\0';
435 strncpy(m_description, other.m_description, 256);
436 m_description[255] =
'\0';
437 strncpy(m_errorMessage, other.m_errorMessage, 1024);
438 m_errorMessage[1023] =
'\0';
448 if (&other ==
this) {
452 BaseException::operator=(other);
453 strncpy(m_filename, other.m_filename, 256);
454 m_filename[255] =
'\0';
455 strncpy(m_description, other.m_description, 256);
456 m_description[255] =
'\0';
457 strncpy(m_errorMessage, other.m_errorMessage, 1024);
458 m_errorMessage[1023] =
'\0';
475 virtual const char *what()
const throw()
477 return m_errorMessage;
485 const char *filename()
const throw()
495 const char *description()
const throw()
497 return m_description;
510 char m_filename[256];
515 char m_description[256];
520 char m_errorMessage[1024];
565 SampledIRDataLoader(QString filename);
570 ~SampledIRDataLoader();
577 const QString& filename()
const
587 unsigned int numIR()
const
597 unsigned int numSamplingAngles()
const
599 return m_numSamplingAngles;
607 unsigned int numDistances()
const
609 return m_numDistances;
617 real initialDistance()
const
619 return m_initialDistance;
627 real distanceInterval()
const
629 return m_distanceInterval;
637 real finalDistance()
const
639 return m_finalDistance;
652 unsigned int getActivation(
unsigned int i, real dist, real ang)
const;
666 QVector<unsigned int>::const_iterator getActivation(real dist, real ang)
const;
677 unsigned int getLinearIndex(
unsigned int id,
unsigned int ang,
unsigned int dist)
const;
682 const QString m_filename;
687 unsigned int m_numIR;
692 unsigned int m_numSamplingAngles;
697 unsigned int m_numDistances;
702 real m_initialDistance;
707 real m_distanceInterval;
712 real m_finalDistance;
720 QVector<unsigned int> m_activations;
728 QVector<unsigned int> m_nullActivations;