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

#include <gl_canvas.hpp>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW GLCanvas (const Eigen::Vector2i &size, const std::string &shader_name="rainbow", size_t num_color_buffers=1)
 
bool ready () const
 
bool load_shader (const std::string &shader_name)
 
void set_size (const Eigen::Vector2i &size)
 
void set_clear_color (const Eigen::Vector4f &color)
 
void set_colormap (glk::COLORMAP colormap_type)
 
void set_effect (const std::shared_ptr< glk::ScreenEffect > &effect)
 
const std::shared_ptr< glk::ScreenEffect > & get_effect () const
 
void set_bg_texture (const std::shared_ptr< glk::Texture > &bg_texture)
 
void set_blend_func (GLenum sfactor, GLenum dfactor)
 
void set_blend_depth_write (bool blend_depth_write)
 
void enable_normal_buffer ()
 
void enable_info_buffer ()
 
void enable_partial_rendering (double clear_thresh=1e-6)
 
void disable_partial_rendering ()
 
void clear_partial_rendering ()
 
bool normal_buffer_enabled () const
 
bool info_buffer_enabled () const
 
bool partial_rendering_enabled () const
 
const glk::Texturecolor_buffer () const
 
const glk::Texturedepth_buffer () const
 
const glk::Texturenormal_buffer () const
 
const glk::Textureinfo_buffer () const
 
const glk::Texturedynamic_flag_buffer () const
 
void mouse_control ()
 
void bind ()
 
void unbind ()
 
void bind_second ()
 
void unbind_second ()
 
void render_to_screen (int color_buffer_id=0)
 
Eigen::Vector4i pick_info (const Eigen::Vector2i &p, int window=2) const
 
float pick_depth (const Eigen::Vector2i &p, int window=2) const
 
Eigen::Vector3f unproject (const Eigen::Vector2i &p, float depth) const
 
void draw_ui ()
 

Public Attributes

Eigen::Vector2i size
 
Eigen::Vector4f clear_color
 
GLenum alpha_blend_sfactor
 
GLenum alpha_blend_dfactor
 
bool blend_depth_write
 
int normal_buffer_id
 
int info_buffer_id
 
int dynamic_flag_buffer_id
 
bool is_partial_rendering_enabled
 
bool clear_partial_rendering_flag
 
double partial_rendering_clear_thresh
 
Eigen::Matrix4f last_projection_view_matrix
 
double keyboard_control_speed
 
std::unique_ptr< glk::GLSLShadershader
 
std::unique_ptr< glk::GLSLShadertexture_shader
 
std::unique_ptr< glk::GLSLShaderpartial_clear_shader
 
std::unique_ptr< glk::FrameBufferframe_buffer
 
std::unique_ptr< glk::FrameBufferscreen_effect_buffer
 
std::shared_ptr< glk::ScreenEffectscreen_effect
 
std::unique_ptr< glk::TextureRenderertexture_renderer
 
std::shared_ptr< glk::Texturebg_texture
 
std::unique_ptr< glk::Texturecolormap
 
std::shared_ptr< guik::CameraControlcamera_control
 
std::shared_ptr< guik::ProjectionControlprojection_control
 

Constructor & Destructor Documentation

◆ GLCanvas()

EIGEN_MAKE_ALIGNED_OPERATOR_NEW guik::GLCanvas::GLCanvas ( const Eigen::Vector2i &  size,
const std::string &  shader_name = "rainbow",
size_t  num_color_buffers = 1 
)

Member Function Documentation

◆ bind()

void guik::GLCanvas::bind ( )

◆ bind_second()

void guik::GLCanvas::bind_second ( )

◆ clear_partial_rendering()

void guik::GLCanvas::clear_partial_rendering ( )

◆ color_buffer()

const glk::Texture & guik::GLCanvas::color_buffer ( ) const

◆ depth_buffer()

const glk::Texture & guik::GLCanvas::depth_buffer ( ) const

◆ disable_partial_rendering()

void guik::GLCanvas::disable_partial_rendering ( )

◆ draw_ui()

void guik::GLCanvas::draw_ui ( )

◆ dynamic_flag_buffer()

const glk::Texture & guik::GLCanvas::dynamic_flag_buffer ( ) const

◆ enable_info_buffer()

void guik::GLCanvas::enable_info_buffer ( )

◆ enable_normal_buffer()

void guik::GLCanvas::enable_normal_buffer ( )

◆ enable_partial_rendering()

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

◆ get_effect()

const std::shared_ptr< glk::ScreenEffect > & guik::GLCanvas::get_effect ( ) const

◆ info_buffer()

const glk::Texture & guik::GLCanvas::info_buffer ( ) const

