16 [[nodiscard]]
EdgePoint( EdgeId
e,
float a ) :
e(
e ), a( a ) { }
21 [[nodiscard]]
MRMESH_API VertId inVertex(
const MeshTopology & topology )
const;
23 [[nodiscard]]
MRMESH_API VertId inVertex(
const PolylineTopology & topology )
const;
25 [[nodiscard]]
MRMESH_API VertId getClosestVertex(
const MeshTopology & topology )
const;
27 [[nodiscard]]
MRMESH_API VertId getClosestVertex(
const PolylineTopology & topology )
const;
29 [[nodiscard]]
bool inVertex()
const {
return a.inVertex() >= 0; }
33 [[nodiscard]]
MRMESH_API bool isBd(
const MeshTopology & topology,
const FaceBitSet * region =
nullptr )
const;
36 [[nodiscard]]
bool valid()
const {
return e.valid(); }
37 [[nodiscard]]
explicit operator bool()
const {
return e.valid(); }
42 [[nodiscard]]
bool operator==(
const EdgePoint& rhs )
const =
default;
69 [[nodiscard]]
EdgeSegment( EdgeId
e,
float a = 0.0f,
float b = 1.0f ) :
e(
e ),
a(
a ),
b(
b ) { assert( valid() ); };
71 [[nodiscard]] EdgePoint edgePointA()
const {
return {
e,
a }; }
73 [[nodiscard]] EdgePoint edgePointB()
const {
return {
e,
b }; }
75 [[nodiscard]]
bool valid()
const {
return e.valid() &&
a <=
b; }
77 bool operator==(
const EdgeSegment& rhs )
const =
default;
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MREdgePoint.h:50
Definition MREdgePoint.h:11
unsafe void moveToClosestVertex()
new unsafe ref MR.EdgeId e
new unsafe MR.SegmPointf a
new unsafe ref MR.EdgeId e
new unsafe MR.SegmPointf b
Definition MRMesh/MRMeshTopology.h:19
static unsafe bool fromSameTriangle(MR.Const_MeshTopology topology, MR.MeshTriPoint a, MR.MeshTriPoint b)
Definition MRCameraOrientationPlugin.h:8
MRMESH_API bool same(const MeshTopology &topology, const EdgePoint &lhs, const EdgePoint &rhs)
returns true if two edge-points are equal considering different representations