MeshLib Documentation
Loading...
Searching...
No Matches
MR::EdgePoint Struct Reference

encodes a point on an edge of mesh or of polyline More...

#include <MREdgePoint.h>

Public Member Functions

 EdgePoint ()=default
 
 EdgePoint (EdgeId e, float a)
 
MRMESH_API EdgePoint (const MeshTopology &topology, VertId v)
 
MRMESH_API EdgePoint (const PolylineTopology &topology, VertId v)
 
MRMESH_API VertId inVertex (const MeshTopology &topology) const
 returns valid vertex id if the point is in vertex, otherwise returns invalid id
 
MRMESH_API VertId inVertex (const PolylineTopology &topology) const
 returns valid vertex id if the point is in vertex, otherwise returns invalid id
 
MRMESH_API VertId getClosestVertex (const MeshTopology &topology) const
 returns one of two edge vertices, closest to this point
 
MRMESH_API VertId getClosestVertex (const PolylineTopology &topology) const
 returns one of two edge vertices, closest to this point
 
bool inVertex () const
 returns true if the point is in a vertex
 
MRMESH_API void moveToClosestVertex ()
 sets this to the closest end of the edge
 
MRMESH_API bool isBd (const MeshTopology &topology, const FaceBitSet *region=nullptr) const
 returns true if the point is on the boundary of the region (or for whole mesh if region is nullptr)
 
bool valid () const
 consider this valid if the edge ID is valid
 
 operator bool () const
 
EdgePoint sym () const
 represents the same point relative to sym edge in
 
bool operator== (const EdgePoint &rhs) const =default
 returns true if two edge-points are equal including equal not-unique representation
 

Public Attributes

EdgeId e
 
SegmPointf a
 a in [0,1], a=0 => point is in org( e ), a=1 => point is in dest( e )
 

Related Symbols

(Note that these are not member symbols.)

MRMESH_API bool fromSameTriangle (const MeshTopology &topology, EdgePoint &a, EdgePoint &b)
 
bool fromSameTriangle (const MeshTopology &topology, EdgePoint &&a, EdgePoint &&b)
 

Detailed Description

encodes a point on an edge of mesh or of polyline

Constructor & Destructor Documentation

◆ EdgePoint() [1/4]

MR::EdgePoint::EdgePoint ( )
nodiscarddefault

◆ EdgePoint() [2/4]

MR::EdgePoint::EdgePoint ( EdgeId e,
float a )
inlinenodiscard

◆ EdgePoint() [3/4]

MRMESH_API MR::EdgePoint::EdgePoint ( const MeshTopology & topology,
VertId v )
nodiscard

◆ EdgePoint() [4/4]

MRMESH_API MR::EdgePoint::EdgePoint ( const PolylineTopology & topology,
VertId v )
nodiscard

Member Function Documentation

◆ getClosestVertex() [1/2]

MRMESH_API VertId MR::EdgePoint::getClosestVertex ( const MeshTopology & topology) const
nodiscard

returns one of two edge vertices, closest to this point

◆ getClosestVertex() [2/2]

MRMESH_API VertId MR::EdgePoint::getClosestVertex ( const PolylineTopology & topology) const
nodiscard

returns one of two edge vertices, closest to this point

◆ inVertex() [1/3]

bool MR::EdgePoint::inVertex ( ) const
inlinenodiscard

returns true if the point is in a vertex

◆ inVertex() [2/3]

MRMESH_API VertId MR::EdgePoint::inVertex ( const MeshTopology & topology) const
nodiscard

returns valid vertex id if the point is in vertex, otherwise returns invalid id

◆ inVertex() [3/3]

MRMESH_API VertId MR::EdgePoint::inVertex ( const PolylineTopology & topology) const
nodiscard

returns valid vertex id if the point is in vertex, otherwise returns invalid id

◆ isBd()

MRMESH_API bool MR::EdgePoint::isBd ( const MeshTopology & topology,
const FaceBitSet * region = nullptr ) const
nodiscard

returns true if the point is on the boundary of the region (or for whole mesh if region is nullptr)

◆ moveToClosestVertex()

MRMESH_API void MR::EdgePoint::moveToClosestVertex ( )

sets this to the closest end of the edge

◆ operator bool()

MR::EdgePoint::operator bool ( ) const
inlineexplicitnodiscard

◆ operator==()

bool MR::EdgePoint::operator== ( const EdgePoint & rhs) const
nodiscarddefault

returns true if two edge-points are equal including equal not-unique representation

◆ sym()

EdgePoint MR::EdgePoint::sym ( ) const
inlinenodiscard

represents the same point relative to sym edge in

◆ valid()

bool MR::EdgePoint::valid ( ) const
inlinenodiscard

consider this valid if the edge ID is valid

Friends And Related Symbol Documentation

◆ fromSameTriangle() [1/2]

bool fromSameTriangle ( const MeshTopology & topology,
EdgePoint && a,
EdgePoint && b )
related

returns true if points a and b are located on a boundary of the same triangle;

if true a.e and b.e are updated to have that triangle on the left

◆ fromSameTriangle() [2/2]

MRMESH_API bool fromSameTriangle ( const MeshTopology & topology,
EdgePoint & a,
EdgePoint & b )
related

returns true if points a and b are located on a boundary of the same triangle;

if true a.e and b.e are updated to have that triangle on the left

Member Data Documentation

◆ a

SegmPointf MR::EdgePoint::a

a in [0,1], a=0 => point is in org( e ), a=1 => point is in dest( e )

◆ e

EdgeId MR::EdgePoint::e

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