Solar
Public Member Functions | Static Protected Attributes | List of all members
SolAR::MODULES::OPENGL::SolAR3DPointsViewerOpengl Class Reference

Displays in a window a set of 3D points as well as the current camera and its previous path (based on an OpenGL implementation). UUID: afd38ea0-9a46-11e8-9eb6-529269fb1459 More...

#include <SolAR3DPointsViewerOpengl.h>

Inheritance diagram for SolAR::MODULES::OPENGL::SolAR3DPointsViewerOpengl:
Inheritance graph
[legend]
Collaboration diagram for SolAR::MODULES::OPENGL::SolAR3DPointsViewerOpengl:
Collaboration graph
[legend]

Public Member Functions

org::bcom::xpcf::XPCFErrorCode onConfigured () override final
 
void unloadComponent () override final
 
FrameworkReturnCode display (const std::vector< SRef< datastructure::CloudPoint > > &points, const datastructure::Transform3Df &pose, const std::vector< datastructure::Transform3Df > &keyframePoses={}, const std::vector< datastructure::Transform3Df > &framePoses={}, const std::vector< SRef< datastructure::CloudPoint > > &points2={}, const std::vector< datastructure::Transform3Df > &keyframePoses2={}) override
 Display in a windows the 3D point cloud as well as the current camera, and optionnally, the previous frames and keyframes. More...
 
FrameworkReturnCode display (const SRef< datastructure::PointCloud > points, const datastructure::Transform3Df &pose, const std::vector< datastructure::Transform3Df > &keyframePoses={}, const std::vector< datastructure::Transform3Df > &framePoses={}, const SRef< datastructure::PointCloud > points2=nullptr, const std::vector< datastructure::Transform3Df > &keyframePoses2={}) override
 Display in a windows the 3D point cloud as well as the current camera, and optionnally, the previous frames and keyframes. More...
 

Static Protected Attributes

static SolAR3DPointsViewerOpenglm_instance
 

Detailed Description

Displays in a window a set of 3D points as well as the current camera and its previous path (based on an OpenGL implementation). UUID: afd38ea0-9a46-11e8-9eb6-529269fb1459

This component display a set of 3D points and the current camera as well as previous frames and keyframes. The view point is automatically define to be focus on the center of the point cloud and to show both the 3D points as well as the current camera. The user can change this view point by left clicking and moving the mouse to turn around the point cloud or by right clicking and moving the mouse to move in translation. Configuration parameters allow user to visualize the axis of the coordinate systems of the world, the center of the point cloud, and the camera. The color of points can be fixed, or can be the one assigned to each point. The scale of the points, camera and coordinate systems axis can be defined by the usr thanks to configuration parameters.

Properties
title the title of the window on which the image will be displayed
type: string; default: ""
width the width of the window on which the image will be displayed (if <=0, the width of the input image)
type: int; range : [0..MAX INT]; default: 0
height the height of the window on which the image will be displayed (if <=0, the height of the input image)
type: int; range : [0..MAX INT]; default: 0
backgroundColor background color
size: 3, elem type: uint; range : [0..255]; default: { 255, 255, 255 } @SolARComponentProperty{ fixedPointsColor, if 0, the color of each point is used\, else the color defined in parameter by user is used, @SolARComponentPropertyDescNum{ uint, [0,1], 1 }}
pointsColor points color
size: 3, elem type: uint; range : [0..255]; default: { 0, 255, 0 }
points2Color points color for the second cloud
size: 3, elem type: uint; range : [0..255]; default: { 255, 0, 0 }
cameraColor camera color
size: 3, elem type: uint; range : [0..255]; default: { 0, 0, 255 }
keyframeAsCamera if not 0, each keyframe pose is drawn as a camera, else as a point
type: uint; range : [0,1]; default: 0
framesColor frame color
size: 3, elem type: uint; range : [0..255]; default: { 180, 180, 180 }
keyframesColor keyframe color
size: 3, elem type: uint; range : [0..255]; default: { 0, 255, 0 }
keyframes2Color keyframe color for the second vector of keyframe
size: 3, elem type: uint; range : [0..255]; default: { 255, 0, 0 }
drawCameraAxis if not 0, a gizmo showing the coordinate system of the camera is displayed
type: uint; range : [0,1]; default: 1
drawSceneAxis if not 0, a gizmo showing the coordinate system axis of the scene reference is displayed
type: uint; range : [0,1]; default: 1
drawWorldAxis if not 0, a gizmo showing the coordinate system axis of the world reference is displayed
type: uint; range : [0,1]; default: 1
axisScale define the scale of the gizmo displaying the coordinate system center on the scene
type: float; range : [0..MAX FLOAT]; default: 1.f
pointSize size of points
type: float; range : [0..MAX FLOAT]; default: 2.f
cameraScale camera scale
type: float; range : [0..MAX FLOAT]; default: 1.f
zoomSensitivity zoom sensitivity
type: float; range : [0..MAX FLOAT]; default: 10.f
exitKey the key code to press to close the window. If negative, no key is defined to close the window

type: int; range : [-1..MAX INT]; default: 27

Member Function Documentation

◆ display() [1/2]

FrameworkReturnCode SolAR::MODULES::OPENGL::SolAR3DPointsViewerOpengl::display ( const SRef< datastructure::PointCloud >  points,
const datastructure::Transform3Df &  pose,
const std::vector< datastructure::Transform3Df > &  keyframePoses = {},
const std::vector< datastructure::Transform3Df > &  framePoses = {},
const SRef< datastructure::PointCloud >  points2 = nullptr,
const std::vector< datastructure::Transform3Df > &  keyframePoses2 = {} 
)
override

Display in a windows the 3D point cloud as well as the current camera, and optionnally, the previous frames and keyframes.

Parameters
[in]points,Setof 3D points to display in the 3D viewer.
[in]pose,posesof the current camera (transform of the camera defined in world corrdinate system).
[in]keyframesPoses(optional), poses of a set of keyframes (transform of the camera defined in world corrdinate system).
[in]framePoses(optional), poses of a set of frames (transform of the camera defined in world corrdinate system).
[in]points2(optional), a second set of 3D points to display in the 3D viewer (useful to visualize result of a bundle adjustment).
[in]keyframesPoses2(optional), a second set of keyframes poses (transform of the camera defined in world corrdinate system, useful to visualize result of a bundle adjustment).
Returns
FrameworkReturnCode::SUCCESS if the window is created, else FrameworkReturnCode::_ERROR

◆ display() [2/2]

FrameworkReturnCode SolAR::MODULES::OPENGL::SolAR3DPointsViewerOpengl::display ( const std::vector< SRef< datastructure::CloudPoint > > &  points,
const datastructure::Transform3Df &  pose,
const std::vector< datastructure::Transform3Df > &  keyframePoses = {},
const std::vector< datastructure::Transform3Df > &  framePoses = {},
const std::vector< SRef< datastructure::CloudPoint > > &  points2 = {},
const std::vector< datastructure::Transform3Df > &  keyframePoses2 = {} 
)
override

Display in a windows the 3D point cloud as well as the current camera, and optionnally, the previous frames and keyframes.

Parameters
[in]points,Setof 3D points to display in the 3D viewer.
[in]pose,posesof the current camera (transform of the camera defined in world corrdinate system).
[in]keyframesPoses(optional), poses of a set of keyframes (transform of the camera defined in world corrdinate system).
[in]framePoses(optional), poses of a set of frames (transform of the camera defined in world corrdinate system).
[in]points2(optional), a second set of 3D points to display in the 3D viewer (useful to visualize result of a bundle adjustment).
[in]keyframesPoses2(optional), a second set of keyframes poses (transform of the camera defined in world corrdinate system, useful to visualize result of a bundle adjustment).
Returns
FrameworkReturnCode::SUCCESS if the window is created, else FrameworkReturnCode::_ERROR

The documentation for this class was generated from the following file: