TIntrSegment2Segment2

Ported from WildMagic5

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Intersection/IntrSegment2Segment2.h

Include

#include "Intersection/IntrSegment2Segment2.h"

Syntax

template<typename RealType>
class TIntrSegment2Segment2

Remarks

Ported from WildMagic5

RealType IntervalThreshold The intersection testing uses the center-extent form for line segments. If you start with endpoints (Vector2<Real>) and create Segment2<Real> objects, the conversion to center-extent form can contain small numerical round-off errors. Testing for the intersection of two segments that share an endpoint might lead to a failure due to the round-off errors. To allow for this, you may specify a small positive threshold that slightly enlarges the intervals for the segments. The default value is zero.

RealType DotThreshold The computation for determining whether the linear components are parallel might contain small floating-point round-off errors. The default threshold is TMathUtil<RealType>::ZeroTolerance. If you set the value, pass in a nonnegative number.

The intersection set: Let q = Quantity. The cases are

q = 0: The segments do not intersect. Type is Empty

q = 1: The segments intersect in a single point. Type is Point Intersection point is Point0.

q = 2: The segments are collinear and intersect in a segment. Type is Segment. Points are Point0 and Point1 Calculate intersection between two 2D line segments

Variables

Name Description

Protected variable

RealType

 

DotThreshold

Protected variable

RealType

 

IntervalThreshold

Public variable

RealType

 

Parameter0

Public variable

RealType

 

Parameter1

Public variable

FVector2< RealT...

 

Point0

These values are all on segment 1, unlike many other tests!!

Public variable

FVector2< RealT...

 

Point1

Public variable

int

 

Quantity

Outputs

Public variable

EIntersectionRe...

 

Result

Protected variable

TSegment2< Real...

 

Segment1

Inputs

Protected variable

TSegment2< Real...

 

Segment2

Public variable

EIntersectionTy...

 

Type

Constructors

Name Description

Public function

TIntrSegment2Segment2

(
    const TSegment2< RealType >& Segme...,
    const TSegment2< RealType >& Segme...
)

Functions

Name Description

Public function

TIntrSegment...

 

Compute()

Public function

bool

 

Find()

Public function Const

RealType

 

GetDotThreshold()

Public function Const

RealType

 

GetIntervalThreshold()

Public function Const

const TSegme...

 

GetSegment1()

Public function Const

const TSegme...

 

GetSegment2()

Public function Const

bool

 

IsSimpleIntersection()

Protected function

void

 

SanityCheck()

Public function

void

 

SetDotThreshold

(
    RealType Value
)

Public function

void

 

SetIntervalThreshold

(
    RealType Value
)

Public function

void

 

SetSegment1

(
    const TSegment2< RealType >& Value
)

Public function

void

 

SetSegment2

(
    const TSegment2< RealType >& Value
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss