![]() |
SCENE C++ API
2.0.31
|
The view interface which provides functionality specific to 3D views. More...
#include <lsview3d.h>
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< LSCamera > | getCamera () |
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< LSView3dSettings > | getViewSettings () 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... | |
![]() | |
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< LSObject > | getVisualizedObject () 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 | |
![]() | |
enum | ViewType { VIEW_3D = 0, CORRESPONDENCE_VIEW = 1, QUICK_VIEW = 3, PLANAR_VIEW = 4 } |
The list of supported view types. More... | |
![]() | |
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... | |
![]() | |
void | ref () const |
Increments the internal reference counter. More... | |
void | unref () const |
Decrements the internal reference counter. More... | |
The view interface which provides functionality specific to 3D views.
void updateView | ( | ) |
Triggers an update of the view (Redraws the whole scene)
void addRenderable | ( | ref_ptr< LSRenderable3D > | renderable | ) |
Adds a renderable to the scene of this view.
renderable | The renderable to be added. |
void removeRenderable | ( | ref_ptr< LSRenderable3D > | renderable | ) |
Removes a renderable from the scene of this view.
renderable | The renderable to be removed. |
LSResult::Result renderToImageFile | ( | LSString | filePath, |
bool | waitForPointLoader | ||
) |
Renders the contents of the view to an image file.
filePath | The path to the image file to be created. The image format is chosen based on the file extension. Currently, the following formats are supported:
|
waitForPointLoader | A flag which indicates whether the rendering should wait until all points for the current scene have been loaded. |
LSResult::Result renderToImageBuffer | ( | unsigned char * | buffer, |
bool | waitForPointLoader | ||
) |
Renders the contents of the view to an image buffer.
buffer | The 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. |
waitForPointLoader | A flag which indicates whether the rendering should wait until all points for the current scene have been loaded. |
LSRenderStatistics getRenderStatistics | ( | ) | const |
Gets the render statistics for the last rendered frame.
void setObjectVisibility | ( | LSObject & | object, |
bool | visible | ||
) |
Set the visibility of an object.
object | The object of that the visibility will be changed. |
visible | If true, change the visibility of the object to visible. Otherwise the visibility will set to invisible. |
bool isObjectVisible | ( | LSObject & | object | ) | const |
Get the visibility state of an object.
object | The object of that we want to know the visibility state. |
Get the camera of the view.
Eigen::Vector3d pickScanPoint | ( | const Eigen::Vector2ui & | viewPoint | ) |
Pick a scan point from the current view.
Note: The point position is given in global coordinates.
viewPoint | The view point at which to pick. |
ref_ptr<LSView3dSettings> getViewSettings | ( | ) | const |
Gets the view settings associated with this view.
LSResult::Result setViewSettings | ( | ref_ptr< LSView3dSettings > | settings | ) |
Sets the view settings associated with this view.