KrisLibrary
1.0.0
|
A 3D plane classRepresents plane with a normal and offset such that x on the plane satisfy dot(normal,x) = offset. More...
#include <Plane3D.h>
Public Member Functions | |
void | setPointNormal (const Point3D &a, const Vector3 &n) |
void | setPointBases (const Point3D &a, const Vector3 &b1, const Vector3 &b2) |
void | setPoints (const Point3D &a, const Point3D &b, const Point3D &c) |
void | setTransformed (const Plane3D &pin, const RigidTransform &xform) |
void | setTransformed (const Plane3D &pin, const Matrix4 &xform) |
Real | distance (const Point3D &v) const |
void | project (const Point3D &in, Point3D &out) const |
projects onto the plane | |
void | getBasis (Vector3 &xb, Vector3 &yb) const |
returns a basis of the plane | |
bool | intersectsSegment (const Segment3D &, Real *t) |
bool | intersectsLine (const Line3D &, Real *t) |
bool | intersectsRay (const Ray3D &, Real *t) |
bool | intersects (const AABB3D &) const |
bool | intersectsInterior (const AABB3D &) const |
void | distanceLimits (const AABB3D &, Real &dmin, Real &dmax) const |
calculates min/max bbox distances | |
int | allIntersections (const Plane3D &p, Line3D &l) const |
bool | Read (File &f) |
bool | Write (File &f) const |
void | Print (std::ostream &out) const |
Public Attributes | |
Vector3 | normal |
Real | offset |
A 3D plane class
Represents plane with a normal and offset such that x on the plane satisfy dot(normal,x) = offset.
returns the dimension of the intersection of the 2 planes.
if 0, they don't intersect.
1, it's a line returned in l
2, the planes are identitcal
References Math::FuzzyEquals(), and Math::LinearlyDependent_Robust().
Referenced by Math3D::Circle3D::closestPoint().