44#include <visp3/core/vpConfig.h>
46#ifdef VISP_HAVE_COIN3D_AND_GUI
48#include <visp3/ar/vpViewer.h>
57#include <Inventor/SoOffscreenRenderer.h>
58#include <Inventor/fields/SoSFTime.h>
59#include <Inventor/nodes/SoBaseColor.h>
60#include <Inventor/nodes/SoCone.h>
61#include <Inventor/nodes/SoCube.h>
62#include <Inventor/nodes/SoImage.h>
63#include <Inventor/nodes/SoLightModel.h>
64#include <Inventor/nodes/SoPerspectiveCamera.h>
65#include <Inventor/nodes/SoRotationXYZ.h>
66#include <Inventor/nodes/SoSeparator.h>
67#include <Inventor/nodes/SoTransform.h>
68#include <Inventor/nodes/SoTranslation.h>
69#include <Inventor/sensors/SoTimerSensor.h>
70#include <Inventor/threads/SbThread.h>
73#include <visp3/core/vpCameraParameters.h>
74#include <visp3/core/vpDebug.h>
75#include <visp3/core/vpHomogeneousMatrix.h>
76#include <visp3/core/vpImage.h>
77#include <visp3/core/vpImageConvert.h>
78#include <visp3/core/vpRGBa.h>
109#if defined(VISP_HAVE_SOWIN)
111#elif defined(VISP_HAVE_SOQT)
113#elif defined(VISP_HAVE_SOXT)
214 void load(
const char *file_name);
218 void save(
const char *name,
bool binary =
false);
260 void changeZoomFactor(
float zoom,
int index);
264#ifdef VISP_HAVE_MODULE_IO
265 void write(
const char *fileName);
285 void getSizeInternalView(
int &width,
int &height);
Generic class defining intrinsic camera parameters.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition of the vpImage class member functions.
unsigned int getInternalWidth() const
SoPerspectiveCamera * internalCamera
internal camera
void save(const char *name, bool binary=false)
save the scene in an iv file
unsigned int internal_height
GLubyte * image_background
vpCameraParameters internalCameraParameters
internal camera parameters
void load(const char *file_name)
load an iv file
unsigned char * bufferView
image of the internal view
SoTransform * extrenalCameraPosition
external camera position
void addFrame(const vpHomogeneousMatrix &fMo, float zoom=1)
Add the representation of a frame.
void kill()
perform some destruction
virtual void mainLoop()
activate the mainloop
void getCameraParameters(vpCameraParameters &cam)
get the intrinsic parameters of the camera
unsigned int external_height
unsigned int internal_width
void initMainApplication()
perform some initialization in the main program thread
bool cameraPositionInitialized
void initSoApplication()
open the SoGui application
void redraw()
display the scene (handle with care)
void initApplication(void *(*start_routine)(void *))
begin the main program
vpViewer * internalView
view from the camera
void init()
perform some initialization
vpHomogeneousMatrix cMf
internal camera position
SoSeparator * internalCameraObject
representation of the camera in the external view
void getCameraPosition(vpHomogeneousMatrix &_cMf)
get the camera position (from an homogeneous matrix)
SbThread * mainThread
thread with the main program
vpViewer * externalView
view from an external camera
void setZoomFactor(float zoom)
set the size of the camera/frame
SoPerspectiveCamera * externalCamera
external camera
void setCameraPosition(vpHomogeneousMatrix &cMf)
set the camera position (from an homogeneous matrix)
HWND mainWindow
main Widget
void offScreenRendering(vpSimulatorViewType view=vpSimulator::EXTERNAL, int *width=nullptr, int *height=nullptr)
void initExternalViewer(unsigned int nlig, unsigned int ncol)
initialize the external view
SoSeparator * externalRoot
root node of the external view
unsigned int getInternalHeight() const
virtual void initInternalViewer(unsigned int nlig, unsigned int ncol)
initialize the camera view
bool mainWindowInitialized
void addObject(SoSeparator *object, const vpHomogeneousMatrix &fMo, SoSeparator *root)
Add a new object in the scene graph ad a given location.
vpCameraParameters externalCameraParameters
internal camera parameters
void initSceneGraph()
initialize the scene graph
SoOffscreenRenderer * offScreenRenderer
unsigned char * getBufferedOffScreenRenderer()
get the image corresponding to the internal view
SoTransform * internalCameraPosition
internal camera position
SoSeparator * internalRoot
root node of the internal view
void closeMainApplication()
void addAbsoluteFrame(float zoom=1)
Add the representation of the absolute frame.
unsigned int external_width
Viewer used by the simulator.