Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
GEO::MeshSurfaceIntersection::RadialSort Class Reference

#include <geogram/mesh/mesh_surface_intersection.h>

Public Member Functions

 RadialSort (const MeshSurfaceIntersection &I)
 RadialSort constructor.
 
void init (index_t h_ref)
 Initializes radial sorting around a given halfedge.
 
bool operator() (index_t h1, index_t h2) const
 Compares two halfedges.
 
bool degenerate () const
 Tests if a degeneracy was encountered.
 

Protected Member Functions

Sign h_orient (index_t h1, index_t h2) const
 Computes the relative orientations of two halfedges.
 
Sign h_refNorient (index_t h2) const
 Computes the normal orientation of a halfedge relative to h_ref.
 
exact::vec3 normal (index_t h) const
 Computes the normal to a facet with exact coordinates.
 
void report_problem (const char *message) const
 This function is called whenever radial sort encounters a configuration not supposed to happen. It positions the generate_ flag for this RadialSort. It can happen when using the expansion-based open-source kernel, that can encounter overflows or underflows. In this case, one may need the geogram+ arithmetic kernel (marketed by the TESSAEL company).
 

Detailed Description

A class for sorting triangles around their common radial edge.

Definition at line 502 of file mesh_surface_intersection.h.

Constructor & Destructor Documentation

◆ RadialSort()

GEO::MeshSurfaceIntersection::RadialSort::RadialSort ( const MeshSurfaceIntersection I)
inline

RadialSort constructor.

Parameters
[in]Ia reference to the MeshSurfaceIntersection

Definition at line 508 of file mesh_surface_intersection.h.

Member Function Documentation

◆ degenerate()

bool GEO::MeshSurfaceIntersection::RadialSort::degenerate ( ) const
inline

Tests if a degeneracy was encountered.

Return values
trueif there were two coplanar triangles on the same side relative to h_ref
falseotherwise

Definition at line 536 of file mesh_surface_intersection.h.

◆ h_orient()

Sign GEO::MeshSurfaceIntersection::RadialSort::h_orient ( index_t  h1,
index_t  h2 
) const
protected

Computes the relative orientations of two halfedges.

Parameters
[in]h1,h2the two halfedges
Return values
POSITIVEif going from h1's triangle to h2's triangle is a left turn (with h_ref facing to you)
ZEROif h1 and h2 have co-linear normals
NEGATIVEotherwise

◆ h_refNorient()

Sign GEO::MeshSurfaceIntersection::RadialSort::h_refNorient ( index_t  h2) const
protected

Computes the normal orientation of a halfedge relative to h_ref.

Returns
the sign of the dot product between h_ref's triangle normal and h2's triangle normal.

◆ init()

void GEO::MeshSurfaceIntersection::RadialSort::init ( index_t  h_ref)

Initializes radial sorting around a given halfedge.

Parameters
[in]h_refthe reference halfedge

◆ normal()

exact::vec3 GEO::MeshSurfaceIntersection::RadialSort::normal ( index_t  h) const
protected

Computes the normal to a facet with exact coordinates.

Parameters
[in]han halfedge incident to the facet
Returns
the normal to the facet with exact coordinates

◆ operator()()

bool GEO::MeshSurfaceIntersection::RadialSort::operator() ( index_t  h1,
index_t  h2 
) const

Compares two halfedges.

Parameters
[in]h1,h2the two halfedges
Return values
trueif h1 should be before h2 in radial order
falseotherwise

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