40 #ifndef vpSimulator_HH 41 #define vpSimulator_HH 50 #include <visp3/core/vpConfig.h> 52 #ifdef VISP_HAVE_COIN3D_AND_GUI 54 #include <visp3/ar/vpViewer.h> 63 #include <Inventor/SoOffscreenRenderer.h> 64 #include <Inventor/fields/SoSFTime.h> 65 #include <Inventor/nodes/SoBaseColor.h> 66 #include <Inventor/nodes/SoCone.h> 67 #include <Inventor/nodes/SoCube.h> 68 #include <Inventor/nodes/SoImage.h> 69 #include <Inventor/nodes/SoLightModel.h> 70 #include <Inventor/nodes/SoPerspectiveCamera.h> 71 #include <Inventor/nodes/SoRotationXYZ.h> 72 #include <Inventor/nodes/SoSeparator.h> 73 #include <Inventor/nodes/SoTransform.h> 74 #include <Inventor/nodes/SoTranslation.h> 75 #include <Inventor/sensors/SoTimerSensor.h> 76 #include <Inventor/threads/SbThread.h> 79 #include <visp3/core/vpCameraParameters.h> 80 #include <visp3/core/vpDebug.h> 81 #include <visp3/core/vpHomogeneousMatrix.h> 82 #include <visp3/core/vpImage.h> 83 #include <visp3/core/vpImageConvert.h> 84 #include <visp3/core/vpRGBa.h> 114 #if defined(VISP_HAVE_SOWIN) 116 #elif defined(VISP_HAVE_SOQT) 118 #elif defined(VISP_HAVE_SOXT) 125 void initSoApplication();
133 virtual void mainLoop();
143 virtual void initInternalViewer(
const unsigned int nlig,
const unsigned int ncol);
145 void initExternalViewer(
const unsigned int nlig,
const unsigned int ncol);
154 void initApplication(
void *(*start_routine)(
void *));
155 void initApplication(
void *(*start_routine)(
void *),
void *data);
157 void initMainApplication();
158 void closeMainApplication();
206 void initSceneGraph();
219 void load(
const char *file_name);
223 void save(
const char *name,
bool binary =
false);
226 void addAbsoluteFrame(
float zoom = 1);
230 void setZoomFactor(
const float zoom);
265 void changeZoomFactor(
const float zoom,
const int index);
269 #ifdef VISP_HAVE_MODULE_IO 270 void write(
const char *fileName);
275 void offScreenRendering(vpSimulatorViewType view =
vpSimulator::EXTERNAL,
int *width = NULL,
int *height = NULL);
290 void getSizeInternalView(
int &width,
int &height);
HWND mainWindow
main Widget
SoSeparator * externalRoot
root node of the external view
SoPerspectiveCamera * internalCamera
internal camera
bool cameraPositionInitialized
SoTransform * internalCameraPosition
internal camera position
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a simulator based on Coin3d (www.coin3d.org).
vpCameraParameters internalCameraParameters
internal camera parameters
unsigned int getInternalHeight() const
unsigned int external_height
void getCameraParameters(vpCameraParameters &cam)
get the intrinsic parameters of the camera
bool mainWindowInitialized
vpViewer * internalView
view from the camera
SoSeparator * internalRoot
root node of the internal view
vpCameraParameters externalCameraParameters
internal camera parameters
unsigned char * getBufferedOffScreenRenderer()
get the image corresponding to the internal view
void getCameraPosition(vpHomogeneousMatrix &_cMf)
get the camera position (from an homogeneous matrix)
SoTransform * extrenalCameraPosition
external camera position
GLubyte * image_background
Viewer used by the simulator.
Generic class defining intrinsic camera parameters.
vpViewer * externalView
view from an external camera
SoPerspectiveCamera * externalCamera
external camera
unsigned int external_width
vpHomogeneousMatrix cMf
internal camera position
unsigned char * bufferView
image of the internal view
unsigned int internal_width
unsigned int getInternalWidth() const
SoOffscreenRenderer * offScreenRenderer
unsigned int internal_height
SoSeparator * internalCameraObject
representation of the camera in the external view
SbThread * mainThread
thread with the main program