SCENE C++ API  2.1.0
Public Member Functions | List of all members
LSView3d Class Reference

The view interface which provides functionality specific to 3D views. More...

#include <lsview3d.h>

+ Inheritance diagram for LSView3d:

Public Member Functions

void updateView ()
 Triggers an update of the view (Redraws the whole scene) More...
 
void addRenderable (ref_ptr< LSRenderable3D > renderable)
 Adds a renderable to the scene of this view. More...
 
void removeRenderable (ref_ptr< LSRenderable3D > renderable)
 Removes a renderable from the scene of this view. More...
 
LSResult::Result renderToImageFile (LSString filePath, bool waitForPointLoader)
 Renders the contents of the view to an image file. More...
 
LSResult::Result renderToImageBuffer (unsigned char *buffer, bool waitForPointLoader)
 Renders the contents of the view to an image buffer. More...
 
LSRenderStatistics getRenderStatistics () const
 Gets the render statistics for the last rendered frame. More...
 
void setObjectVisibility (LSObject &object, bool visible)
 Set the visibility of an object. More...
 
bool isObjectVisible (LSObject &object) const
 Get the visibility state of an object. More...
 
ref_ptr< LSCameragetCamera ()
 Get the camera of the view. More...
 
Eigen::Vector3d pickScanPoint (const Eigen::Vector2ui &viewPoint)
 Pick a scan point from the current view. More...
 
ref_ptr< LSView3dSettingsgetViewSettings () const
 Gets the view settings associated with this view. More...
 
LSResult::Result setViewSettings (ref_ptr< LSView3dSettings > settings)
 Sets the view settings associated with this view. More...
 
- Public Member Functions inherited from LSView
bool isOffscreen () const
 Determines whether the view is an offscreen view. More...
 
ViewType getViewType () const
 Gets the view type of the view. More...
 
unsigned getViewSizeX ()
 Get the size of the view in x-direction. More...
 
unsigned getViewSizeY ()
 Get the size of the view in y-direction. More...
 
ref_ptr< LSObjectgetVisualizedObject () const
 Gets the object which is being visualized by the view. More...
 
Eigen::Vector3d pickScanPoint (const Eigen::Vector2ui &viewPoint)
 Pick a scan point from the current view. More...
 

Additional Inherited Members

- Public Types inherited from LSView
enum  ViewType {
  VIEW_3D = 0, CORRESPONDENCE_VIEW = 1, QUICK_VIEW = 3,
  PLANAR_VIEW = 4
}
 The list of supported view types. More...
 
- Public Attributes inherited from LSView
LSSignal< ref_ptr< LSMouseEvent > > onMouseLeftButtonDown
 Dispatched when the left mouse button is pushed down in the view. More...
 
LSSignal< ref_ptr< LSMouseEvent > > onMouseLeftButtonUp
 Dispatched when the left mouse button is released in the view. More...
 
LSSignal< ref_ptr< LSMouseEvent > > onMouseLeftButtonDoubleClick
 Dispatched when the left mouse button is double-clicked in the view. More...
 
LSSignal< ref_ptr< LSMouseEvent > > onMouseRightButtonDown
 Dispatched when the right mouse button is pushed down in the view. More...
 
LSSignal< ref_ptr< LSMouseEvent > > onMouseRightButtonUp
 Dispatched when the right mouse button is released in the view. More...
 
LSSignal< ref_ptr< LSMouseEvent > > onMouseMiddleButtonDown
 Dispatched when the middle mouse button is pushed down in the view. More...
 
LSSignal< ref_ptr< LSMouseEvent > > onMouseMiddleButtonUp
 Dispatched when the middle mouse button is released in the view. More...
 
LSSignal< ref_ptr< LSMouseEvent > > onMouseMoved
 Dispatched when the mouse is moved in the view. More...
 
LSSignal< ref_ptr< LSMouseWheelEvent > > onMouseWheelMoved
 Dispatched when the mouse wheel is moved in the view. More...
 
LSSignal< ref_ptr< LSKeyEvent > > onKeyDown
 Dispatched when a keyboard key is pushed down in the view. More...
 
