Go to the documentation of this file.
16 #ifndef SURGSIM_GRAPHICS_VIEW_H
17 #define SURGSIM_GRAPHICS_VIEW_H
71 virtual void setPosition(
const std::array<int, 2>& position) = 0;
104 virtual void setCamera(std::shared_ptr<SurgSim::Framework::Component> camera);
108 std::shared_ptr<Camera>
getCamera()
const;
214 #endif // SURGSIM_GRAPHICS_VIEW_H
double m_eyeSeparation
Distance between eypoints in m.
Definition: View.h:203
int m_targetScreen
Index of the screen to be used.
Definition: View.h:201
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:46
bool m_isFullscreen
Whether to go fullscreen.
Definition: View.h:202
virtual int doSetTargetScreen(int val)=0
virtual bool isWindowBorderEnabled() const =0
Returns whether the view window has a border.
virtual bool isStereo() const
Definition: View.cpp:81
@ DISPLAY_TYPE_HMD
Definition: View.h:64
@ STEREO_MODE_ANAGLYPHIC
Definition: View.h:50
void setScreenWidth(double val)
Set the width of the screen, this is necessary to calculate the correct projection matrices for stere...
Definition: View.cpp:160
Definitions of small fixed-size vector types.
double m_screenWidth
Width of screen in m.
Definition: View.h:205
std::shared_ptr< Camera > m_camera
Camera whose image will be shown in this view.
Definition: View.h:197
@ STEREO_MODE_NONE
Definition: View.h:48
@ STEREO_MODE_RIGHT_EYE
Definition: View.h:54
@ STEREO_MODE_HORIZONTAL_SPLIT
Definition: View.h:51
virtual void setStereoMode(int val)
Set the mode that this view should use for stereo display, see StereMode for all the modes.
Definition: View.cpp:87
double getScreenWidth() const
Definition: View.cpp:155
StereoMode
Definition: View.h:47
double getScreenDistance() const
Definition: View.cpp:139
void setFullScreen(bool val)
Request the display to use the whole screen.
Definition: View.cpp:111
virtual void setDimensions(const std::array< int, 2 > &dimensions)=0
Set the dimensions of this view.
Definition: CompoundShapeToGraphics.cpp:30
virtual void update(double dt)=0
Updates the view.
@ STEREO_MODE_HORIZONTAL_INTERLACE
Definition: View.h:55
std::shared_ptr< Camera > getCamera() const
Gets the camera which provides the viewpoint in the scene.
Definition: View.cpp:70
@ STEREO_MODE_COUNT
Definition: View.h:58
void setScreenDistance(double val)
Set the distance of the user from the screen, this is necessary to calculate the correct projection m...
Definition: View.cpp:133
int getTargetScreen() const
Definition: View.cpp:128
@ DISPLAY_TYPE_MONITOR
Definition: View.h:63
bool doInitialize() override
Interface to be implemented by derived classes.
Definition: View.cpp:75
bool isFullScreen() const
Definition: View.cpp:117
virtual void setPosition(const std::array< int, 2 > &position)=0
Set the position of this view.
int getDisplayType() const
Definition: View.cpp:106
void setScreenHeight(double val)
Set the height of the screen, this is necessary to calculate the correct projection matrices for ster...
Definition: View.cpp:171
@ STEREO_MODE_QUAD_BUFFER
Definition: View.h:49
int getStereoMode() const
Definition: View.cpp:94
void setDisplayType(int type)
Set the kind of display.
Definition: View.cpp:99
int m_displayType
The requested display type.
Definition: View.h:200
double m_screenHeight
Height of screen in m.
Definition: View.h:206
virtual std::array< int, 2 > getPosition() const =0
Get the position of this view.
virtual void setWindowBorderEnabled(bool enabled)=0
Sets whether the view window has a border.
@ STEREO_MODE_VERTICAL_INTERLACE
Definition: View.h:56
void setTargetScreen(int val)
Request a certain screen to be used for this view.
Definition: View.cpp:122
@ DISPLAY_TYPE_COUNT
Definition: View.h:65
Base graphics view class, which defines the basic interface for all graphics views.
Definition: View.h:40
void setEyeSeparation(double val)
Set the distance between the users eyes, this is necessary to calculate the correct projection matric...
Definition: View.cpp:144
DisplayType
Definition: View.h:62
double m_screenDistance
Distance from user to screen in m.
Definition: View.h:204
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
virtual std::array< int, 2 > getDimensions() const =0
Get the dimensions of this view.
virtual void setDimensionsDouble(const std::array< double, 2 > &dimensions)=0
Set the dimensions of this view in doubles.
View(const std::string &name)
Constructor.
Definition: View.cpp:31
int m_stereoMode
The stereo mode, that is being used.
Definition: View.h:199
virtual void setCamera(std::shared_ptr< SurgSim::Framework::Component > camera)
Sets the camera which provides the viewpoint in the scene.
Definition: View.cpp:60
@ STEREO_MODE_VERTICAL_SPLIT
Definition: View.h:52
double getScreenHeight() const
Definition: View.cpp:166
@ STEREO_MODE_CHECKERBOARD
Definition: View.h:57
double getEyeSeparation() const
Definition: View.cpp:150
virtual std::array< double, 2 > getDimensionsDouble() const =0
Get the dimensions of this view in doubles.
@ STEREO_MODE_LEFT_EYE
Definition: View.h:53