Noether  0.0.0
Loading...
Searching...
No Matches
noether::FaceSubdivisionMeshModifier Class Referenceabstract

MeshModifier that subdivides mesh faces until a user-defined criteria is met. More...

Detailed Description

This class subdivides mesh faces by introducing a single new vertex in the middle of a triangle to create 3 new triangles per face. 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
This class subdivides faces by inserting a vertex in the middle of the face, which means that all original triangle edges are retained. Therefore, the criteria for face subdivision should not be based on a property of a triangle edge (e.g., maximum allowable length).

#include <face_subdivision_modifier.h>

Inheritance diagram for noether::FaceSubdivisionMeshModifier:

Public Member Functions

std::vector< pcl::PolygonMesh > modify (const pcl::PolygonMesh &mesh) const override
 

Protected Member Functions

virtual bool requiresSubdivision (const pcl::PolygonMesh &mesh, const std::vector< pcl::index_t > &face) const =0
 

Additional Inherited Members

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

Member Function Documentation

◆ modify()

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

Reimplemented from noether::MeshModifier.

◆ requiresSubdivision()

virtual bool noether::FaceSubdivisionMeshModifier::requiresSubdivision ( const pcl::PolygonMesh &  mesh,
const std::vector< pcl::index_t > &  face 
) const
protectedpure virtual

Checks if the provided mesh face requires subdivision.

Parameters
meshInput mesh (for access to vertices, etc.)
facePolygonal mesh face to check
Returns
True if the face should be subdivided, false otherwise

Implemented in noether::FaceSubdivisionByAreaMeshModifier.