Volume Cartographer 2.27.0
|
Orient vertex normals towards a reference point. More...
#include <vc/meshing/OrientNormals.hpp>
Public Types | |
enum class | ReferenceMode { Centroid , Manual } |
Reference point mode. More... | |
Public Member Functions | |
OrientNormals ()=default | |
Default constructor. | |
void | setMesh (const ITKMesh::Pointer &mesh) |
Set the input mesh. | |
auto | getMesh () const -> ITKMesh::Pointer |
Get the output mesh with updated normals. | |
void | setReferenceMode (ReferenceMode mode) |
Set reference point mode. More... | |
auto | referenceMode () const -> ReferenceMode |
Get the current reference mode. | |
void | setReferencePoint (const cv::Vec3d &point) |
Set manual reference point. More... | |
auto | referencePoint () const -> cv::Vec3d |
Get the manually defined reference point. | |
auto | compute () -> ITKMesh::Pointer |
Compute vertex normal reorientation. | |
Private Attributes | |
ITKMesh::Pointer | input_ |
ReferenceMode | mode_ {ReferenceMode::Centroid} |
cv::Vec3d | refPt_ |
ITKMesh::Pointer | output_ |
Orient vertex normals towards a reference point.
If vertex normals are flipped, the face normals are also flipped by reversing the winding order of all faces. This assumes that vertex normals were originally derived from the face normals and point in generally the same direction as the face normals.
Definition at line 22 of file OrientNormals.hpp.
|
strong |
Reference point mode.
Enumerator | |
---|---|
Centroid | Mesh centroid reference point for convex meshes. |
Manual | Point provided by setReferencePoint(). |
Definition at line 26 of file OrientNormals.hpp.
void volcart::meshing::OrientNormals::setReferenceMode | ( | ReferenceMode | mode | ) |
Set reference point mode.
Determines which automatically calculated reference point to use. See ReferenceMode for more details.
void volcart::meshing::OrientNormals::setReferencePoint | ( | const cv::Vec3d & | point | ) |
Set manual reference point.
If provided, automatically sets the reference mode to ReferenceMode::Manual.
|
private |
Input mesh
Definition at line 67 of file OrientNormals.hpp.
|
private |
Reference point mode
Definition at line 69 of file OrientNormals.hpp.
|
private |
Output mesh
Definition at line 73 of file OrientNormals.hpp.
|
private |
User-defined reference point
Definition at line 71 of file OrientNormals.hpp.