KrisLibrary
1.0.0
|
A 3D boxThe box is the unit cube [0,1]^3 set in the scaled local coordinate system. That is, one corner is at the origin, and it has dimensions [dims.x,dims.y,dims.z] in the coordinates given by {xbasis,ybasis,zbasis}. More...
#include <Box3D.h>
Public Member Functions | |
Vector3 | center () const |
void | setCenter (const Vector3 &c) |
void | set (const AABB3D &bb) |
void | setTransformed (const AABB3D &box, const RigidTransform &T) |
void | setTransformed (const Box3D &box, const RigidTransform &T) |
bool | contains (const Point3D &pt) const |
Real | distance (const Point3D &pt) const |
Real | distance (const Point3D &pt, Point3D &closestPt) const |
Real | distanceSquared (const Point3D &pt, Point3D &closestPt) const |
Real | signedDistance (const Point3D &pt) const |
Real | signedDistance (const Point3D &pt, Point3D &surfacePt) const |
void | getAABB (AABB3D &bb) const |
bool | intersects (const AABB3D &b) const |
bool | intersects (const Box3D &b) const |
bool | intersectsApprox (const Box3D &b) const |
faster, approximate version | |
bool | intersects (const Segment3D &s) const |
bool | intersects (const Line3D &l) const |
bool | intersects (const Triangle3D &t) const |
bool | intersects (const Sphere3D &b) const |
Public Member Functions inherited from Math3D::ScaledLocalCoordinates3D | |
void | getBasisScaled (Matrix4 &) const |
void | getBasisScaledInv (Matrix4 &) const |
void | normalize (const Vector3 &, Vector3 &) const |
void | denormalize (const Vector3 &, Vector3 &) const |
void | toLocalNormalized (const Point3D &, Point3D &) const |
void | toLocalNormalized (const Line3D &, Line3D &) const |
void | toLocalNormalized (const Segment3D &, Segment3D &) const |
void | toLocalNormalized (const Plane3D &, Plane3D &) const |
void | fromLocalNormalized (const Point3D &, Point3D &) const |
void | fromLocalNormalized (const Line3D &, Line3D &) const |
void | fromLocalNormalized (const Segment3D &, Segment3D &) const |
void | fromLocalNormalized (const Plane3D &, Plane3D &) const |
bool | Read (File &f) |
bool | Write (File &f) const |
Public Member Functions inherited from Math3D::LocalCoordinates3D | |
void | getBasis (Matrix4 &) const |
void | getBasisInv (Matrix4 &) const |
void | getTransform (RigidTransform &) const |
void | getTransformInv (RigidTransform &) const |
void | toLocal (const Point3D &, Point3D &) const |
void | toLocalReorient (const Vector3 &, Vector3 &) const |
void | fromLocal (const Point3D &, Point3D &) const |
void | fromLocalReorient (const Vector3 &, Vector3 &) const |
void | toLocal (const Line3D &, Line3D &) const |
void | toLocal (const Segment3D &, Segment3D &) const |
void | toLocal (const Plane3D &, Plane3D &) const |
void | fromLocal (const Line3D &, Line3D &) const |
void | fromLocal (const Segment3D &, Segment3D &) const |
void | fromLocal (const Plane3D &, Plane3D &) const |
bool | Read (File &f) |
bool | Write (File &f) const |
Additional Inherited Members | |
Public Attributes inherited from Math3D::ScaledLocalCoordinates3D | |
Vector3 | dims |
Public Attributes inherited from Math3D::LocalCoordinates3D | |
Vector3 | origin |
Vector3 | xbasis |
Vector3 | ybasis |
Vector3 | zbasis |
A 3D box
The box is the unit cube [0,1]^3 set in the scaled local coordinate system. That is, one corner is at the origin, and it has dimensions [dims.x,dims.y,dims.z] in the coordinates given by {xbasis,ybasis,zbasis}.