38 template<
typename Type>
41 template<
typename Type>
44 template<
typename Type>
47 template<
typename Type>
50 template<
typename Type>
59 template<
typename Type>
107 template<
typename Type>
LineSegment2()
Definition: line_segment.h:202
Vec3< Type > q
Definition: line_segment.h:67
LineSegment2f(const Vec2< float > &point_p, const Vec2< float > &point_q)
Definition: line_segment.h:215
LineSegment3x< Type > & operator=(const LineSegment3x< Type > ©)
= operator.
Definition: line_segment.h:93
bool operator==(const LineSegment3x< Type > &line) const
== operator.
Definition: line_segment.h:96
2D line segment - Float
Definition: line_segment.h:211
3D line segment - Double
Definition: line_segment.h:255
Type point_distance(const Vec3< Type > &point, Vec3< Type > &dest_intercept) const
Calculate the distance from a line segment to a point.
Type y
Definition: vec2.h:81
Type point_distance(const Vec2< Type > &point)
Return the distance from a point to a line.
2D (left,top,right,bottom) rectangle structure.
Definition: line.h:45
LineSegment2x(const LineSegment2x< Type > ©)
Definition: line_segment.h:118
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:158
3D line segment - Integer
Definition: line_segment.h:233
2D line segment
Definition: line_segment.h:39
LineSegment2d(const Vec2< double > &point_p, const Vec2< double > &point_q)
Definition: line_segment.h:226
LineSegment3x(const LineSegment3x< Type > ©)
Definition: line_segment.h:70
LineSegment3x(const Vec3< Type > &point_p, const Vec3< Type > &point_q)
Definition: line_segment.h:71
LineSegment3d()
Definition: line_segment.h:257
Type x
Definition: vec2.h:80
LineSegment3(const LineSegment3x< int > ©)
Definition: line_segment.h:236
Vec2< Type > p
Start point on the line.
Definition: line_segment.h:112
Vec2< Type > q
Definition: line_segment.h:115
Vec2< Type > normal() const
Return the normal vector of the line from point A to point B.
Angle class.
Definition: angle.h:63
Vec2< Type > get_midpoint() const
Get the midpoint of this line.
Definition: line_segment.h:127
bool intersects(const LineSegment2x< Type > &second, bool collinear_intersect) const
Return true if two line segments intersect.
bool operator!=(const LineSegment2x< Type > &line) const
!= operator.
Definition: line_segment.h:192
2D vector
Definition: line.h:48
LineSegment3f(const LineSegment3x< float > ©)
Definition: line_segment.h:247
Vec3< Type > p
Start point on the line.
Definition: line_segment.h:64
LineSegment3(const Vec3< int > &point_p, const Vec3< int > &point_q)
Definition: line_segment.h:237
LineSegment3x()
Definition: line_segment.h:69
Vec3< Type > get_midpoint() const
Get the midpoint of this line.
Definition: line_segment.h:79
LineSegment3f(const Vec3< float > &point_p, const Vec3< float > &point_q)
Definition: line_segment.h:248
bool operator!=(const LineSegment3x< Type > &line) const
!= operator.
Definition: line_segment.h:99
3D line segment - Float
Definition: line_segment.h:244
LineSegment2f()
Definition: line_segment.h:213
LineSegment3()
Definition: line_segment.h:235
2D line segment - Integer
Definition: line_segment.h:200
LineSegment2d(const LineSegment2x< double > ©)
Definition: line_segment.h:225
LineSegment2f(const LineSegment2x< float > ©)
Definition: line_segment.h:214
2D line segment - Double
Definition: line_segment.h:222
bool operator==(const LineSegment2x< Type > &line) const
== operator.
Definition: line_segment.h:189
LineSegment2x< Type > & clip(const Rectx< Type > &rect, bool &clipped)
Clip this line to a rectangle.
LineSegment2(const LineSegment2x< int > ©)
Definition: line_segment.h:203
LineSegment2x()
Definition: line_segment.h:117
LineSegment3f()
Definition: line_segment.h:246
LineSegment2d()
Definition: line_segment.h:224
LineSegment2(const Vec2< int > &point_p, const Vec2< int > &point_q)
Definition: line_segment.h:204
LineSegment2x(const Vec2< Type > &point_p, const Vec2< Type > &point_q)
Definition: line_segment.h:119
3D vector
Definition: line_ray.h:48
3D line segment
Definition: line_segment.h:42
LineSegment3d(const Vec3< double > &point_p, const Vec3< double > &point_q)
Definition: line_segment.h:259
Vec2< Type > get_intersection(const LineSegment2x< Type > &second, bool &intersect) const
Return the intersection point of two lines.
bool collinear(const LineSegment2x< Type > &second) const
Return true if two line segments are collinear. (All points are on the same line.)
LineSegment3d(const LineSegment3x< double > ©)
Definition: line_segment.h:258
LineSegment2x< Type > & operator=(const LineSegment2x< Type > ©)
= operator.
Definition: line_segment.h:186