|
| Line2d (GVector::vector2d< num > _p1) |
|
| Line2d (GVector::vector2d< num > _p0, GVector::vector2d< num > _p1) |
|
| Line2d (num p0x, num p0y, num p1x, num p1y) |
|
void | set (GVector::vector2d< num > _p0, GVector::vector2d< num > _p1) |
|
void | set (num p0x, num p0y, num p1x, num p1y) |
|
void | calcValues () const |
| Calculate derived values (dir, perp, angle)
|
|
num | closestDistFromLine (GVector::vector2d< num > p, bool endcaps) |
| Calculate closest distance of p from this line.
|
|
num | distFromLine (GVector::vector2d< num > p, GVector::vector2d< num > rayDir, bool extendLine) |
| Calculate distance of p along the direction rayDir from this line.
|
|
num | distFromLine1 (GVector::vector2d< num > p, num rayDir, bool extendLine) |
| Calculate distance of p along the direction angle rayDir from this line.
|
|
GVector::vector2d< num > | perpFromLine (GVector::vector2d< num > p, bool endcaps) |
| Returns a vector perpendicular to the line, starting from the line, terminating at p.
|
|
bool | liesAlongside (GVector::vector2d< num > p, num margin=0.0) |
| Returns true if p lies along side this line.
|
|
bool | intersects (Line2d< num > l1, bool extendL0, bool extendL1, bool touch) |
| Return true if the line l1 intersects this line. If touch==true then touching counts as intersection.
|
|
bool | intersects (GVector::vector2d< num > p2, GVector::vector2d< num > p3, bool extendL0, bool extendL1, bool touch) |
| Return true if the line joining p2 and p3 intersects this line. If touch==true then touching counts as intersection.
|
|
bool | intersects (GVector::vector2d< num > v, bool extendL0, bool extendL1) |
| Return true if the ray v from origin intersects this line.
|
|
bool | intersects (GVector::vector2d< num > p, GVector::vector2d< num > rayDir, bool touching) |
| Returns true if the ray from p in the direction rayDir intersects the line.
|
|
bool | intersects (GVector::vector2d< num > p, num rayDir) |
| Returns true if the ray from p in the direction angle rayDir intersects the line.
|
|
GVector::vector2d< num > | intersectTest (GVector::vector2d< num > p2, GVector::vector2d< num > p3, bool &intersects, bool extendL0, bool extendL1) |
| Checks if the current line intersects the line joining p2 and p3, and if so, returns the point of intersection.
|
|
GVector::vector2d< num > | intersection (Line2d< num > l1, bool extendL0, bool extendL1) |
| Return the point of intersection of two lines.
|
|
GVector::vector2d< num > | intersection (GVector::vector2d< num > p2, GVector::vector2d< num > p3, bool extendL0, bool extendL1) |
| Return the point of intersection of this line with the line joining p2 and p3.
|
|
Line2d< num > | rotate (GVector::vector2d< num > p, num angle) |
| Rotates the line about point p by given angle.
|
|
GVector::vector2d< num > | project_in (GVector::vector2d< num > p) |
| Projects point p into the coordinate frame attached to the line segment, where the x axis is in the direction of p0 to p1 of the line.
|
|
GVector::vector2d< num > | project_out (GVector::vector2d< num > p) |
| Projects point p from the coordinate frame attached to the line segment to global coordinates.
|
|
char * | ToString (char *str) |
| Returns a string formated representation of the line.
|
|
const GVector::vector2d< num > & | P0 () const |
|
const GVector::vector2d< num > & | P1 () const |
|
const GVector::vector2d< num > & | Dir () const |
|
const GVector::vector2d< num > & | Perp () const |
|
const num | Length () const |
|
const num | Angle () const |
|
Line2d< num > | operator* (num f) const |
| returns this line scaled by f
|
|
Line2d< num > | operator/ (num f) const |
| returns this line scaled by 1/f
|
|
Line2d< num > & | operator*= (num f) |
| scales this line by f
|
|
Line2d< num > & | operator/= (num f) |
| scales this line by 1/f
|
|
Line2d< num > | operator+ (GVector::vector2d< num > v) const |
| returns this line translated by vector v
|
|
Line2d< num > | operator- (GVector::vector2d< num > v) const |
|
Line2d< num > & | operator+= (GVector::vector2d< num > v) |
| translates this line by vector v
|
|
Line2d< num > & | operator-= (GVector::vector2d< num > v) |
|
template<class num>
class Line2d< num >
Definition at line 33 of file line.h.