iridescence
Loading...
Searching...
No Matches
guik::AsyncLightViewerContext Class Reference

Async interface to manipulate LightViewerContext. All OpenGL operations will be called in the viewer thread through invoke method. Note that async operations come at a cost of data copy. More...

#include <async_light_viewer_context.hpp>

Inheritance diagram for guik::AsyncLightViewerContext:
Collaboration diagram for guik::AsyncLightViewerContext:

Public Member Functions

 AsyncLightViewerContext ()
 AsyncLightViewerContext (LightViewerContext *context)
 ~AsyncLightViewerContext ()
void clear ()
 Clear everything in the viewer (callbacks, filters, drawables, texts).
void clear_text ()
 Clear texts.
void append_text (const std::string &text)
 Append debug text to the viewer. This method is thread-safe.
void register_ui_callback (const std::string &name, const std::function< void()> &callback=0)
 Register a UI callback function.
void remove_ui_callback (const std::string &name)
 Remove a UI callback function.
void disable_xy_grid ()
 Disable XY grid drawing.
void enable_xy_grid ()
 Enable XY grid drawing.
void set_draw_xy_grid (bool draw_xy_grid)
 Set enable/disable XY grid drawing.
void set_colormap (glk::COLORMAP colormap)
 Set colormap used for RAINBOW and VERTEX_COLORMAP modes.
void enable_partial_rendering (double clear_thresh=1e-6)
 Enable partial rendering.
void disable_partial_rendering ()
 Disable partial rendering.
void enable_backface_culling ()
 Enable backface culling. Fragments with back-facing normals will not be rendered.
void disable_backface_culling ()
 Disable backface culling.
void set_backface_culling_range (const Eigen::Vector2f &range)
 Set range of normal.z for backface culling.
void set_point_shape (float point_size=1.0f, bool metric=true, bool circle=true)
 Set point shape properties.
void clear_drawables ()
 Clear all drawables.
void clear_drawables (const std::function< bool(const std::string &)> &fn)
 Clear drawables that satisfy the given condition.
void remove_drawable (const std::string &name)
 Remove a drawable by name.
void remove_drawable (const std::regex &regex)
 Remove all drawables that match the given regex.
void save_camera_settings (const std::string &path)
 Save camera settings to a file.
void load_camera_settings (const std::string &path)
 Load camera settings from a file.
void save_color_buffer (const std::string &filename)
 Save color buffer to an image file (PNG).
void save_depth_buffer (const std::string &filename, bool real_scale=true)
 Save depth buffer to a file (PNG).
void reset_center ()
 Reset camera center to the center of the screen.
void lookat (const Eigen::Vector3f &pt)
 Make the camera look at a point.
template<typename Vector>
void lookat (const Vector &pt)
 Make the camera look at a point.
void lookat (const Eigen::Isometry3f &T_world_sensor)
 Make the camera look at a transform.
void lookat (const Eigen::Isometry3d &T_world_sensor)
 Make the camera look at a transform.
void use_orbit_camera_control (double distance=80.0, double theta=0.0, double phi=-60.0f *M_PI/180.0f)
 Use orbit camera control (XY plane) useful for systems in which XYZ = front-left-up like LiDAR odometry.
void use_orbit_camera_control_xz (double distance=80.0, double theta=0.0, double phi=0.0)
 Use orbit camera control (XZ plane) useful for systems in which XYZ = right-down-forward like visual odometry.
void use_topdown_camera_control (double distance=80.0, double theta=0.0)
 Use top-down camera control useful for 2D SLAM.
void use_arcball_camera_control (double distance=80.0, double theta=0.0, double phi=-60.0f *M_PI/180.0f)
 Use arcball camera control.
void use_fps_camera_control (double fovy_deg=60.0)
 Use FPS game-like camera control.
void use_sensor_view_camera_control (const Eigen::Isometry3f &T_sensor_camera=Eigen::Translation3f(-5.0f, 0.0f, 0.1f) *Eigen::Isometry3f::Identity(), double smoothing_factor_trans=0.75, double smoothing_factor_rot=0.9)
 Use TPS-like sensor-view camera control .
