OpenLexocad
28.0
|
#include <BoundBox.h>
Public Types | |
enum | OCTANT { OCT_LDB = 0, OCT_RDB, OCT_LUB, OCT_RUB, OCT_LDF, OCT_RDF, OCT_LUF, OCT_RUF } |
enum | SIDE { LEFT =0, RIGHT =1, TOP =2, BOTTOM =3, FRONT =4, BACK =5, INVALID =255 } |
typedef _Precision | num_type |
typedef float_traits< num_type > | traits_type |
Public Member Functions | |
BoundBox3 (_Precision fMinX=std::numeric_limits< _Precision >::max(), _Precision fMinY=std::numeric_limits< _Precision >::max(), _Precision fMinZ=std::numeric_limits< _Precision >::max(), _Precision fMaxX=-std::numeric_limits< _Precision >::max(), _Precision fMaxY=-std::numeric_limits< _Precision >::max(), _Precision fMaxZ=-std::numeric_limits< _Precision >::max()) | |
BoundBox3 (const BoundBox3< _Precision > &rcBB) | |
BoundBox3 (const Vector3< _Precision > *pclVect, unsigned long ulCt) | |
BoundBox3 (const Vector3< _Precision > &rcCnt, _Precision fDistance) | |
~BoundBox3 () | |
BoundBox3< _Precision > & | operator= (const BoundBox3< _Precision > &rcBound) |
Assignment operator. More... | |
bool | Intersect (const BoundBox3< _Precision > &rcBB) const |
bool | operator&& (const BoundBox3< _Precision > &rcBB) const |
bool | Intersect (const BoundBox2d &rcBB) const |
bool | operator&& (const BoundBox2d &rcBB) const |
BoundBox3< _Precision > | Intersected (const BoundBox3< _Precision > &rcBB) const |
BoundBox3< _Precision > | United (const BoundBox3< _Precision > &rcBB) const |
void | Add (const Vector3< _Precision > &rclVect) |
void | Add (const BoundBox3< _Precision > &rcBB) |
bool | IsInBox (const Vector3< _Precision > &rcVct) const |
bool | IsInBox (const BoundBox3< _Precision > &rcBB) const |
bool | IsInBox (const BoundBox2d &rcbb) const |
bool | IsValid (void) const |
bool | GetOctantFromVector (const Vector3< _Precision > &rclVct, OCTANT &rclOctant) const |
BoundBox3< _Precision > | CalcOctant (typename BoundBox3< _Precision >::OCTANT Octant) const |
Vector3< _Precision > | CalcPoint (unsigned short usPoint) const |
void | CalcPlane (unsigned short usPlane, Vector3< _Precision > &rBase, Vector3< _Precision > &rNormal) const |
bool | CalcEdge (unsigned short usEdge, Vector3< _Precision > &rcP0, Vector3< _Precision > &rcP1) const |
bool | IntersectionPoint (const Vector3< _Precision > &rcVct, const Vector3< _Precision > &rcVctDir, Vector3< _Precision > &cVctRes, _Precision epsilon) const |
bool | IsCutLine (const Vector3< _Precision > &rcBase, const Vector3< _Precision > &rcDir, _Precision fTolerance=0.0f) const |
bool | IsCutPlane (const Vector3< _Precision > &rclBase, const Vector3< _Precision > &rclNormal) const |
bool | IntersectWithLine (const Vector3< _Precision > &rcBase, const Vector3< _Precision > &rcDir, Vector3< _Precision > &rcP0, Vector3< _Precision > &rcP1) const |
bool | IntersectPlaneWithLine (unsigned short usSide, const Vector3< _Precision > &rcBase, const Vector3< _Precision > &rcDir, Vector3< _Precision > &rcP0) const |
BoundBox3< _Precision >::SIDE | GetSideFromRay (const Vector3< _Precision > &rclPt, const Vector3< _Precision > &rclDir) const |
BoundBox3< _Precision >::SIDE | GetSideFromRay (const Vector3< _Precision > &rclPt, const Vector3< _Precision > &rclDir, Vector3< _Precision > &rcInt) const |
Vector3< _Precision > | ClosestPoint (const Vector3< _Precision > &rclPt) const |
BoundBox2d | ProjectBox (const ViewProjMethod *rclP) const |
BoundBox3< _Precision > | Transformed (const Matrix4D &mat) const |
Vector3< _Precision > | GetCenter (void) const |
_Precision | CalcDiagonalLength (void) const |
void | SetVoid (void) |
void | Enlarge (_Precision fLen) |
void | Shrink (_Precision fLen) |
_Precision | LengthX (void) const |
_Precision | LengthY (void) const |
_Precision | LengthZ (void) const |
void | MoveX (_Precision f) |
void | MoveY (_Precision f) |
void | MoveZ (_Precision f) |
void | ScaleX (_Precision f) |
void | ScaleY (_Precision f) |
void | ScaleZ (_Precision f) |
void | Print (std::ostream &) const |
Public Attributes | |
_Precision | MinX |
_Precision | MinY |
_Precision | MinZ |
_Precision | MaxX |
_Precision | MaxY |
_Precision | MaxZ |
The 3D bounding box class.
typedef _Precision Base::BoundBox3< _Precision >::num_type |
typedef float_traits<num_type> Base::BoundBox3< _Precision >::traits_type |
enum Base::BoundBox3::OCTANT |
enum Base::BoundBox3::SIDE |
|
inlineexplicit |
Builds box from pairs of x,y,z values.
|
inline |
|
inline |
Builds box from an array of points.
|
inline |
Defines a bounding box around the center rcCnt with the distances fDistance in each coordinate.
|
inline |
|
inline |
Appends the bounding box to this box. The box can grow but not shrink.
|
inline |
Appends the point to the box. The box can grow but not shrink.
|
inline |
Compute the diagonal length of this bounding box.
|
inline |
Calculates the two points of an edge. 0. edge P0-P1 1. edge P1-P2 2. edge P2-P3
|
inline |
|
inline |
Returns the plane of the given side.
|
inline |
Returns the corner point usPoint. 0: front,bottom,left 1: front,bottom,right 2: front,top,right 3: front,top,left 4: back,bottom,left 5: back,bottom,right 6: back,top,right 7: back,top,left
|
inline |
Searches for the closest point of the bounding box.
|
inline |
Enlarges the box with factor fLen.
|
inline |
Returns the center.of the box.
|
inline |
|
inline |
Returns the side of the bounding box the ray exits.
|
inline |
Returns the side of the bounding box the ray exits.
|
inline |
Checks for intersection.
|
inline |
Methods for intersection, cutting and union of bounding boxes Checks for intersection.
|
inline |
Computes the intersection between two bounding boxes. The result is also a bounding box.
|
inline |
Intersection point of an inner search ray with the bounding box, built of the base rcVct and the direction rcVctDir. rcVct must lie inside the bounding box.
|
inline |
Computes the intersection point of line and a plane of the bounding box.
|
inline |
Computes the intersection points of line and bounding box.
|
inline |
Checks for intersection with line incl. search tolerance.
|
inline |
Checks if this plane specified by (point,normal) cuts this box.
|
inline |
Checks if this 2D box lies inside the box.
|
inline |
Checks if this 3D box lies inside the box.
|
inline |
Test methods Checks if this point lies inside the box.
|
inline |
Checks whether the bounding box is valid.
|
inline |
Calculates expansion in x-direction.
|
inline |
Calculates expansion in y-direction.
|
inline |
Calculates expansion in z-direction.
|
inline |
Moves in x-direction.
|
inline |
Moves in y-direction.
|
inline |
Moves in z-direction.
|
inline |
Checks for intersection.
|
inline |
Checks for intersection.
|
inline |
Assignment operator.
void Base::BoundBox3< _Precision >::Print | ( | std::ostream & | ) | const |
Prints the values to stream.
|
inline |
Projects the box onto a plane and returns a 2D box.
|
inline |
Scales in x-direction.
|
inline |
Scales in y-direction.
|
inline |
Scales in z-direction.
|
inline |
|
inline |
Shrinks the box with factor fLen.
|
inline |
Transform the corners of this box with the given matrix and create a new bounding box.
|
inline |
The union of two bounding boxes.
_Precision Base::BoundBox3< _Precision >::MaxX |
_Precision Base::BoundBox3< _Precision >::MaxY |
_Precision Base::BoundBox3< _Precision >::MaxZ |
_Precision Base::BoundBox3< _Precision >::MinX |
Public attributes
_Precision Base::BoundBox3< _Precision >::MinY |
_Precision Base::BoundBox3< _Precision >::MinZ |