All Classes |Grouped Classes |Index

Class CL_LineSegment2x

2D line segment More...

Derived from:

None

Derived by:

None

Group:

Math (Core)

#include <ClanLib/core.h>

Class Members:

Attributes:

get_midpoint

Get the midpoint of this line.

point_distance

Return the distance from a point to a line.

collinear

Return true if two line segments are collinear. (All points are on the same line.)

intersects

Return true if two line segments intersect.

get_intersection

Return the intersection point of two lines.

point_right_of_line

Return [<0, 0, >0] if the Point P is right, on or left of the line trough A,B.

normal

Return the normal vector of the line from point A to point B.


Operations:

clip

Clip this line to a rectangle.


Operators:

operator==

== operator.

operator!=

!= operator.

CL_LineSegment2x

Detailed description:

A line segment has a start point and an end pointThese line templates are defined for: int (CL_LineSegment2i), float ( CL_LineSegment2f ), double ( CL_LineSegment2d )