18 :
public OpenMesh::Subdivider::Uniform::SubdividerT<deprecated::TopologicalMesh, Scalar>
21 using base = OpenMesh::Subdivider::Uniform::SubdividerT<deprecated::TopologicalMesh, Scalar>;
39 const char* name(
void )
const override {
return "LoopSubdivider"; }
61 void recompute(
const Vector3Array& newCoarseVertices,
62 const Vector3Array& newCoarseNormals,
63 Vector3Array& newSubdivVertices,
64 Vector3Array& newSubdivNormals,
70 m_weights.resize( max_valence );
71 std::generate( m_weights.begin(), m_weights.end(), compute_weight() );
80 const bool updatePoints =
true )
override;
84 struct compute_weight {
85 compute_weight() : m_valence( -1 ) {}
86 Weight operator()(
void ) {
91 double inv_v = 1.0 / double( m_valence );
92 double t = ( 3.0 + 2.0 *
std::cos( 2.0 * Math::Pi * inv_v ) );
93 double alpha = ( 40.0 - t * t ) / 64.0;
94 return Weight( 1.0 - alpha, inv_v * alpha );
96 return Weight( 0, 0 );
105 void split_face( deprecated::TopologicalMesh& mesh,
106 const deprecated::TopologicalMesh::FaceHandle& fh,
110 void corner_cutting( deprecated::TopologicalMesh& mesh,
111 const deprecated::TopologicalMesh::HalfedgeHandle& he,
115 void split_edge( deprecated::TopologicalMesh& mesh,
116 const deprecated::TopologicalMesh::EdgeHandle& eh,
122 void compute_midpoint( deprecated::TopologicalMesh& mesh,
123 const deprecated::TopologicalMesh::EdgeHandle& eh,
127 void smooth( deprecated::TopologicalMesh& mesh,
128 const deprecated::TopologicalMesh::VertexHandle& vh,
133 OpenMesh::VPropHandleT<deprecated::TopologicalMesh::Point> m_vpPos;
136 OpenMesh::EPropHandleT<deprecated::TopologicalMesh::VertexHandle> m_epPos;
148 OpenMesh::HPropHandleT<deprecated::TopologicalMesh::VertexHandle> m_hV;