libigl v2.5.0
|
Coverts mesh data inside a igl::ViewerData class in an OpenGL compatible format The class includes a shader and the opengl calls to plot the data. More...
#include <MeshGL.h>
Classes | |
struct | TextGL |
Public Types | |
enum | DirtyFlags { DIRTY_NONE = 0x0000 , DIRTY_POSITION = 0x0001 , DIRTY_UV = 0x0002 , DIRTY_NORMAL = 0x0004 , DIRTY_AMBIENT = 0x0008 , DIRTY_DIFFUSE = 0x0010 , DIRTY_SPECULAR = 0x0020 , DIRTY_TEXTURE = 0x0040 , DIRTY_FACE = 0x0080 , DIRTY_MESH = 0x00FF , DIRTY_OVERLAY_LINES = 0x0100 , DIRTY_OVERLAY_POINTS = 0x0200 , DIRTY_VERTEX_LABELS = 0x0400 , DIRTY_FACE_LABELS = 0x0800 , DIRTY_CUSTOM_LABELS = 0x1000 , DIRTY_ALL = 0xFFFF } |
Bitmask flags for keeping track of what needs to be (re)-uploaded to the GPU. More... | |
typedef unsigned int | GLuint |
typedef unsigned int | GLint |
typedef Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | RowMatrixXf |
Public Member Functions | |
MeshGL () | |
void | init () |
Initialize shaders and buffers. | |
void | free () |
Release all resources. | |
void | init_buffers () |
Create a new set of OpenGL buffer objects. | |
void | bind_mesh () |
Bind the underlying OpenGL buffer objects for subsequent mesh draw calls. | |
void | draw_mesh (bool solid) |
Draw the currently buffered mesh (either solid or wireframe) | |
void | bind_overlay_lines () |
Bind the underlying OpenGL buffer objects for subsequent line overlay draw calls. | |
void | draw_overlay_lines () |
Draw the currently buffered line overlay. | |
void | bind_overlay_points () |
Bind the underlying OpenGL buffer objects for subsequent point overlay draw calls. | |
void | draw_overlay_points () |
Draw the currently buffered point overlay. | |
void | init_text_rendering () |
Text Binding and Draw functions. | |
void | bind_labels (const TextGL &labels) |
Bind the underlying OpenGL buffer objects for subsequent text draw calls. | |
void | draw_labels (const TextGL &labels) |
Draw the currently buffered text. | |
void | free_buffers () |
Release the OpenGL buffer objects. | |
Public Attributes | |
bool | is_initialized = false |
GLuint | vao_mesh |
GLuint | vao_overlay_lines |
GLuint | vao_overlay_points |
GLuint | shader_mesh |
GLuint | shader_overlay_lines |
GLuint | shader_overlay_points |
GLuint | shader_text |
GLuint | vbo_V |
Vertices of the current mesh (#V x 3) | |
GLuint | vbo_V_uv |
UV coordinates for the current mesh (#V x 2) | |
GLuint | vbo_V_normals |
Vertices of the current mesh (#V x 3) | |
GLuint | vbo_V_ambient |
Ambient material (#V x 3) | |
GLuint | vbo_V_diffuse |
Diffuse material (#V x 3) | |
GLuint | vbo_V_specular |
Specular material (#V x 3) | |
GLuint | vbo_F |
Faces of the mesh (#F x 3) | |
GLuint | vbo_tex |
Texture. | |
GLuint | vbo_lines_F |
Indices of the line overlay. | |
GLuint | vbo_lines_V |
Vertices of the line overlay. | |
GLuint | vbo_lines_V_colors |
Color values of the line overlay. | |
GLuint | vbo_points_F |
Indices of the point overlay. | |
GLuint | vbo_points_V |
Vertices of the point overlay. | |
GLuint | vbo_points_V_colors |
Color values of the point overlay. | |
RowMatrixXf | V_vbo |
RowMatrixXf | V_normals_vbo |
RowMatrixXf | V_ambient_vbo |
RowMatrixXf | V_diffuse_vbo |
RowMatrixXf | V_specular_vbo |
RowMatrixXf | V_uv_vbo |
RowMatrixXf | lines_V_vbo |
RowMatrixXf | lines_V_colors_vbo |
RowMatrixXf | points_V_vbo |
RowMatrixXf | points_V_colors_vbo |
TextGL | vertex_labels |
TextGL | face_labels |
TextGL | custom_labels |
GLuint | font_atlas |
int | tex_u |
int | tex_v |
GLint | tex_filter |
GLint | tex_wrap |
Eigen::Matrix< char, Eigen::Dynamic, 1 > | tex |
Eigen::Matrix< unsigned, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | F_vbo |
Eigen::Matrix< unsigned, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | lines_F_vbo |
Eigen::Matrix< unsigned, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | points_F_vbo |
uint32_t | dirty |
Marks dirty buffers that need to be uploaded to OpenGL. | |
Coverts mesh data inside a igl::ViewerData class in an OpenGL compatible format The class includes a shader and the opengl calls to plot the data.
typedef unsigned int igl::opengl::MeshGL::GLuint |
typedef unsigned int igl::opengl::MeshGL::GLint |
typedef Eigen::Matrix<float,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> igl::opengl::MeshGL::RowMatrixXf |
Bitmask flags for keeping track of what needs to be (re)-uploaded to the GPU.
igl::opengl::MeshGL::MeshGL | ( | ) |
void igl::opengl::MeshGL::init | ( | ) |
Initialize shaders and buffers.
void igl::opengl::MeshGL::free | ( | ) |
Release all resources.
void igl::opengl::MeshGL::init_buffers | ( | ) |
Create a new set of OpenGL buffer objects.
void igl::opengl::MeshGL::bind_mesh | ( | ) |
Bind the underlying OpenGL buffer objects for subsequent mesh draw calls.
void igl::opengl::MeshGL::draw_mesh | ( | bool | solid | ) |
Draw the currently buffered mesh (either solid or wireframe)
[in] | solid | Whether to draw the mesh as a solid or wireframe |
void igl::opengl::MeshGL::bind_overlay_lines | ( | ) |
Bind the underlying OpenGL buffer objects for subsequent line overlay draw calls.
void igl::opengl::MeshGL::draw_overlay_lines | ( | ) |
Draw the currently buffered line overlay.
void igl::opengl::MeshGL::bind_overlay_points | ( | ) |
Bind the underlying OpenGL buffer objects for subsequent point overlay draw calls.
void igl::opengl::MeshGL::draw_overlay_points | ( | ) |
Draw the currently buffered point overlay.
void igl::opengl::MeshGL::init_text_rendering | ( | ) |
Text Binding and Draw functions.
void igl::opengl::MeshGL::bind_labels | ( | const TextGL & | labels | ) |
Bind the underlying OpenGL buffer objects for subsequent text draw calls.
void igl::opengl::MeshGL::draw_labels | ( | const TextGL & | labels | ) |
Draw the currently buffered text.
void igl::opengl::MeshGL::free_buffers | ( | ) |
Release the OpenGL buffer objects.
bool igl::opengl::MeshGL::is_initialized = false |
GLuint igl::opengl::MeshGL::vao_mesh |
GLuint igl::opengl::MeshGL::vao_overlay_lines |
GLuint igl::opengl::MeshGL::vao_overlay_points |
GLuint igl::opengl::MeshGL::shader_mesh |
GLuint igl::opengl::MeshGL::shader_overlay_lines |
GLuint igl::opengl::MeshGL::shader_overlay_points |
GLuint igl::opengl::MeshGL::shader_text |
GLuint igl::opengl::MeshGL::vbo_V |
Vertices of the current mesh (#V x 3)
GLuint igl::opengl::MeshGL::vbo_V_uv |
UV coordinates for the current mesh (#V x 2)
GLuint igl::opengl::MeshGL::vbo_V_normals |
Vertices of the current mesh (#V x 3)
GLuint igl::opengl::MeshGL::vbo_V_ambient |
Ambient material (#V x 3)
GLuint igl::opengl::MeshGL::vbo_V_diffuse |
Diffuse material (#V x 3)
GLuint igl::opengl::MeshGL::vbo_V_specular |
Specular material (#V x 3)
GLuint igl::opengl::MeshGL::vbo_F |
Faces of the mesh (#F x 3)
GLuint igl::opengl::MeshGL::vbo_tex |
Texture.
GLuint igl::opengl::MeshGL::vbo_lines_F |
Indices of the line overlay.
GLuint igl::opengl::MeshGL::vbo_lines_V |
Vertices of the line overlay.
GLuint igl::opengl::MeshGL::vbo_lines_V_colors |
Color values of the line overlay.
GLuint igl::opengl::MeshGL::vbo_points_F |
Indices of the point overlay.
GLuint igl::opengl::MeshGL::vbo_points_V |
Vertices of the point overlay.
GLuint igl::opengl::MeshGL::vbo_points_V_colors |
Color values of the point overlay.
RowMatrixXf igl::opengl::MeshGL::V_vbo |
RowMatrixXf igl::opengl::MeshGL::V_normals_vbo |
RowMatrixXf igl::opengl::MeshGL::V_ambient_vbo |
RowMatrixXf igl::opengl::MeshGL::V_diffuse_vbo |
RowMatrixXf igl::opengl::MeshGL::V_specular_vbo |
RowMatrixXf igl::opengl::MeshGL::V_uv_vbo |
RowMatrixXf igl::opengl::MeshGL::lines_V_vbo |
RowMatrixXf igl::opengl::MeshGL::lines_V_colors_vbo |
RowMatrixXf igl::opengl::MeshGL::points_V_vbo |
RowMatrixXf igl::opengl::MeshGL::points_V_colors_vbo |
TextGL igl::opengl::MeshGL::vertex_labels |
TextGL igl::opengl::MeshGL::face_labels |
TextGL igl::opengl::MeshGL::custom_labels |
GLuint igl::opengl::MeshGL::font_atlas |
int igl::opengl::MeshGL::tex_u |
int igl::opengl::MeshGL::tex_v |
GLint igl::opengl::MeshGL::tex_filter |
GLint igl::opengl::MeshGL::tex_wrap |
Eigen::Matrix<char,Eigen::Dynamic,1> igl::opengl::MeshGL::tex |
Eigen::Matrix<unsigned, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> igl::opengl::MeshGL::F_vbo |
Eigen::Matrix<unsigned, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> igl::opengl::MeshGL::lines_F_vbo |
Eigen::Matrix<unsigned, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> igl::opengl::MeshGL::points_F_vbo |
uint32_t igl::opengl::MeshGL::dirty |
Marks dirty buffers that need to be uploaded to OpenGL.