Developer Documentation
OpenMesh::Subdivider::Uniform::LoopT< MeshType, RealType > Class Template Reference

#include <libs_required/OpenMesh/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh>

Inheritance diagram for OpenMesh::Subdivider::Uniform::LoopT< MeshType, RealType >:
OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType > OpenMesh::Utils::Noncopyable


struct  compute_weight

Public Types

typedef RealType real_t
typedef MeshType mesh_t
typedef SubdividerT< mesh_t, real_t > parent_t
typedef std::pair< real_t, real_t > weight_t
typedef std::vector< std::pair< real_t, real_t > > weights_t
- Public Types inherited from OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >
typedef MeshType mesh_t
typedef RealType real_t

Public Member Functions

 LoopT (mesh_t &_m)
const char * name () const
 Return name of subdivision algorithm.
void init_weights (size_t _max_valence=50)
 Pre-compute weights.
- Public Member Functions inherited from OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >
virtual ~SubdividerT ()
 Descructor (calls detach())
 SubdividerT (void)
 SubdividerT (MeshType &_m)
bool operator() (MeshType &_m, size_t _n, const bool _update_points=true)
bool attach (MeshType &_m)
bool operator() (size_t _n, const bool _update_points=true)
void detach (void)

Protected Member Functions

bool prepare (mesh_t &_m)
 Prepare mesh, e.g. add properties.
bool cleanup (mesh_t &_m)
 Cleanup mesh after usage, e.g. remove added properties.
bool subdivide (mesh_t &_m, size_t _n, const bool _update_points=true)
 Subdivide mesh _m _n times. More...
Overload theses methods

Private Member Functions

void split_face (mesh_t &_m, const typename mesh_t::FaceHandle &_fh)
void corner_cutting (mesh_t &_m, const typename mesh_t::HalfedgeHandle &_he)
void split_edge (mesh_t &_m, const typename mesh_t::EdgeHandle &_eh)
void compute_midpoint (mesh_t &_m, const typename mesh_t::EdgeHandle &_eh)
void smooth (mesh_t &_m, const typename mesh_t::VertexHandle &_vh)

Private Attributes

OpenMesh::VPropHandleT< typename mesh_t::Point > vp_pos_
OpenMesh::EPropHandleT< typename mesh_t::Point > ep_pos_
weights_t weights_
const real_t _1over8
const real_t _3over8

Detailed Description

template<typename MeshType, typename RealType = float>
class OpenMesh::Subdivider::Uniform::LoopT< MeshType, RealType >

Uniform Loop subdivision algorithm.

Implementation as described in

C. T. Loop, "Smooth Subdivision Surfaces Based on Triangles", M.S. Thesis, Department of Mathematics, University of Utah, August 1987.

Definition at line 96 of file LoopT.hh.

Member Function Documentation

template<typename MeshType, typename RealType = float>
bool OpenMesh::Subdivider::Uniform::LoopT< MeshType, RealType >::subdivide ( mesh_t &  _m,
size_t  _n,
const bool  _update_points = true 

Subdivide mesh _m _n times.

TODO:Implement fixed positions

Implements OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >.

Definition at line 154 of file LoopT.hh.

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