◆ info_buffer_enabled()

bool guik::GLCanvas::info_buffer_enabled ( ) const

◆ load_shader()

bool guik::GLCanvas::load_shader ( const std::string &  shader_name)

◆ mouse_control()

void guik::GLCanvas::mouse_control ( )

◆ normal_buffer()

const glk::Texture & guik::GLCanvas::normal_buffer ( ) const

◆ normal_buffer_enabled()

bool guik::GLCanvas::normal_buffer_enabled ( ) const

◆ partial_rendering_enabled()

bool guik::GLCanvas::partial_rendering_enabled ( ) const

◆ pick_depth()

float guik::GLCanvas::pick_depth ( const Eigen::Vector2i &  p,
int  window = 2 
) const

◆ pick_info()

Eigen::Vector4i guik::GLCanvas::pick_info ( const Eigen::Vector2i &  p,
int  window = 2 
) const

◆ ready()

bool guik::GLCanvas::ready ( ) const

◆ render_to_screen()

void guik::GLCanvas::render_to_screen ( int  color_buffer_id = 0)

◆ set_bg_texture()

void guik::GLCanvas::set_bg_texture ( const std::shared_ptr< glk::Texture > &  bg_texture)

◆ set_blend_depth_write()

void guik::GLCanvas::set_blend_depth_write ( bool  blend_depth_write)

◆ set_blend_func()

void guik::GLCanvas::set_blend_func ( GLenum  sfactor,
GLenum  dfactor 
)

◆ set_clear_color()

void guik::GLCanvas::set_clear_color ( const Eigen::Vector4f &  color)

◆ set_colormap()

void guik::GLCanvas::set_colormap ( glk::COLORMAP  colormap_type)

◆ set_effect()

void guik::GLCanvas::set_effect ( const std::shared_ptr< glk::ScreenEffect > &  effect)

◆ set_size()

void guik::GLCanvas::set_size ( const Eigen::Vector2i &  size)

◆ unbind()

void guik::GLCanvas::unbind ( )

◆ unbind_second()

void guik::GLCanvas::unbind_second ( )

◆ unproject()

Eigen::Vector3f guik::GLCanvas::unproject ( const Eigen::Vector2i &  p,
float  depth 
) const

Member Data Documentation

◆ alpha_blend_dfactor

GLenum guik::GLCanvas::alpha_blend_dfactor

◆ alpha_blend_sfactor

GLenum guik::GLCanvas::alpha_blend_sfactor

◆ bg_texture

std::shared_ptr<glk::Texture> guik::GLCanvas::bg_texture

◆ blend_depth_write

bool guik::GLCanvas::blend_depth_write

◆ camera_control

std::shared_ptr<guik::CameraControl> guik::GLCanvas::camera_control

◆ clear_color

Eigen::Vector4f guik::GLCanvas::clear_color

◆ clear_partial_rendering_flag

bool guik::GLCanvas::clear_partial_rendering_flag

◆ colormap

std::unique_ptr<glk::Texture> guik::GLCanvas::colormap

◆ dynamic_flag_buffer_id

int guik::GLCanvas::dynamic_flag_buffer_id

◆ frame_buffer

std::unique_ptr<glk::FrameBuffer> guik::GLCanvas::frame_buffer

◆ info_buffer_id

int guik::GLCanvas::info_buffer_id

◆ is_partial_rendering_enabled

bool guik::GLCanvas::is_partial_rendering_enabled

◆ keyboard_control_speed

double guik::GLCanvas::keyboard_control_speed

◆ last_projection_view_matrix

Eigen::Matrix4f guik::GLCanvas::last_projection_view_matrix

◆ normal_buffer_id

int guik::GLCanvas::normal_buffer_id

◆ partial_clear_shader

std::unique_ptr<glk::GLSLShader> guik::GLCanvas::partial_clear_shader

◆ partial_rendering_clear_thresh

double guik::GLCanvas::partial_rendering_clear_thresh

◆ projection_control

std::shared_ptr<guik::ProjectionControl> guik::GLCanvas::projection_control

◆ screen_effect

std::shared_ptr<glk::ScreenEffect> guik::GLCanvas::screen_effect

◆ screen_effect_buffer

std::unique_ptr<glk::FrameBuffer> guik::GLCanvas::screen_effect_buffer

◆ shader

std::unique_ptr<glk::GLSLShader> guik::GLCanvas::shader

◆ size

Eigen::Vector2i guik::GLCanvas::size

◆ texture_renderer

std::unique_ptr<glk::TextureRenderer> guik::GLCanvas::texture_renderer

◆ texture_shader

std::unique_ptr<glk::GLSLShader> guik::GLCanvas::texture_shader

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