63 #if GEOM_PSEUDO3D==GEOM_TRUE
64 namespace GEOM_FADE25D {
65 #elif GEOM_PSEUDO3D==GEOM_FALSE
66 namespace GEOM_FADE2D {
68 #error GEOM_PSEUDO3D is not defined
71 class SegmentCheckerData;
226 void getIllegalSegments(
bool bAlsoEndPointIntersections,std::vector<Segment2*>& vIllegalSegmentsOut)
const;
253 bool bAlsoEndPointIntersections,
254 std::vector<std::pair<Segment2*,SegmentIntersectionType> >& vIntersectorsOut)
const;
257 #if GEOM_PSEUDO3D==GEOM_TRUE
304 void getIntersectionSegment(
const Segment2& seg0,
377 void addSegments(
const std::vector<Segment2*>& vSegments_);
381 SegmentCheckerData* pSCD;
MsgType
Message types for the message system.
Definition: MsgBase.h:40
SegmentIntersectionType
Enumerates the possible intersection types between two line segments.
Definition: SegmentChecker.h:39
@ SIT_ENDPOINT
Definition: SegmentChecker.h:44
@ SIT_UNINITIALIZED
Definition: SegmentChecker.h:40
@ SIT_NONE
Definition: SegmentChecker.h:41
@ SIT_SEGMENT
Definition: SegmentChecker.h:42
@ SIT_POINT
Definition: SegmentChecker.h:43
ClipResult
Describes the result of clipping a segment with a bounding box.
Definition: SegmentChecker.h:54
@ CR_EMPTY
Definition: SegmentChecker.h:56
@ CR_CLIPPED_NONDEGENERATE
Definition: SegmentChecker.h:58
@ CR_INVALID
Definition: SegmentChecker.h:55
@ CR_COMPLETE_NONDEGENERATE
Definition: SegmentChecker.h:60
@ CR_COMPLETE_DEGENERATE
Definition: SegmentChecker.h:59
@ CR_CLIPPED_DEGENERATE
Definition: SegmentChecker.h:57
A 2D axis-aligned bounding box.
Definition: Bbox2.h:39
MsgBase, a base class for message subscriber classes.
Definition: MsgBase.h:55
Represents a 2D point.
Definition: Point2.h:76
Represents a line segment between two points.
Definition: Segment2.h:41
Identifies intersections between a collection of line segments.
Definition: SegmentChecker.h:88
void showSegments(const char *name) const
Visualizes all segments, both intersecting and non-intersecting.
void setLimit(const Bbox2 &bbx)
Sets the bounding box for segment clipping.
Bbox2 getLimit() const
Retrieves the current bounding box used for clipping.
size_t getNumberOfSegments() const
Returns the total number of segments in this SegmentChecker object.
void getIntersectors(Segment2 *pTestSegment, bool bAlsoEndPointIntersections, std::vector< std::pair< Segment2 *, SegmentIntersectionType > > &vIntersectorsOut) const
Gets all segments intersecting a specified segment.
void getIntersectionPoint(SegmentIntersectionType typ, const Segment2 &seg0, const Segment2 &seg1, Point2 &ispOut) const
static const char * getIntersectionTypeString(SegmentIntersectionType sit)
void unsubscribe(MsgType msgType, MsgBase *pMsg)
Unsubscribes a message handler from receiving updates.
void getIntersectionSegment(const Segment2 &seg0, const Segment2 &seg1, Segment2 &issOut) const
void subscribe(MsgType msgType, MsgBase *pMsg)
Subscribes a message handler to receive progress updates.
int getIndex(Segment2 *pSeg) const
Retrieves the index of a given segment.
SegmentIntersectionType getIntersectionType(const Segment2 *pSeg1, const Segment2 *pSeg2) const
Determines the intersection type of two segments.
Segment2 * getSegment(size_t i) const
Gets the segment at the specified index.
SegmentChecker(const std::vector< Segment2 * > &vSegments_)
Constructor to initialize the SegmentChecker with a collection of segments.
void showIllegalSegments(bool bAlsoEndPointIntersections, const char *name) const
Visualizes only the intersecting segments.
ClipResult clipSegment(Segment2 &seg)
Clips a segment to the intersection with a bounding box.
void getIllegalSegments(bool bAlsoEndPointIntersections, std::vector< Segment2 * > &vIllegalSegmentsOut) const