G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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. More...
 

Member Function Documentation

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