Noether  0.0.0
Loading...
Searching...
No Matches
noether::FaceMidpointSubdivisionMeshModifier Class Reference

MeshModifier that applies iterative midpoint subdivision to create smaller mesh faces. More...

Detailed Description

This class subdivides faces by adding new vertices at the midpoints of edges of a face and creating smaller new faces by connecting the midpoints and existing vertices. All new vertices added to the mesh retain the ancillary data fields associated with the original vertices (e.g., color, normals, curvature, etc.). If normal and color (rgba) data fields exists, added midpoints average the normal and color fields of the parent vertices.

Note: midpoint subdivision increases the number of vertices and triangles by a factor of 4^n, so only a small number of iterations is recommended.

#include <face_subdivision_modifier.h>

Inheritance diagram for noether::FaceMidpointSubdivisionMeshModifier:

Public Member Functions

 FaceMidpointSubdivisionMeshModifier (unsigned n_iterations)
 Constructor.
 
std::vector< pcl::PolygonMesh > modify (const pcl::PolygonMesh &mesh) const override
 

Protected Attributes

unsigned n_iterations_
 Number of iterations of subdivision to run.
 

Additional Inherited Members

- Public Types inherited from noether::MeshModifier
using Ptr = std::unique_ptr< MeshModifier >
 
using ConstPtr = std::unique_ptr< const MeshModifier >
 

Constructor & Destructor Documentation

◆ FaceMidpointSubdivisionMeshModifier()

noether::FaceMidpointSubdivisionMeshModifier::FaceMidpointSubdivisionMeshModifier ( unsigned  n_iterations)
Parameters
n_iterationsNumber of iterations to perform midpoint subdivision

Member Function Documentation

◆ modify()

std::vector< pcl::PolygonMesh > noether::FaceMidpointSubdivisionMeshModifier::modify ( const pcl::PolygonMesh &  mesh) const
overridevirtual

Reimplemented from noether::MeshModifier.