KrisLibrary  1.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Math3D::Segment2D Struct Reference

A 2D segment class. More...

#include <Segment2D.h>

Public Member Functions

void setTransformed (const Segment2D &, const Matrix3 &xform)
 
void getLine (Line2D &l) const
 
Real closestPointParameter (const Point2D &in) const
 
Real closestPoint (const Point2D &in, Point2D &out) const
 
Real distance (const Point2D &pt) const
 
void eval (Real t, Point2D &out) const
 
Real orientation (const Point2D &p) const
 >0 for left, <0 for right
 
bool isLeft (const Point2D &p) const
 p left of A->B
 
bool isRight (const Point2D &p) const
 p right of A->B
 
bool intersects (const Segment2D &S) const
 
bool intersects (const Vector2 &a, const Vector2 &b) const
 
bool intersects (const Segment2D &S, Vector2 &p) const
 
bool intersects (const Vector2 &a, const Vector2 &b, Vector2 &p) const
 
bool Read (File &f)
 
bool Write (File &f) const
 
void getAABB (AABB2D &) const
 
bool intersects (const AABB2D &) const
 
bool intersects (const AABB2D &, Real &tmin, Real &tmax) const
 given bounds [tmin,tmax] of the segment, returns the clipping min/max
 
Real distance (const AABB2D &) const
 
Real distance (const AABB2D &, Real &tmin) const
 

Static Public Member Functions

static Real orientation (const Point2D &a, const Point2D &b, const Point2D &x)
 orientation of x vs a,b
 

Public Attributes

Point2D a
 
Point2D b
 

Detailed Description

A 2D segment class.

Represented by the endpoints a and b. Is parameterized by t in [0,1] going from a->b as t approaches 1.


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