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

A 2D boxThe box is the unit square [0,1]^2 set in the scaled local coordinate system. That is, one corner is at the origin, and it has dimensions [dims.x,dims.y] in the coordinates given by {xbasis,ybasis}. More...

#include <Box2D.h>

Inheritance diagram for Math3D::Box2D:
Math3D::ScaledLocalCoordinates2D Math3D::LocalCoordinates2D

Public Member Functions

void set (const AABB2D &bb)
 
void setTransformed (const AABB2D &box, const RigidTransform2D &T)
 
void setTransformed (const Box2D &box, const RigidTransform2D &T)
 
void setTransformed (const AABB2D &box, Real angle, const Vector2 &offset)
 
void setTransformed (const Box2D &box, Real angle, const Vector2 &offset)
 
bool contains (const Point2D &pt) const
 
Real distance (const Point2D &pt) const
 
Real distance (const Point2D &pt, Point2D &closestPt) const
 
Real distanceSquared (const Point2D &pt, Point2D &closestPt) const
 
Real signedDistance (const Point2D &pt) const
 
Real signedDistance (const Point2D &pt, Point2D &closestPt) const
 
void getAABB (AABB2D &bb) const
 
bool intersects (const AABB2D &b) const
 
bool intersects (const Box2D &b) const
 
bool intersects (const Segment2D &s) const
 
bool intersects (const Line2D &l) const
 
bool intersects (const Triangle2D &t) const
 
bool intersects (const Circle2D &b) const
 
- Public Member Functions inherited from Math3D::ScaledLocalCoordinates2D
void normalize (const Vector2 &, Vector2 &) const
 
void denormalize (const Vector2 &, Vector2 &) const
 
void toLocalNormalized (const Point2D &, Point2D &) const
 
void toLocalNormalized (const Line2D &, Line2D &) const
 
void toLocalNormalized (const Segment2D &, Segment2D &) const
 
void toLocalNormalized (const Plane2D &, Plane2D &) const
 
void fromLocalNormalized (const Point2D &, Point2D &) const
 
void fromLocalNormalized (const Line2D &, Line2D &) const
 
void fromLocalNormalized (const Segment2D &, Segment2D &) const
 
void fromLocalNormalized (const Plane2D &, Plane2D &) const
 
bool Read (File &f)
 
bool Write (File &f) const
 
- Public Member Functions inherited from Math3D::LocalCoordinates2D
void toLocal (const Point2D &, Point2D &) const
 
void toLocalReorient (const Vector2 &, Vector2 &) const
 
void fromLocal (const Point2D &, Point2D &) const
 
void fromLocalReorient (const Vector2 &, Vector2 &) const
 
void toLocal (const Line2D &, Line2D &) const
 
void toLocal (const Segment2D &, Segment2D &) const
 
void toLocal (const Plane2D &, Plane2D &) const
 
void fromLocal (const Line2D &, Line2D &) const
 
void fromLocal (const Segment2D &, Segment2D &) const
 
void fromLocal (const Plane2D &, Plane2D &) const
 
bool Read (File &f)
 
bool Write (File &f) const
 

Additional Inherited Members

- Public Attributes inherited from Math3D::ScaledLocalCoordinates2D
Vector2 dims
 
- Public Attributes inherited from Math3D::LocalCoordinates2D
Vector2 origin
 
Vector2 xbasis
 
Vector2 ybasis
 

Detailed Description

A 2D box

The box is the unit square [0,1]^2 set in the scaled local coordinate system. That is, one corner is at the origin, and it has dimensions [dims.x,dims.y] in the coordinates given by {xbasis,ybasis}.


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