G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsLineSegment< d, T > Class Template Reference

Detailed Description

template<int d, class T>
class gismo::gsLineSegment< d, T >

Represents a line segment in d dimensions.

Public Member Functions

 gsLineSegment (const gsPoint< d, T > &point1, const gsPoint< d, T > &point2)
 Constructs a line segment starting at point1 and ending at point2.
 
bool intersectSegment (const gsPoint< d, T > &origin, const gsPoint< d, T > &end)
 Tells wheter line intersects segment.
 

Member Function Documentation

◆ intersectSegment()

template<int d, class T >
bool intersectSegment ( const gsPoint< d, T > &  origin,
const gsPoint< d, T > &  end 
)
inline

Tells wheter line intersects segment.

This function returns true iff a line between origin and end is intersected by this line.

Parameters
[in]origin
[in]end
Returns
bool value indicating whether segment is intersected or not