![]() |
Polygon Crucher SDK - Documentation
Documentation
|
The class defines a bounding box using int, float or double. More...
The class defines a bounding box using int, float or double.
| TYPE | can be int (C3DBBoxI), float (C3DBBox or C3DBBoxF) or double (C3DBBoxD) |
#include <3DBBox.h>
Public Member Functions | |
| C3DTBBox (const C3DTPoint< TYPE > ¢er, TYPE radius) | |
| C3DTBBox (const C3DTPoint< TYPE > ¢er, TYPE radiusx, TYPE radiusy, TYPE radiusz) | |
| void | Reinit () |
| void | InitDone () |
| void | AddPoint (const C3DTPoint< TYPE > &pt) |
| template<class TYPE2 > | |
| C3DTBBox (const C3DTBBox< TYPE2 > &bbox) | |
| template<class TYPE2 > | |
| C3DTBBox & | operator= (const C3DTBBox< TYPE2 > &bbox) |
| bool | operator== (const C3DTBBox< TYPE > &bbox) const |
| bool | IsInBox (const C3DTPoint< TYPE > &pt, bool strictlyInside=false) const |
| < | |
| C3DTVector< TYPE > | GetDiagonal () const |
| double | GetDiagonalLength () const |
| double | GetRadius () const |
| < | |
| C3DTBBox< TYPE > | GetGreaterUniformBBox () const |
| < | |
| const C3DTPoint< TYPE > & | GetMin () const |
| const C3DTPoint< TYPE > & | GetMax () const |
| void | SetMinMax (const C3DTPoint< TYPE > &min, const C3DTPoint< TYPE > &max) |
| double | GetMinLength () const |
| double | GetMaxLength () const |
| double | GetProjectionDistance (const C3DTPoint< TYPE > &pt) |
| const C3DTPoint< TYPE > | GetProjection (const C3DTPoint< TYPE > &pt) |
| C3DTPoint< TYPE > | GetClosestCorner (const C3DTPoint< TYPE > &pt) const |
| < | |
| bool | GetCenter (C3DTPoint< TYPE > ¢er) const |
| C3DTPoint< TYPE > | GetCenter () const |
| bool | IsNull () const |
| bool | IsInitialized () const |
| < | |
| bool | IsValid () const |
| Invalid bounding box, means that min is greater than max. | |
| void | Inflate (TYPE value) |
| void | Inflate (const C3DTPoint< TYPE > &vector) |
| void | Translate (const C3DTPoint< TYPE > &vector) |
| bool | SelfUnion (const C3DTBBox< TYPE > &bbox) |
| C3DTBBox< TYPE > | Union (const C3DTBBox< TYPE > &bbox) const |
| bool | SelfIntersect (const C3DTBBox< TYPE > &bbox) |
| C3DTBBox< TYPE > | Intersect (const C3DTBBox< TYPE > &bbox) const |
| void | operator*= (const C4x4TMatrix< TYPE > &matrix) |
| bool | RayIntersect (const C3DTPoint< TYPE > &orig, const C3DTVector< TYPE > &dir, double &t) |
| Return true only if ray intersect the bbox which is in front (otherwise dist < 0). | |
| bool | RayIntersect (const C3DTPoint< TYPE > &orig, const C3DTVector< TYPE > &dir, C3DTPoint< TYPE > *hitPt=NULL) |
| C3DTBBox< int > | GetGreaterUniformBBox () const |
<
Returns the closes point of the bbox to the given point
<
Returns a bbox with same sizes on X,Y,Z axys. This bbox contains the referenced bbox
<
Returns the radius of the sphere that contains the whole bbox
|
inline |
<
Returns false if box is invalid or NULL, as it is considered as void box. If strictlyInside, the point cannot be on the box plane
<
Useful to know if the bounding box has been computed
Invalid bounding box, means that min is greater than max.
If init = false, this only means that bounding box is empty, but it is valid. If min == max, then it is valid but null
|
inline |
Return true only if ray intersect the bbox which is in front (otherwise dist < 0).
We can know the contact point using point = orig+dir*t Note: RayIntersect might be called with the negation of a vector. In that case, 0.0 value is supposed to be always position 0 (+0.0), otherwise we can miss an intersection and t will be negative and it should be positive