32 #include "../api_core.h"
39 template<
typename Type>
42 template<
typename Type>
45 template<
typename Type>
48 template<
typename Type>
51 template<
typename Type>
60 template<
typename Type>
108 template<
typename Type>
LineSegment2x(const LineSegment2x< Type > ©)
Definition: line_segment.h:119
Vec2< Type > normal() const
Return the normal vector of the line from point A to point B.
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:40
Angle class.
Definition: angle.h:63
LineSegment2(const Vec2< int > &point_p, const Vec2< int > &point_q)
Definition: line_segment.h:205
LineSegment2x()
Definition: line_segment.h:118
3D line segment - Integer
Definition: line_segment.h:233
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:249
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:71
LineSegment3d(const LineSegment3x< double > ©)
Definition: line_segment.h:259
Vec2< Type > p
Start point on the line.
Definition: line_segment.h:113
LineSegment3d()
Definition: line_segment.h:258
Vec2< Type > q
Definition: line_segment.h:116
3D line segment - Float
Definition: line_segment.h:244
LineSegment2d(const LineSegment2x< double > ©)
Definition: line_segment.h:226
LineSegment2d(const Vec2< double > &point_p, const Vec2< double > &point_q)
Definition: line_segment.h:227
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:72
Type x
Definition: vec2.h:82
2D line segment - Double
Definition: line_segment.h:222
bool operator==(const LineSegment2x< Type > &line) const
== operator.
Definition: line_segment.h:190
bool operator==(const LineSegment3x< Type > &line) const
== operator.
Definition: line_segment.h:97
bool operator!=(const LineSegment2x< Type > &line) const
!= operator.
Definition: line_segment.h:193
2D line segment - Integer
Definition: line_segment.h:200
LineSegment2x< Type > & clip(const Rectx< Type > &rect, bool &clipped)
Clip this line to a rectangle.
LineSegment3(const LineSegment3x< int > ©)
Definition: line_segment.h:237
2D vector
Definition: line.h:49
LineSegment3d(const Vec3< double > &point_p, const Vec3< double > &point_q)
Definition: line_segment.h:260
LineSegment3f(const LineSegment3x< float > ©)
Definition: line_segment.h:248
2D (left,top,right,bottom) rectangle structure.
Definition: line.h:46
LineSegment3x< Type > & operator=(const LineSegment3x< Type > ©)
= operator.
Definition: line_segment.h:94
3D vector
Definition: line_ray.h:49
LineSegment2f(const Vec2< float > &point_p, const Vec2< float > &point_q)
Definition: line_segment.h:216
LineSegment2f()
Definition: line_segment.h:214
LineSegment2d()
Definition: line_segment.h:225
LineSegment2(const LineSegment2x< int > ©)
Definition: line_segment.h:204
3D line segment
Definition: line_segment.h:43
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:159
LineSegment2()
Definition: line_segment.h:203
Vec3< Type > get_midpoint() const
Get the midpoint of this line.
Definition: line_segment.h:80
LineSegment3x()
Definition: line_segment.h:70
LineSegment2f(const LineSegment2x< float > ©)
Definition: line_segment.h:215
LineSegment2x(const Vec2< Type > &point_p, const Vec2< Type > &point_q)
Definition: line_segment.h:120
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:247
LineSegment3()
Definition: line_segment.h:236
Vec3< Type > p
Start point on the line.
Definition: line_segment.h:65
LineSegment3(const Vec3< int > &point_p, const Vec3< int > &point_q)
Definition: line_segment.h:238
LineSegment2x< Type > & operator=(const LineSegment2x< Type > ©)
= operator.
Definition: line_segment.h:187
Vec3< Type > q
Definition: line_segment.h:68
Vec2< Type > get_midpoint() const
Get the midpoint of this line.
Definition: line_segment.h:128
2D line segment - Float
Definition: line_segment.h:211
3D line segment - Double
Definition: line_segment.h:255
Type y
Definition: vec2.h:83
bool operator!=(const LineSegment3x< Type > &line) const
!= operator.
Definition: line_segment.h:100