88 cViewport(
cCamera* a_camera =
nullptr,
double a_contentScaleX = 1.0,
double a_contentScaleY = 1.0);
114 virtual bool selectWorld(
const int a_windowPosX,
const int a_windowPosY,
115 const int a_windowWidth,
const int a_windowHeight,
120 virtual bool selectFrontLayer(
const int a_windowPosX,
const int a_windowPosY,
121 const int a_windowWidth,
const int a_windowHeight,
126 virtual bool selectBackLayer(
const int a_windowPosX,
const int a_windowPosY,
127 const int a_windowWidth,
const int a_windowHeight,
132 virtual bool selectLayers(
const int a_windowPosX,
const int a_windowPosY,
133 const int a_windowWidth,
const int a_windowHeight,
136 bool a_checkFrontLayer =
true,
137 bool a_checkBackLayer =
true);
147 virtual void renderView(
const int a_windowWidth,
148 const int a_windowHeight,
150 const bool a_defaultBuffer =
true);
168 void setContentScale(
double a_contentScaleWidth = 1.0,
double a_contentScaleHeight = 1.0);
Implementation of a camera.
Implementation of a framebuffer.
Implements a 2D display panel associated with a framebuffer.
This class implements a virtual camera.
Definition CCamera.h:111
This class implements a collision detection recorder that stores all collision events that are report...
Definition CCollisionBasics.h:186
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition CGenericObject.h:113
This class implements a 2D display panel associated with a framebuffer.
Definition CViewPanel.h:79
This class implements a viewport.
Definition CViewport.h:80
double m_contentScaleWidth
Content scale factor along width axis.
Definition CViewport.h:193
virtual bool selectWorld(const int a_windowPosX, const int a_windowPosY, const int a_windowWidth, const int a_windowHeight, cCollisionRecorder &a_collisionRecorder, cCollisionSettings &a_collisionSettings)
This method queries whether the specified position is 'pointing at' any objects in the world.
Definition CViewport.cpp:143
cCamera * m_cameraViewport
Camera.
Definition CViewport.h:190
double getContentScaleHeight()
This method returns the content scale factor along the height axis.
Definition CViewport.h:174
cFrameBufferPtr m_displayBuffer
Display buffer.
Definition CViewport.h:202
virtual bool selectBackLayer(const int a_windowPosX, const int a_windowPosY, const int a_windowWidth, const int a_windowHeight, cCollisionRecorder &a_collisionRecorder, cCollisionSettings &a_collisionSettings)
This method queries whether the specified position is 'pointing at' any widget on the back layer.
Definition CViewport.cpp:228
virtual void renderView(const int a_windowWidth, const int a_windowHeight, const cEyeMode a_eyeMode=C_STEREO_LEFT_EYE, const bool a_defaultBuffer=true)
This method renders the the viewport view in OpenGL.
Definition CViewport.cpp:304
void setContentScaleWidth(double a_contentScaleWidth=1.0)
This method sets the content scale factor along the width axis.
Definition CViewport.h:162
int getDisplayWidth()
This method returns the width of the current window display in pixels.
Definition CViewport.cpp:346
virtual bool selectFrontLayer(const int a_windowPosX, const int a_windowPosY, const int a_windowWidth, const int a_windowHeight, cCollisionRecorder &a_collisionRecorder, cCollisionSettings &a_collisionSettings)
This method queries whether the specified position is 'pointing at' any widget on the front layer.
Definition CViewport.cpp:182
void copyImageBuffer(cImagePtr a_image)
This method copies the output image data to an image structure.
Definition CViewport.cpp:332
cCamera * m_camera
Camera.
Definition CViewport.h:187
double m_contentScaleHeight
Content scale factor along height axis.
Definition CViewport.h:196
int getDisplayHeight()
This method returns the height of the current window display in pixels.
Definition CViewport.cpp:357
cCamera * getCamera()
This method returns a pointer to the current camera.
Definition CViewport.h:101
double m_displayWidth
Display buffer width in pixels.
Definition CViewport.h:205
void setContentScale(double a_contentScaleWidth=1.0, double a_contentScaleHeight=1.0)
This method sets the content scale factors along the width and height axes.
Definition CViewport.cpp:121
double m_displayHeight
Display buffer height in pixels.
Definition CViewport.h:208
double getContentScaleWidth()
This method returns the content scale factor along the width axis.
Definition CViewport.h:171
void updateGPU()
This method resets textures and display lists for the world associated with this camera.
Definition CViewport.cpp:368
virtual bool selectLayers(const int a_windowPosX, const int a_windowPosY, const int a_windowWidth, const int a_windowHeight, cCollisionRecorder &a_collisionRecorder, cCollisionSettings &a_collisionSettings, bool a_checkFrontLayer=true, bool a_checkBackLayer=true)
This method queries whether the specified position is 'pointing at' any widget on selected layers.
Definition CViewport.cpp:267
void setContentScaleHeight(double a_contentScaleHeight=1.0)
This method sets the content scale factor along the height axis.
Definition CViewport.h:165
void setCamera(cCamera *a_camera)
This method sets the camera.
Definition CViewport.cpp:102
virtual ~cViewport()
Destructor of cViewport.
Definition CViewport.cpp:90
cViewPanel * m_viewPanel
View panel.
Definition CViewport.h:199
Definition CAudioBuffer.cpp:57
cEyeMode
Definition CCamera.h:74
@ C_STEREO_LEFT_EYE
Definition CCamera.h:75
std::shared_ptr< cFrameBuffer > cFrameBufferPtr
Definition CFrameBuffer.h:72
std::shared_ptr< cImage > cImagePtr
Definition CImage.h:64
This structure stores the collision settings that are passed to a collision detector when querying fo...
Definition CCollisionBasics.h:243