36 template<
typename Type>
39 template<
typename Type>
42 template<
typename Type>
45 template<
typename Type>
48 template<
typename Type>
57 template<
typename Type>
97 template<
typename Type>
Vec2< Type > q
Definition: line_segment.h:105
2D line segment
Definition: line_segment.h:37
Angle class.
Definition: angle.h:59
LineSegment2(const LineSegment2x< int > ©)
Definition: line_segment.h:180
LineSegment3f(const LineSegment3x< float > ©)
Definition: line_segment.h:224
3D line segment - Integer
Definition: line_segment.h:209
LineSegment3()
Definition: line_segment.h:212
LineSegment2x(const Vec2< Type > &point_p, const Vec2< Type > &point_q)
Definition: line_segment.h:109
LineSegment3x()
Definition: line_segment.h:67
LineSegment2x()
Definition: line_segment.h:107
Vec2< Type > get_intersection(const LineSegment2x< Type > &second, bool &intersect) const
Return the intersection point of two lines.
bool operator==(const LineSegment3x< Type > &line) const
== operator.
Definition: line_segment.h:87
bool collinear(const LineSegment2x< Type > &second) const
Return true if two line segments are collinear. (All points are on the same line.) ...
bool operator!=(const LineSegment3x< Type > &line) const
!= operator.
Definition: line_segment.h:90
LineSegment3x(const Vec3< Type > &point_p, const Vec3< Type > &point_q)
Definition: line_segment.h:69
Vec2< Type > normal() const
Return the normal vector of the line from point A to point B.
Vec3< Type > get_midpoint() const
Get the midpoint of this line.
Definition: line_segment.h:74
LineSegment3d(const Vec3< double > &point_p, const Vec3< double > &point_q)
Definition: line_segment.h:236
LineSegment2d(const LineSegment2x< double > ©)
Definition: line_segment.h:202
LineSegment3d(const LineSegment3x< double > ©)
Definition: line_segment.h:235
3D line segment - Float
Definition: line_segment.h:220
LineSegment2x< Type > & clip(const Rectx< Type > &rect, bool &clipped)
Clip this line to a rectangle.
LineSegment2(const Vec2< int > &point_p, const Vec2< int > &point_q)
Definition: line_segment.h:181
LineSegment2x(const LineSegment2x< Type > ©)
Definition: line_segment.h:108
Vec3< Type > q
Definition: line_segment.h:65
LineSegment3f()
Definition: line_segment.h:223
LineSegment3d()
Definition: line_segment.h:234
2D line segment - Double
Definition: line_segment.h:198
LineSegment3x< Type > & operator=(const LineSegment3x< Type > ©)
= operator.
Definition: line_segment.h:84
Vec2< Type > get_midpoint() const
Get the midpoint of this line.
Definition: line_segment.h:114
LineSegment2()
Definition: line_segment.h:179
Vec3< Type > p
Start point on the line.
Definition: line_segment.h:62
2D line segment - Integer
Definition: line_segment.h:176
2D vector
Definition: line.h:46
LineSegment2x< Type > & operator=(const LineSegment2x< Type > ©)
= operator.
Definition: line_segment.h:164
2D (left,top,right,bottom) rectangle structure.
Definition: line.h:43
3D vector
Definition: line_ray.h:46
LineSegment2f(const Vec2< float > &point_p, const Vec2< float > &point_q)
Definition: line_segment.h:192
LineSegment2f(const LineSegment2x< float > ©)
Definition: line_segment.h:191
LineSegment3f(const Vec3< float > &point_p, const Vec3< float > &point_q)
Definition: line_segment.h:225
LineSegment2f()
Definition: line_segment.h:190
3D line segment
Definition: line_segment.h:40
LineSegment3x(const LineSegment3x< Type > ©)
Definition: line_segment.h:68
Vec2< Type > p
Start point on the line.
Definition: line_segment.h:102
LineSegment3(const LineSegment3x< int > ©)
Definition: line_segment.h:213
LineSegment2d()
Definition: line_segment.h:201
Type point_distance(const Vec2< Type > &point)
Return the distance from a point to a line.
Type point_right_of_line(const Vec2< Type > &point) const
Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B.
Definition: line_segment.h:145
Type point_distance(const Vec3< Type > &point, Vec3< Type > &dest_intercept) const
Calculate the distance from a line segment to a point.
bool intersects(const LineSegment2x< Type > &second, bool collinear_intersect) const
Return true if two line segments intersect.
2D line segment - Float
Definition: line_segment.h:187
bool operator==(const LineSegment2x< Type > &line) const
== operator.
Definition: line_segment.h:167
bool operator!=(const LineSegment2x< Type > &line) const
!= operator.
Definition: line_segment.h:170
3D line segment - Double
Definition: line_segment.h:231
LineSegment3(const Vec3< int > &point_p, const Vec3< int > &point_q)
Definition: line_segment.h:214
LineSegment2d(const Vec2< double > &point_p, const Vec2< double > &point_q)
Definition: line_segment.h:203