gtsam_points
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
guik::AsyncLightViewerContext Class Reference

Async interface to manipulate LightViewerContext. All OpenGL operations will be done 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:
Inheritance graph
[legend]
Collaboration diagram for guik::AsyncLightViewerContext:
Collaboration graph
[legend]

Public Member Functions

 AsyncLightViewerContext ()
 
 AsyncLightViewerContext (LightViewerContext *context)
 
 ~AsyncLightViewerContext ()
 
void clear ()
 
void clear_text ()
 
void append_text (const std::string &text)
 
void register_ui_callback (const std::string &name, const std::function< void()> &callback=0)
 
void remove_ui_callback (const std::string &name)
 
void disable_xy_grid ()
 
void enable_xy_grid ()
 
void set_draw_xy_grid (bool draw_xy_grid)
 
void set_colormap (glk::COLORMAP colormap)
 
void set_point_shape (float point_size=1.0f, bool metric=true, bool circle=true)
 
void clear_drawables ()
 
void clear_drawables (const std::function< bool(const std::string &)> &fn)
 
void remove_drawable (const std::string &name)
 
void remove_drawable (const std::regex &regex)
 
void save_camera_settings (const std::string &path)
 
void load_camera_settings (const std::string &path)
 
void save_color_buffer (const std::string &filename)
 
void save_depth_buffer (const std::string &filename, bool real_scale=true)
 
void reset_center ()
 
void lookat (const Eigen::Vector3f &pt)
 
template<typename Vector >
void lookat (const Vector &pt)
 
void use_orbit_camera_control (double distance=80.0, double theta=0.0, double phi=-60.0f *M_PI/180.0f)
 
void use_orbit_camera_control_xz (double distance=80.0, double theta=0.0, double phi=0.0)
 
void use_topdown_camera_control (double distance=80.0, double theta=0.0)
 
void use_arcball_camera_control (double distance=80.0, double theta=0.0, double phi=-60.0f *M_PI/180.0f)
 
void use_fps_camera_control (double fovy_deg=60.0)
 
void update_drawable_setting (const std::string &name, const ShaderSetting &shader_setting)
 
void update_points (const std::string &name, const float *data, int stride, int num_points, const ShaderSetting &shader_setting)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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 scale, const ShaderSetting &shader_setting)
 
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 scale, const ShaderSetting &shader_setting)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
void update_icosahedron (const std::string &name, const ShaderSetting &shader_setting)
 
void update_sphere (const std::string &name, const ShaderSetting &shader_setting)
 
void update_cube (const std::string &name, const ShaderSetting &shader_setting)
 
void update_cone (const std::string &name, const ShaderSetting &shader_setting)
 
void update_frustum (const std::string &name, const ShaderSetting &shader_setting)
 
void update_coord (const std::string &name, const ShaderSetting &shader_setting)
 
void update_wire_icosahedron (const std::string &name, const ShaderSetting &shader_setting)
 
void update_wire_sphere (const std::string &name, const ShaderSetting &shader_setting)
 
void update_wire_cube (const std::string &name, const ShaderSetting &shader_setting)
 
void update_wire_cone (const std::string &name, const ShaderSetting &shader_setting)
 
void update_wire_frustum (const std::string &name, const ShaderSetting &shader_setting)
 

Protected Attributes

LightViewerContextcontext
 

Detailed Description

Async interface to manipulate LightViewerContext. All OpenGL operations will be done 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)

◆ clear()

void guik::AsyncLightViewerContext::clear ( )

◆ clear_drawables() [1/2]

void guik::AsyncLightViewerContext::clear_drawables ( )

◆ clear_drawables() [2/2]

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

◆ clear_text()

void guik::AsyncLightViewerContext::clear_text ( )

◆ disable_xy_grid()

void guik::AsyncLightViewerContext::disable_xy_grid ( )
inline

◆ enable_xy_grid()

void guik::AsyncLightViewerContext::enable_xy_grid ( )
inline

◆ load_camera_settings()

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

◆ lookat() [1/2]

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

◆ lookat() [2/2]

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

◆ register_ui_callback()

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

◆ remove_drawable() [1/2]

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

◆ remove_drawable() [2/2]

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

◆ remove_ui_callback()

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

◆ reset_center()

void guik::AsyncLightViewerContext::reset_center ( )

◆ save_camera_settings()

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

◆ save_color_buffer()

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

◆ save_depth_buffer()

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

◆ set_colormap()

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

◆ set_draw_xy_grid()

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

◆ set_point_shape()

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

◆ update_cone()

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

◆ update_coord()

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

◆ update_cube()

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

◆ update_drawable_setting()

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

◆ update_frustum()

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

◆ update_icosahedron()

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

◆ 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  scale,
const ShaderSetting shader_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  scale,
const ShaderSetting shader_setting 
)

◆ 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 
)

◆ 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 
)

◆ 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 
)

◆ 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 
)

◆ 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 
)

◆ 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 
)

◆ update_sphere()

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

◆ update_thin_lines() [1/8]

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 
)

◆ update_thin_lines() [2/8]

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 
)

◆ update_thin_lines() [3/8]

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 
)

◆ update_thin_lines() [4/8]

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() [5/8]

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 
)

◆ update_thin_lines() [6/8]

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 
)

◆ update_thin_lines() [7/8]

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 
)

◆ update_thin_lines() [8/8]

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 
)

◆ update_wire_cone()

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

◆ update_wire_cube()

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

◆ update_wire_frustum()

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

◆ update_wire_icosahedron()

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

◆ update_wire_sphere()

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

◆ 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_fps_camera_control()

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

◆ 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_xz()

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

◆ use_topdown_camera_control()

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

Member Data Documentation

◆ context

LightViewerContext* guik::AsyncLightViewerContext::context
protected

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