LSSignal< ref_ptr< LSKeyEvent > > onKeyUp
 Dispatched when a keyboard button is released in the view. More...
 
- Protected Member Functions inherited from LSRefType
void ref () const
 Increments the internal reference counter. More...
 
void unref () const
 Decrements the internal reference counter. More...
 

Detailed Description

The view interface which provides functionality specific to 3D views.

Version
SCENE API Version 2.0.0.

Member Function Documentation

◆ updateView()

void updateView ( )

Triggers an update of the view (Redraws the whole scene)

Version
SCENE API Version 2.0.0.

◆ addRenderable()

void addRenderable ( ref_ptr< LSRenderable3D renderable)

Adds a renderable to the scene of this view.

Parameters
renderableThe renderable to be added.
Version
SCENE API Version 2.0.0.

◆ removeRenderable()

void removeRenderable ( ref_ptr< LSRenderable3D renderable)

Removes a renderable from the scene of this view.

Parameters
renderableThe renderable to be removed.
Version
SCENE API Version 2.0.0.

◆ renderToImageFile()

LSResult::Result renderToImageFile ( LSString  filePath,
bool  waitForPointLoader 
)

Renders the contents of the view to an image file.

Parameters
filePathThe path to the image file to be created. The image format is chosen based on the file extension. Currently, the following formats are supported:
  • Windows Bitmaps (*.bmp)
  • JPEG Files (*.jpg)
  • Portable Network Graphics (*.png)
waitForPointLoaderA flag which indicates whether the rendering should wait until all points for the current scene have been loaded.
Version
SCENE API Version 2.0.0.

◆ renderToImageBuffer()

LSResult::Result renderToImageBuffer ( unsigned char *  buffer,
bool  waitForPointLoader 
)

Renders the contents of the view to an image buffer.

Parameters
bufferThe image buffer to which the contents will be rendered. The buffer has to be a pre-allocated array with a size of 4*viewSizeX*viewSizeY. The pixels of the image are stored as RGBA and row after row.
waitForPointLoaderA flag which indicates whether the rendering should wait until all points for the current scene have been loaded.
Version
SCENE API Version 2.0.0.

◆ getRenderStatistics()

LSRenderStatistics getRenderStatistics ( ) const

Gets the render statistics for the last rendered frame.

Version
SCENE API Version 2.0.0.

◆ setObjectVisibility()

void setObjectVisibility ( LSObject object,
bool  visible 
)

Set the visibility of an object.

Parameters
objectThe object of that the visibility will be changed.
visibleIf true, change the visibility of the object to visible. Otherwise the visibility will set to invisible.
Version
SCENE API Version 2.0.0.

◆ isObjectVisible()

bool isObjectVisible ( LSObject object) const

Get the visibility state of an object.

Parameters
objectThe object of that we want to know the visibility state.
Returns
True, when the object is visible. Otherwise false.
Version
SCENE API Version 2.0.0.

◆ getCamera()

ref_ptr<LSCamera> getCamera ( )

Get the camera of the view.

Returns
The camera of the view if the camera could be retrieved, 0 otherwise.
Version
SCENE API Version 2.0.0.

◆ pickScanPoint()

Eigen::Vector3d pickScanPoint ( const Eigen::Vector2ui &  viewPoint)

Pick a scan point from the current view.

Note: The point position is given in global coordinates.

Parameters
viewPointThe view point at which to pick.
Returns
The point coordinates if a point could be picked, a default Eigen::Vector3d value otherwise.
Version
SCENE API Version 2.0.0.

◆ getViewSettings()

ref_ptr<LSView3dSettings> getViewSettings ( ) const

Gets the view settings associated with this view.

Returns
The view settings if everything went okay, nullptr otherwise.
Version
SCENE API Version 2.0.25.

◆ setViewSettings()

LSResult::Result setViewSettings ( ref_ptr< LSView3dSettings settings)

Sets the view settings associated with this view.

Returns
LSResult::Result::Ok if the operation succeeded.
Version
SCENE API Version 2.0.25.