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