cgv
Loading...
Searching...
No Matches
cgv::media::mesh::cuberille< X, T, P > Class Template Reference

class used to perform the marching cubes algorithm More...

#include <cuberille.h>

Inheritance diagram for cgv::media::mesh::cuberille< X, T, P >:
cgv::media::mesh::streaming_mesh< X >

Public Types

typedef streaming_mesh< X > base_type
 
typedef cgv::math::fvec< X, 3 > pnt_type
 points must have three components
 
typedef cgv::math::fvec< X, 3 > vec_type
 vectors must have three components
 
- Public Types inherited from cgv::media::mesh::streaming_mesh< X >
typedef cgv::math::fvec< X, 3 > pnt_type
 type of vertex locations
 
typedef cgv::math::fvec< X, 3 > vec_type
 type of vertex normals
 

Public Member Functions

 cuberille (const cgv::math::v3_func< X, T > &_func, streaming_mesh_callback_handler *_smcbh, const P &_pred)
 construct dual contouring object
 
void generate_edge_quad (int vi, int vj, int vk, int vl, bool reorient)
 construct a quadrilateral
 
void process_slice (c_slice_info< T, P > *I[2])
 generate all vertices needed in the given slice I[0] with I[1] being the previous slice
 
void extract (const axis_aligned_box< X, 3 > &box, unsigned int _resx, unsigned int _resy, unsigned int _resz, bool show_progress=false)
 extract iso surface and send quads to streaming mesh handler
 
- Public Member Functions inherited from cgv::media::mesh::streaming_mesh< X >
 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_typevertex_location (unsigned int vi)
 write access to vertex locations
 
const pnt_typevertex_location (unsigned int vi) const
 read access to vertex locations
 
const vec_typevertex_normal (unsigned int vi) const
 read access to vertex normals
 
vec_typevertex_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

const cgv::math::v3_func< X, T > & func
 
- Protected Attributes inherited from cgv::media::mesh::streaming_mesh< X >
int idx_off
 offset used to address vertices in deque
 
unsigned int nr_faces
 count the number of faces
 
std::deque< pnt_typepnts
 store currently used points in deque
 
std::deque< vec_typenmls
 store currently used normals in deque
 
streaming_mesh_callback_handlersmcbh
 store a pointer to the callback handler
 

Detailed Description

template<typename X, typename T, class P>
class cgv::media::mesh::cuberille< X, T, P >

class used to perform the marching cubes algorithm

Definition at line 68 of file cuberille.h.

Member Typedef Documentation

◆ base_type

template<typename X , typename T , class P >
typedef streaming_mesh<X> cgv::media::mesh::cuberille< X, T, P >::base_type

Definition at line 71 of file cuberille.h.

◆ pnt_type

template<typename X , typename T , class P >
typedef cgv::math::fvec<X,3> cgv::media::mesh::cuberille< X, T, P >::pnt_type

points must have three components

Definition at line 73 of file cuberille.h.

◆ vec_type

template<typename X , typename T , class P >
typedef cgv::math::fvec<X,3> cgv::media::mesh::cuberille< X, T, P >::vec_type

vectors must have three components

Definition at line 75 of file cuberille.h.

Constructor & Destructor Documentation

◆ cuberille()

template<typename X , typename T , class P >
cgv::media::mesh::cuberille< X, T, P >::cuberille ( const cgv::math::v3_func< X, T > &  _func,
streaming_mesh_callback_handler _smcbh,
const P &  _pred 
)
inline

construct dual contouring object

Definition at line 85 of file cuberille.h.

References cgv::media::mesh::streaming_mesh< X >::set_callback_handler().

Member Function Documentation

◆ extract()

template<typename X , typename T , class P >
void cgv::media::mesh::cuberille< X, T, P >::extract ( const axis_aligned_box< X, 3 > &  box,
unsigned int  _resx,
unsigned int  _resy,
unsigned int  _resz,
bool  show_progress = false 
)
inline

◆ generate_edge_quad()

template<typename X , typename T , class P >
void cgv::media::mesh::cuberille< X, T, P >::generate_edge_quad ( int  vi,
int  vj,
int  vk,
int  vl,
bool  reorient 
)
inline

construct a quadrilateral

Definition at line 93 of file cuberille.h.

References cgv::media::mesh::streaming_mesh< X >::new_quad().

Referenced by cgv::media::mesh::cuberille< X, T, P >::process_slice().

◆ process_slice()

template<typename X , typename T , class P >
void cgv::media::mesh::cuberille< X, T, P >::process_slice ( c_slice_info< T, P > *  I[2])
inline

Member Data Documentation

◆ func

template<typename X , typename T , class P >
const cgv::math::v3_func<X,T>& cgv::media::mesh::cuberille< X, T, P >::func
protected

Definition at line 82 of file cuberille.h.


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