void use_perspective_projection_control (float fovy_deg=30.0f, float near_=1.0f, float far_=1000.0f)
 Use perspective projection control.
void use_orthographic_projection_control (float width=10.0f, float near_=1.0f, float far_=1000.0f)
 Use orthographic projection control.
void update_drawable_setting (const std::string &name, const ShaderSetting &shader_setting)
 Update a drawable's shader setting.
void update_points (const std::string &name, const float *data, int stride, int num_points, const ShaderSetting &shader_setting)
 Register or update a point cloud buffer.
template<typename Scalar, int Dim>
void update_points (const std::string &name, const Eigen::Matrix< Scalar, Dim, 1 > *points, int num_points, const ShaderSetting &shader_setting)
 Register or update a point cloud buffer.
template<typename Scalar, int Dim, typename Allocator>
void update_points (const std::string &name, const std::vector< Eigen::Matrix< Scalar, Dim, 1 >, Allocator > &points, const ShaderSetting &shader_setting)
 Register or update a point cloud buffer.
void update_points (const std::string &name, const float *vertices, int vertex_stride, const float *colors, int color_stride, int num_points, const ShaderSetting &shader_setting)
 Register or update a point cloud buffer with colors.
template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void update_points (const std::string &name, const Eigen::Matrix< ScalarV, DimV, 1 > *points, const Eigen::Matrix< ScalarC, DimC, 1 > *colors, int num_points, const ShaderSetting &shader_setting)
 Register or update a point cloud buffer with colors.
template<typename ScalarV, int DimV, typename AllocatorV, typename ScalarC, int DimC, typename AllocatorC>
void update_points (const std::string &name, const std::vector< Eigen::Matrix< ScalarV, DimV, 1 >, AllocatorV > &points, const std::vector< Eigen::Matrix< ScalarC, DimC, 1 >, AllocatorC > &colors, const ShaderSetting &shader_setting)
 Register or update a point cloud buffer with colors.
template<typename Scalar, int Dim>
void update_normal_dists (const std::string &name, const Eigen::Matrix< Scalar, Dim, 1 > *points, const Eigen::Matrix< Scalar, Dim, Dim > *covs, int num_points, float sigma, const ShaderSetting &shader_setting)
 Register or update a normal distribution set.
template<typename Scalar, int Dim, typename Alloc1, typename Alloc2>
void update_normal_dists (const std::string &name, const std::vector< Eigen::Matrix< Scalar, Dim, 1 >, Alloc1 > &points, const std::vector< Eigen::Matrix< Scalar, Dim, Dim >, Alloc2 > &covs, float sigma, const ShaderSetting &shader_setting)
 Register or update a normal distribution set.
