cgv
|
class used to perform the marching cubes algorithm More...
#include <streaming_mesh.h>
Public Types | |
typedef cgv::math::fvec< T, 3 > | pnt_type |
type of vertex locations | |
typedef cgv::math::fvec< T, 3 > | vec_type |
type of vertex normals | |
Public Member Functions | |
streaming_mesh (streaming_mesh_callback_handler *_smcbh=0) | |
construct from callback handler | |
void | set_callback_handler (streaming_mesh_callback_handler *_smcbh) |
set a new callback handler | |
unsigned int | get_nr_dropped_vertices () const |
return the number of vertices dropped from the front, what is used as index offset into a deque | |
unsigned int | get_nr_vertices () const |
return the number of vertices | |
unsigned int | get_nr_faces () const |
return the number of faces | |
void | drop_vertex () |
drop the front most vertex from the deque | |
void | drop_vertices (unsigned int n) |
drop n vertices from the front of the deque | |
pnt_type & | vertex_location (unsigned int vi) |
write access to vertex locations | |
const pnt_type & | vertex_location (unsigned int vi) const |
read access to vertex locations | |
const vec_type & | vertex_normal (unsigned int vi) const |
read access to vertex normals | |
vec_type & | vertex_normal (unsigned int vi) |
write access to vertex normals | |
unsigned int | new_vertex (const pnt_type &p) |
add a new vertex with the given location and call the callback of the callback handler | |
void | new_triangle (unsigned int vi, unsigned int vj, unsigned int vk) |
construct a new triangle by calling the new polygon method of the callback handler | |
void | new_quad (unsigned int vi, unsigned int vj, unsigned int vk, unsigned int vl) |
construct a new quad by calling the new polygon method of the callback handler | |
void | new_polygon (const std::vector< unsigned int > &vertex_indices) |
construct a new polygon by calling the new polygon method of the callback handler | |
Protected Attributes | |
int | idx_off |
offset used to address vertices in deque | |
unsigned int | nr_faces |
count the number of faces | |
std::deque< pnt_type > | pnts |
store currently used points in deque | |
std::deque< vec_type > | nmls |
store currently used normals in deque | |
streaming_mesh_callback_handler * | smcbh |
store a pointer to the callback handler | |
class used to perform the marching cubes algorithm
Definition at line 24 of file streaming_mesh.h.
typedef cgv::math::fvec<T,3> cgv::media::mesh::streaming_mesh< T >::pnt_type |
type of vertex locations
Definition at line 28 of file streaming_mesh.h.
typedef cgv::math::fvec<T,3> cgv::media::mesh::streaming_mesh< T >::vec_type |
type of vertex normals
Definition at line 30 of file streaming_mesh.h.
|
inline |
construct from callback handler
Definition at line 44 of file streaming_mesh.h.
|
inline |
drop the front most vertex from the deque
Definition at line 57 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh_callback_handler::before_drop_vertex(), cgv::media::mesh::streaming_mesh< T >::idx_off, cgv::media::mesh::streaming_mesh< T >::nmls, cgv::media::mesh::streaming_mesh< T >::pnts, and cgv::media::mesh::streaming_mesh< T >::smcbh.
Referenced by cgv::media::mesh::streaming_mesh< T >::drop_vertices().
|
inline |
drop n vertices from the front of the deque
Definition at line 67 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::drop_vertex().
|
inline |
return the number of vertices dropped from the front, what is used as index offset into a deque
Definition at line 51 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::idx_off.
|
inline |
return the number of faces
Definition at line 55 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::nr_faces.
Referenced by cgv::render::gl::gl_implicit_surface_drawable_base::surface_extraction().
|
inline |
return the number of vertices
Definition at line 53 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::idx_off, and cgv::media::mesh::streaming_mesh< T >::pnts.
Referenced by cgv::render::gl::gl_implicit_surface_drawable_base::surface_extraction().
|
inline |
construct a new polygon by calling the new polygon method of the callback handler
Definition at line 110 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh_callback_handler::new_polygon(), cgv::media::mesh::streaming_mesh< T >::nr_faces, and cgv::media::mesh::streaming_mesh< T >::smcbh.
|
inline |
construct a new quad by calling the new polygon method of the callback handler
Definition at line 99 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh_callback_handler::new_polygon(), cgv::media::mesh::streaming_mesh< T >::nr_faces, and cgv::media::mesh::streaming_mesh< T >::smcbh.
|
inline |
construct a new triangle by calling the new polygon method of the callback handler
Definition at line 89 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh_callback_handler::new_polygon(), cgv::media::mesh::streaming_mesh< T >::nr_faces, and cgv::media::mesh::streaming_mesh< T >::smcbh.
|
inline |
add a new vertex with the given location and call the callback of the callback handler
Definition at line 80 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::idx_off, cgv::media::mesh::streaming_mesh_callback_handler::new_vertex(), cgv::media::mesh::streaming_mesh< T >::nmls, cgv::media::mesh::streaming_mesh< T >::pnts, and cgv::media::mesh::streaming_mesh< T >::smcbh.
|
inline |
set a new callback handler
Definition at line 47 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::smcbh.
|
inline |
write access to vertex locations
Definition at line 72 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::idx_off, and cgv::media::mesh::streaming_mesh< T >::pnts.
Referenced by cgv::render::gl::gl_implicit_surface_drawable_base::compute_face_normal(), cgv::render::gl::gl_implicit_surface_drawable_base::new_polygon(), and cgv::render::gl::gl_implicit_surface_drawable_base::new_vertex().
|
inline |
read access to vertex locations
Definition at line 74 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::idx_off, and cgv::media::mesh::streaming_mesh< T >::pnts.
|
inline |
write access to vertex normals
Definition at line 78 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::idx_off, and cgv::media::mesh::streaming_mesh< T >::nmls.
|
inline |
read access to vertex normals
Definition at line 76 of file streaming_mesh.h.
References cgv::media::mesh::streaming_mesh< T >::idx_off, and cgv::media::mesh::streaming_mesh< T >::nmls.
Referenced by cgv::render::gl::gl_implicit_surface_drawable_base::new_polygon(), and cgv::render::gl::gl_implicit_surface_drawable_base::new_vertex().
|
protected |
offset used to address vertices in deque
Definition at line 33 of file streaming_mesh.h.
Referenced by cgv::media::mesh::streaming_mesh< T >::drop_vertex(), cgv::media::mesh::streaming_mesh< T >::get_nr_dropped_vertices(), cgv::media::mesh::streaming_mesh< T >::get_nr_vertices(), cgv::media::mesh::streaming_mesh< T >::new_vertex(), cgv::media::mesh::streaming_mesh< T >::vertex_location(), cgv::media::mesh::streaming_mesh< T >::vertex_location(), cgv::media::mesh::streaming_mesh< T >::vertex_normal(), and cgv::media::mesh::streaming_mesh< T >::vertex_normal().
|
protected |
store currently used normals in deque
Definition at line 39 of file streaming_mesh.h.
Referenced by cgv::media::mesh::streaming_mesh< T >::drop_vertex(), cgv::media::mesh::streaming_mesh< T >::new_vertex(), cgv::media::mesh::streaming_mesh< T >::vertex_normal(), and cgv::media::mesh::streaming_mesh< T >::vertex_normal().
|
protected |
count the number of faces
Definition at line 35 of file streaming_mesh.h.
Referenced by cgv::media::mesh::streaming_mesh< T >::get_nr_faces(), cgv::media::mesh::streaming_mesh< T >::new_polygon(), cgv::media::mesh::streaming_mesh< T >::new_quad(), and cgv::media::mesh::streaming_mesh< T >::new_triangle().
|
protected |
store currently used points in deque
Definition at line 37 of file streaming_mesh.h.
Referenced by cgv::media::mesh::streaming_mesh< T >::drop_vertex(), cgv::media::mesh::streaming_mesh< T >::get_nr_vertices(), cgv::media::mesh::streaming_mesh< T >::new_vertex(), cgv::media::mesh::streaming_mesh< T >::vertex_location(), and cgv::media::mesh::streaming_mesh< T >::vertex_location().
|
protected |
store a pointer to the callback handler
Definition at line 41 of file streaming_mesh.h.
Referenced by cgv::media::mesh::streaming_mesh< T >::drop_vertex(), cgv::media::mesh::streaming_mesh< T >::new_polygon(), cgv::media::mesh::streaming_mesh< T >::new_quad(), cgv::media::mesh::streaming_mesh< T >::new_triangle(), cgv::media::mesh::streaming_mesh< T >::new_vertex(), and cgv::media::mesh::streaming_mesh< T >::set_callback_handler().