22 #ifndef CENS_GRAPHICS_H
23 #define CENS_GRAPHICS_H
28 #include <Eigen/Geometry>
29 using namespace Eigen;
34 #include <GL/freeglut.h>
89 m_grTextureEnabled=
false;
90 m_grTextureInitialized=
false;
91 m_grAxisEnabled=
false;
93 m_grCameraAxisEnabled=
false;
94 m_grObjectAxesEnabled=
false;
95 m_grJointAxesEnabled=
false;
106 virtual void initCENSGraphics(
int argc,
char ** argv );
112 virtual void stepToStepLoop();
119 virtual void display();
122 virtual bool isIdle();
128 virtual void keyboard(
unsigned char key,
int x,
int y );
182 m_cScreenHeight * 3 ;
183 unsigned char *pixels =
184 new unsigned char[ data_length ];
187 m_cPixmap.setData(pixels,
188 m_cScreenWidth,m_cScreenHeight);
286 void beginRendering();
295 void initTexture(
const GLubyte *source = 0,
int width = 0,
int height = 0);
305 void focusCamera(
int camera_index);
308 void updateCamera(
int camera_index);
311 const CENSPixelMap &getCameraPixelMap(
int camera_index );
314 void saveCameraPixelMap(
int camera_index,
int t,
const char * type=
"jpg" );
322 const Vector3f color);
328 const Vector3f& orig,
329 const Vector3f& vec0,
330 const Vector3f& vec1 );
334 const Vector3f& orig,
335 const Matrix3f& rotMat,
336 const Vector3f& halfExtent );
340 const Vector3f& orig,
346 const Vector3f& orig,
347 const Matrix3f& rot ,
348 const std::vector<Vector3f> &vtx,
349 const unsigned int *idx,
356 const Vector3f &origin,
357 const Matrix3f &rotation,
363 glVertex3d(v[0], v[1], v[2]);
382 void toggleTexture();
384 void toggleObjectAxes();
385 void toggleJointAxes();
386 void toggleCameraAxis();
461 #endif // CENS_GRAPHICS_H)
Computational Embodied Neuroscience Simulator library.
A C++ wrapper for OpenGL.
std::vector< CENSCamera * > m_grCameras
bool m_grCameraAxisEnabled
void drawVector(const Vector3f &v)
Vector3f m_grCompoundColor
CENSGraphics * cens_graphics
CENSCamera m_grViewCamera
std::vector< CENSGraphicsShape * > m_grShapes
unsigned char * m_cPixels
Light settings of the scene.
Vector3f m_grCapsuleColor
CENSParameterManager m_grParameterManager
Manager of parameters' initializarion.
std::string m_cScreenTitle
Use a byte vector as a matrix.
static const char * graph_params_filename
bool m_grObjectAxesEnabled
std::vector< CENSCamera * > m_grEyeCameras
bool m_grJointAxesEnabled
CENSCamera(const CENSCamera ©)
bool m_grTextureInitialized