Ipelib

ipe::Line Class Reference

A directed line. More...

#include <ipegeo.h>

List of all members.

Public Member Functions

Static Public Member Functions

Public Attributes


Detailed Description

A directed line.


Constructor & Destructor Documentation

ipe::Line::Line ( ) [inline, explicit]

Create default line (x-axis).

Line::Line ( const Vector p,
const Vector dir 
) [explicit]

Construct a line from p with direction dir.

Asserts unit length of dir.


Member Function Documentation

Line Line::through ( const Vector p,
const Vector q 
) [static]

Construct a line through two points.

double Line::side ( const Vector p) const

Result is > 0, = 0, < 0 if point lies to the left, on, to the right.

Vector ipe::Line::normal ( ) const [inline]

Return a normal vector pointing to the left of the directed line.

double Line::distance ( const Vector v) const

Returns distance between line and v.

bool Line::intersects ( const Line line,
Vector pt 
)

Does this line intersect line? If so, computes intersection point.

Vector Line::project ( const Vector v) const

Orthogonally project point v onto the line.

Vector ipe::Line::dir ( ) const [inline]

Return direction of line.


Member Data Documentation

Point on the line.


The documentation for this class was generated from the following files: