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

A 2D plane classRepresents plane with a normal and offset such that x on the plane satisfy dot(normal,x) = offset. More...

#include <Plane2D.h>

Public Member Functions

void setPointNormal (const Point2D &a, const Vector2 &n)
 
void setLine (const Line2D &l)
 
void setPoints (const Point2D &a, const Point2D &b)
 
void setTransformed (const Plane2D &pin, const Matrix3 &xform)
 
Real distance (const Point2D &v) const
 
void project (const Point2D &in, Point2D &out) const
 projects onto the plane
 
void getBasis (Vector2 &xb) const
 returns a plane basis vector
 
bool intersectsSegment (const Segment2D &, Real *t)
 
bool intersectsLine (const Line2D &, Real *t)
 
bool intersectsRay (const Ray2D &, Real *t)
 
bool intersects (const AABB2D &) const
 
int allIntersections (const Plane2D &p, Vector2 &pt) const
 
bool Read (File &f)
 
bool Write (File &f) const
 

Public Attributes

Vector2 normal
 
Real offset
 

Detailed Description

A 2D plane class

Represents plane with a normal and offset such that x on the plane satisfy dot(normal,x) = offset.

Member Function Documentation

int Math3D::Plane2D::allIntersections ( const Plane2D p,
Vector2 pt 
) const

returns the dimension of the intersection of the 2 planes.
if 0, they don't intersect, pt is intersection "point at infinty".
1, it's a point returned in pt
2, the planes are identical

References ReadFile(), and WriteFile().


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