void update_thin_lines (const std::string &name, const float *vertices, const float *colors, int num_vertices, const unsigned int *indices, int num_indices, bool line_strip, float line_width, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
void update_thin_lines (const std::string &name, const float *vertices, const float *colors, int num_vertices, const unsigned int *indices, int num_indices, bool line_strip, const ShaderSetting &shader_setting)
template<typename Scalar, int Dim>
void update_thin_lines (const std::string &name, const Eigen::Matrix< Scalar, Dim, 1 > *points, int num_points, bool line_strip, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void update_thin_lines (const std::string &name, const Eigen::Matrix< ScalarV, DimV, 1 > *points, const Eigen::Matrix< ScalarC, DimC, 1 > *colors, int num_points, bool line_strip, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void update_thin_lines (const std::string &name, const Eigen::Matrix< ScalarV, DimV, 1 > *points, const Eigen::Matrix< ScalarC, DimC, 1 > *colors, int num_points, const unsigned int *indices, int num_indices, bool line_strip, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Point, typename Alloc>
void update_thin_lines (const std::string &name, const std::vector< Point, Alloc > &points, bool line_strip, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Point, typename Alloc>
void update_thin_lines (const std::string &name, const std::vector< Point, Alloc > &points, const std::vector< unsigned int > &indices, bool line_strip, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Point, typename AllocP, typename Color, typename AllocC>
void update_thin_lines (const std::string &name, const std::vector< Point, AllocP > &points, const std::vector< Color, AllocC > &colors, bool line_strip, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Point, typename AllocP, typename Color, typename AllocC>
void update_thin_lines (const std::string &name, const std::vector< Point, AllocP > &points, const std::vector< Color, AllocC > &colors, const std::vector< unsigned int > &indices, bool line_strip, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Scalar, int Dim>
void update_thin_lines (const std::string &name, const Eigen::Matrix< Scalar, Dim, 1 > *points, int num_points, bool line_strip, float line_width, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void update_thin_lines (const std::string &name, const Eigen::Matrix< ScalarV, DimV, 1 > *points, const Eigen::Matrix< ScalarC, DimC, 1 > *colors, int num_points, bool line_strip, float line_width, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void update_thin_lines (const std::string &name, const Eigen::Matrix< ScalarV, DimV, 1 > *points, const Eigen::Matrix< ScalarC, DimC, 1 > *colors, int num_points, const unsigned int *indices, int num_indices, bool line_strip, float line_width, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Point, typename Alloc>
void update_thin_lines (const std::string &name, const std::vector< Point, Alloc > &points, bool line_strip, float line_width, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Point, typename Alloc>
void update_thin_lines (const std::string &name, const std::vector< Point, Alloc > &points, const std::vector< unsigned int > &indices, bool line_strip, float line_width, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Point, typename AllocP, typename Color, typename AllocC>
void update_thin_lines (const std::string &name, const std::vector< Point, AllocP > &points, const std::vector< Color, AllocC > &colors, bool line_strip, float line_width, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
template<typename Point, typename AllocP, typename Color, typename AllocC>
void update_thin_lines (const std::string &name, const std::vector< Point, AllocP > &points, const std::vector< Color, AllocC > &colors, const std::vector< unsigned int > &indices, bool line_strip, float line_width, const ShaderSetting &shader_setting)
 Register or update a thin lines drawable.
void update_icosahedron (const std::string &name, const ShaderSetting &shader_setting)
 Register or update an icosahedron primitive.
void update_sphere (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a sphere primitive.
void update_cube (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a cube primitive.
void update_cone (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a cone primitive.
void update_frustum (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a frustum primitive.
void update_coord (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a coordinate axes primitive.
void update_wire_icosahedron (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a wireframe icosahedron primitive.
void update_wire_sphere (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a wireframe sphere primitive.
void update_wire_cube (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a wireframe cube primitive.
void update_wire_cone (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a wireframe cone primitive.
void update_wire_frustum (const std::string &name, const ShaderSetting &shader_setting)
 Register or update a wireframe frustum primitive.

Protected Attributes

LightViewerContext * context

Detailed Description

Async interface to manipulate LightViewerContext. All OpenGL operations will be called in the viewer thread through invoke method. Note that async operations come at a cost of data copy.

Constructor & Destructor Documentation

◆ AsyncLightViewerContext() [1/2]

guik::AsyncLightViewerContext::AsyncLightViewerContext ( )

◆ AsyncLightViewerContext() [2/2]

guik::AsyncLightViewerContext::AsyncLightViewerContext ( LightViewerContext * context)

◆ ~AsyncLightViewerContext()

guik::AsyncLightViewerContext::~AsyncLightViewerContext ( )

Member Function Documentation

◆ append_text()

void guik::AsyncLightViewerContext::append_text ( const std::string & text)

Append debug text to the viewer. This method is thread-safe.

◆ clear()

void guik::AsyncLightViewerContext::clear ( )

Clear everything in the viewer (callbacks, filters, drawables, texts).

◆ clear_drawables() [1/2]

void guik::AsyncLightViewerContext::clear_drawables ( )

Clear all drawables.

◆ clear_drawables() [2/2]

void guik::AsyncLightViewerContext::clear_drawables ( const std::function< bool(const std::string &)> & fn)

Clear drawables that satisfy the given condition.

Parameters
fnCondition function

◆ clear_text()

void guik::AsyncLightViewerContext::clear_text ( )

Clear texts.

◆ disable_backface_culling()

void guik::AsyncLightViewerContext::disable_backface_culling ( )

Disable backface culling.

◆ disable_partial_rendering()

void guik::AsyncLightViewerContext::disable_partial_rendering ( )

Disable partial rendering.

◆ disable_xy_grid()

void guik::AsyncLightViewerContext::disable_xy_grid ( )
inline

Disable XY grid drawing.

◆ enable_backface_culling()

void guik::AsyncLightViewerContext::enable_backface_culling ( )

Enable backface culling. Fragments with back-facing normals will not be rendered.

◆ enable_partial_rendering()

void guik::AsyncLightViewerContext::enable_partial_rendering ( double clear_thresh = 1e-6)

Enable partial rendering.

Parameters
clear_threshThreshold for clearing the partial rendering buffer.

◆ enable_xy_grid()

void guik::AsyncLightViewerContext::enable_xy_grid ( )
inline

Enable XY grid drawing.

◆ load_camera_settings()

void guik::AsyncLightViewerContext::load_camera_settings ( const std::string & path)

Load camera settings from a file.

◆ lookat() [1/4]

void guik::AsyncLightViewerContext::lookat ( const Eigen::Isometry3d & T_world_sensor)

Make the camera look at a transform.

◆ lookat() [2/4]

void guik::AsyncLightViewerContext::lookat ( const Eigen::Isometry3f & T_world_sensor)

Make the camera look at a transform.

◆ lookat() [3/4]

void guik::AsyncLightViewerContext::lookat ( const Eigen::Vector3f & pt)

Make the camera look at a point.

◆ lookat() [4/4]

template<typename Vector>
void guik::AsyncLightViewerContext::lookat ( const Vector & pt)
inline

Make the camera look at a point.

◆ register_ui_callback()

void guik::AsyncLightViewerContext::register_ui_callback ( const std::string & name,
const std::function< void()> & callback = 0 )

Register a UI callback function.

Parameters
nameCallback name
callbackCallback function. If null, the callback with the given name is removed.

◆ remove_drawable() [1/2]

void guik::AsyncLightViewerContext::remove_drawable ( const std::regex & regex)

Remove all drawables that match the given regex.

◆ remove_drawable() [2/2]

void guik::AsyncLightViewerContext::remove_drawable ( const std::string & name)

Remove a drawable by name.

◆ remove_ui_callback()

void guik::AsyncLightViewerContext::remove_ui_callback ( const std::string & name)

Remove a UI callback function.

Parameters
nameCallback name

◆ reset_center()

void guik::AsyncLightViewerContext::reset_center ( )

Reset camera center to the center of the screen.

◆ save_camera_settings()

void guik::AsyncLightViewerContext::save_camera_settings ( const std::string & path)

Save camera settings to a file.

◆ save_color_buffer()

void guik::AsyncLightViewerContext::save_color_buffer ( const std::string & filename)

Save color buffer to an image file (PNG).

◆ save_depth_buffer()

void guik::AsyncLightViewerContext::save_depth_buffer ( const std::string & filename,
bool real_scale = true )

Save depth buffer to a file (PNG).

◆ set_backface_culling_range()

void guik::AsyncLightViewerContext::set_backface_culling_range ( const Eigen::Vector2f & range)

Set range of normal.z for backface culling.

◆ set_colormap()

void guik::AsyncLightViewerContext::set_colormap ( glk::COLORMAP colormap)

Set colormap used for RAINBOW and VERTEX_COLORMAP modes.

◆ set_draw_xy_grid()

void guik::AsyncLightViewerContext::set_draw_xy_grid ( bool draw_xy_grid)

Set enable/disable XY grid drawing.

◆ set_point_shape()

void guik::AsyncLightViewerContext::set_point_shape ( float point_size = 1.0f,
bool metric = true,
bool circle = true )

Set point shape properties.

Parameters
point_sizePoint size
metricIf true, point size is in the metric unit [m], otherwise in pixel unit.
circleIf true, points are rendered as circles, otherwise as squares.

◆ update_cone()

void guik::AsyncLightViewerContext::update_cone ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a cone primitive.

◆ update_coord()

void guik::AsyncLightViewerContext::update_coord ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a coordinate axes primitive.

◆ update_cube()

void guik::AsyncLightViewerContext::update_cube ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a cube primitive.

◆ update_drawable_setting()

void guik::AsyncLightViewerContext::update_drawable_setting ( const std::string & name,
const ShaderSetting & shader_setting )

Update a drawable's shader setting.

◆ update_frustum()

void guik::AsyncLightViewerContext::update_frustum ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a frustum primitive.

◆ update_icosahedron()

void guik::AsyncLightViewerContext::update_icosahedron ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update an icosahedron primitive.

◆ update_normal_dists() [1/2]

template<typename Scalar, int Dim>
void guik::AsyncLightViewerContext::update_normal_dists ( const std::string & name,
const Eigen::Matrix< Scalar, Dim, 1 > * points,
const Eigen::Matrix< Scalar, Dim, Dim > * covs,
int num_points,
float sigma,
const ShaderSetting & shader_setting )

Register or update a normal distribution set.

Parameters
nameDrawable name
pointsPoint mean array
covsPoint covariance array
num_pointsNumber of points
sigmaSize of the ellipsoids in standard deviations (e.g., 3.0 renders 3-sigma ellipsoids)
shader_settingShader setting

◆ update_normal_dists() [2/2]

template<typename Scalar, int Dim, typename Alloc1, typename Alloc2>
void guik::AsyncLightViewerContext::update_normal_dists ( const std::string & name,
const std::vector< Eigen::Matrix< Scalar, Dim, 1 >, Alloc1 > & points,
const std::vector< Eigen::Matrix< Scalar, Dim, Dim >, Alloc2 > & covs,
float sigma,
const ShaderSetting & shader_setting )

Register or update a normal distribution set.

◆ update_points() [1/6]

template<typename Scalar, int Dim>
void guik::AsyncLightViewerContext::update_points ( const std::string & name,
const Eigen::Matrix< Scalar, Dim, 1 > * points,
int num_points,
const ShaderSetting & shader_setting )

Register or update a point cloud buffer.

◆ update_points() [2/6]

template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void guik::AsyncLightViewerContext::update_points ( const std::string & name,
const Eigen::Matrix< ScalarV, DimV, 1 > * points,
const Eigen::Matrix< ScalarC, DimC, 1 > * colors,
int num_points,
const ShaderSetting & shader_setting )

Register or update a point cloud buffer with colors.

◆ update_points() [3/6]

void guik::AsyncLightViewerContext::update_points ( const std::string & name,
const float * data,
int stride,
int num_points,
const ShaderSetting & shader_setting )

Register or update a point cloud buffer.

Parameters
nameDrawable name
dataPointer to point data (float array)
strideStride (in bytes) between points
num_pointsNumber of points
shader_settingShader setting

◆ update_points() [4/6]

void guik::AsyncLightViewerContext::update_points ( const std::string & name,
const float * vertices,
int vertex_stride,
const float * colors,
int color_stride,
int num_points,
const ShaderSetting & shader_setting )

Register or update a point cloud buffer with colors.

◆ update_points() [5/6]

template<typename Scalar, int Dim, typename Allocator>
void guik::AsyncLightViewerContext::update_points ( const std::string & name,
const std::vector< Eigen::Matrix< Scalar, Dim, 1 >, Allocator > & points,
const ShaderSetting & shader_setting )

Register or update a point cloud buffer.

◆ update_points() [6/6]

template<typename ScalarV, int DimV, typename AllocatorV, typename ScalarC, int DimC, typename AllocatorC>
void guik::AsyncLightViewerContext::update_points ( const std::string & name,
const std::vector< Eigen::Matrix< ScalarV, DimV, 1 >, AllocatorV > & points,
const std::vector< Eigen::Matrix< ScalarC, DimC, 1 >, AllocatorC > & colors,
const ShaderSetting & shader_setting )

Register or update a point cloud buffer with colors.

◆ update_sphere()

void guik::AsyncLightViewerContext::update_sphere ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a sphere primitive.

◆ update_thin_lines() [1/16]

template<typename Scalar, int Dim>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const Eigen::Matrix< Scalar, Dim, 1 > * points,
int num_points,
bool line_strip,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [2/16]

template<typename Scalar, int Dim>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const Eigen::Matrix< Scalar, Dim, 1 > * points,
int num_points,
bool line_strip,
float line_width,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [3/16]

template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const Eigen::Matrix< ScalarV, DimV, 1 > * points,
const Eigen::Matrix< ScalarC, DimC, 1 > * colors,
int num_points,
bool line_strip,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [4/16]

template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const Eigen::Matrix< ScalarV, DimV, 1 > * points,
const Eigen::Matrix< ScalarC, DimC, 1 > * colors,
int num_points,
bool line_strip,
float line_width,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [5/16]

template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const Eigen::Matrix< ScalarV, DimV, 1 > * points,
const Eigen::Matrix< ScalarC, DimC, 1 > * colors,
int num_points,
const unsigned int * indices,
int num_indices,
bool line_strip,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [6/16]

template<typename ScalarV, int DimV, typename ScalarC, int DimC>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const Eigen::Matrix< ScalarV, DimV, 1 > * points,
const Eigen::Matrix< ScalarC, DimC, 1 > * colors,
int num_points,
const unsigned int * indices,
int num_indices,
bool line_strip,
float line_width,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [7/16]

void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const float * vertices,
const float * colors,
int num_vertices,
const unsigned int * indices,
int num_indices,
bool line_strip,
const ShaderSetting & shader_setting )

◆ update_thin_lines() [8/16]

void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const float * vertices,
const float * colors,
int num_vertices,
const unsigned int * indices,
int num_indices,
bool line_strip,
float line_width,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

Parameters
nameDrawable name
verticesPointer to vertex data (array of float3)
colorsPointer to color data (array of float4). If null, no vertex colors are assigned.
num_verticesNumber of vertices
indicesPointer to index data (array of unsigned int). If null, non-indexed drawing is used.
num_indicesNumber of indices
line_stripIf true, line strip mode is used. Otherwise, line list mode is used.
line_widthWidth of the lines in pixels.
shader_settingShader setting

◆ update_thin_lines() [9/16]

template<typename Point, typename Alloc>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const std::vector< Point, Alloc > & points,
bool line_strip,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [10/16]

template<typename Point, typename Alloc>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const std::vector< Point, Alloc > & points,
bool line_strip,
float line_width,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [11/16]

template<typename Point, typename Alloc>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const std::vector< Point, Alloc > & points,
const std::vector< unsigned int > & indices,
bool line_strip,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [12/16]

template<typename Point, typename Alloc>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const std::vector< Point, Alloc > & points,
const std::vector< unsigned int > & indices,
bool line_strip,
float line_width,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [13/16]

template<typename Point, typename AllocP, typename Color, typename AllocC>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const std::vector< Point, AllocP > & points,
const std::vector< Color, AllocC > & colors,
bool line_strip,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [14/16]

template<typename Point, typename AllocP, typename Color, typename AllocC>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const std::vector< Point, AllocP > & points,
const std::vector< Color, AllocC > & colors,
bool line_strip,
float line_width,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [15/16]

template<typename Point, typename AllocP, typename Color, typename AllocC>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const std::vector< Point, AllocP > & points,
const std::vector< Color, AllocC > & colors,
const std::vector< unsigned int > & indices,
bool line_strip,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_thin_lines() [16/16]

template<typename Point, typename AllocP, typename Color, typename AllocC>
void guik::AsyncLightViewerContext::update_thin_lines ( const std::string & name,
const std::vector< Point, AllocP > & points,
const std::vector< Color, AllocC > & colors,
const std::vector< unsigned int > & indices,
bool line_strip,
float line_width,
const ShaderSetting & shader_setting )

Register or update a thin lines drawable.

◆ update_wire_cone()

void guik::AsyncLightViewerContext::update_wire_cone ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a wireframe cone primitive.

◆ update_wire_cube()

void guik::AsyncLightViewerContext::update_wire_cube ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a wireframe cube primitive.

◆ update_wire_frustum()

void guik::AsyncLightViewerContext::update_wire_frustum ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a wireframe frustum primitive.

◆ update_wire_icosahedron()

void guik::AsyncLightViewerContext::update_wire_icosahedron ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a wireframe icosahedron primitive.

◆ update_wire_sphere()

void guik::AsyncLightViewerContext::update_wire_sphere ( const std::string & name,
const ShaderSetting & shader_setting )

Register or update a wireframe sphere primitive.

◆ use_arcball_camera_control()

void guik::AsyncLightViewerContext::use_arcball_camera_control ( double distance = 80.0,
double theta = 0.0,
double phi = -60.0f *M_PI/180.0f )

Use arcball camera control.

◆ use_fps_camera_control()

void guik::AsyncLightViewerContext::use_fps_camera_control ( double fovy_deg = 60.0)

Use FPS game-like camera control.

◆ use_orbit_camera_control()

void guik::AsyncLightViewerContext::use_orbit_camera_control ( double distance = 80.0,
double theta = 0.0,
double phi = -60.0f *M_PI/180.0f )

Use orbit camera control (XY plane) useful for systems in which XYZ = front-left-up like LiDAR odometry.

◆ use_orbit_camera_control_xz()

void guik::AsyncLightViewerContext::use_orbit_camera_control_xz ( double distance = 80.0,
double theta = 0.0,
double phi = 0.0 )

Use orbit camera control (XZ plane) useful for systems in which XYZ = right-down-forward like visual odometry.

◆ use_orthographic_projection_control()

void guik::AsyncLightViewerContext::use_orthographic_projection_control ( float width = 10.0f,
float near_ = 1.0f,
float far_ = 1000.0f )

Use orthographic projection control.

◆ use_perspective_projection_control()

void guik::AsyncLightViewerContext::use_perspective_projection_control ( float fovy_deg = 30.0f,
float near_ = 1.0f,
float far_ = 1000.0f )

Use perspective projection control.

◆ use_sensor_view_camera_control()

void guik::AsyncLightViewerContext::use_sensor_view_camera_control ( const Eigen::Isometry3f & T_sensor_camera = Eigen::Translation3f(-5.0f, 0.0f, 0.1f) *Eigen::Isometry3f::Identity(),
double smoothing_factor_trans = 0.75,
double smoothing_factor_rot = 0.9 )

Use TPS-like sensor-view camera control .

Parameters
T_sensor_cameraInitial transform from sensor frame to camera frame.
smoothing_factor_transSmoothing factor for translation in [0, 1]. 0 = no smoothing (instant snap), 1 = maximum smoothing (very slow follow).
smoothing_factor_rotSmoothing factor for rotation in [0, 1]. 0 = no smoothing (instant snap), 1 = maximum smoothing (very slow follow).

◆ use_topdown_camera_control()

void guik::AsyncLightViewerContext::use_topdown_camera_control ( double distance = 80.0,
double theta = 0.0 )

Use top-down camera control useful for 2D SLAM.

Member Data Documentation

◆ context

LightViewerContext* guik::AsyncLightViewerContext::context
protected

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