Geogram  Version 1.8.9-rc
A programming library of geometric algorithms
GEO::MeshSurfaceIntersection::RadialSort Class Reference

#include <geogram/mesh/mesh_surface_intersection.h>

Public Member Functions

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

Static Public Member Functions

static exact::vec3 exact_direction (const ExactPoint &p1, const ExactPoint &p2)
 Computes a vector of arbitrary length with its direction given by two points. More...
 
static vec3I exact_direction_I (const ExactPoint &p1, const ExactPoint &p2)
 Computes an interval vector of arbitrary length with its direction given by two points. More...
 

Protected Member Functions

Sign h_orient (index_t h1, index_t h2) const
 Computes the relative orientations of two halfedges. More...
 
Sign h_refNorient (index_t h2) const
 Computes the normal orientation of a halfedge relative to h_ref. More...
 

Detailed Description

A class for sorting triangles around their common radial edge.

Definition at line 426 of file mesh_surface_intersection.h.

Constructor & Destructor Documentation

◆ RadialSort()

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

RadialSort constructor.

Parameters
[in]meshthe MeshSurfaceIntersection

Definition at line 432 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 460 of file mesh_surface_intersection.h.

◆ exact_direction()

static exact::vec3 GEO::MeshSurfaceIntersection::RadialSort::exact_direction ( const ExactPoint p1,
const ExactPoint p2 
)
static

Computes a vector of arbitrary length with its direction given by two points.

Parameters
[in]p1,p2the two points in homogeneous coordinates
Returns
a vector in cartesian coordinates with the same direction and orientation as p2 - p1

◆ exact_direction_I()

static vec3I GEO::MeshSurfaceIntersection::RadialSort::exact_direction_I ( const ExactPoint p1,
const ExactPoint p2 
)
static

Computes an interval vector of arbitrary length with its direction given by two points.

Parameters
[in]p1,p2the two points in homogeneous coordinates
Returns
an interval vector in cartesian coordinates with the same direction and orientation as p2 - p1

◆ 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

◆ 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: