![]() |
TrinityCore
|
An arbitrary (oriented) 3D box, useful as a bounding box. More...
#include <Box.h>
Static Public Member Functions | |
| static Box | inf () |
Private Member Functions | |
| void | init (const Vector3 &min, const Vector3 &max) |
Private Attributes | |
| Vector3 | _edgeVector [3] |
| Point3 | _center |
| float | _area |
| float | _volume |
Static Private Attributes | |
| static int32 | dummy = 0 |
Friends | |
| class | CoordinateFrame |
An arbitrary (oriented) 3D box, useful as a bounding box.
To construct a box from a coordinate frame, center and extent, use the idiom: Box box = cframe.toObjectSpace(Box(center - extent/2, center + extent/2));
| G3D::Box::Box | ( | ) |
Here is the caller graph for this function:
Here is the call graph for this function:Constructs a box from two opposite corners.
Here is the call graph for this function:| G3D::Box::Box | ( | class BinaryInput & | b | ) |
Here is the call graph for this function:
Here is the call graph for this function:| float G3D::Box::area | ( | ) | const |
|
inline |
|
inline |
Returns the centroid of the box.
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| Vector3 G3D::Box::corner | ( | int | i | ) | const |
| bool G3D::Box::culledBy | ( | const Array< Plane > & | plane, |
| int32 & | cullingPlaneIndex, | ||
| const uint32 | testMask, | ||
| uint32 & | childMask | ||
| ) | const |
See AABox::culledBy
| bool G3D::Box::culledBy | ( | const Array< Plane > & | plane, |
| int32 & | cullingPlaneIndex = dummy, |
||
| const uint32 | testMask = -1 |
||
| ) | const |
Conservative culling test that does not produce a mask for children.
| void G3D::Box::deserialize | ( | class BinaryInput & | b | ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Distance from corner(0) to the next corner along the box's local axis a.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:| void G3D::Box::getBounds | ( | class AABox & | aabb | ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:| void G3D::Box::getFaceCorners | ( | int | f, |
| Vector3 & | v0, | ||
| Vector3 & | v1, | ||
| Vector3 & | v2, | ||
| Vector3 & | v3 | ||
| ) | const |
Returns the four corners of a face (0 <= f < 6). The corners are returned to form a clockwise quad facing outwards.
+--------+ / : /| / : / |
+-----—+ | | : | | | +....|..+ | / | / |/ |/ +-----—+
y ^ | |–>x z/ Faces are in the following order: 0: -Z 1: X 2: Z 3: Y 4: -X 5: -Y
Here is the call graph for this function:
Here is the caller graph for this function:| void G3D::Box::getLocalFrame | ( | CoordinateFrame & | frame | ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:| void G3D::Box::getRandomSurfacePoint | ( | Vector3 & | P, |
| Vector3 & | N = Vector3::ignore() |
||
| ) | const |
Here is the call graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Here is the call graph for this function:
Here is the caller graph for this function:| CoordinateFrame G3D::Box::localFrame | ( | ) | const |
Returns the object to world transformation for this box, where the origin is the center of the box. localFrame().worldToObject(...) takes objects into the space where the box axes are (1,0,0), (0,1,0), (0,0,1). Note that there is no scaling in this transformation.
Here is the call graph for this function:| Box G3D::Box::operator* | ( | float | f | ) | const |
Here is the call graph for this function:| Vector3 G3D::Box::randomInteriorPoint | ( | ) | const |
Uniformly distributed on the interior (includes surface)
Here is the call graph for this function:| void G3D::Box::serialize | ( | class BinaryOutput & | b | ) | const |
Here is the call graph for this function:| Any G3D::Box::toAny | ( | ) | const |
Here is the call graph for this function:| float G3D::Box::volume | ( | ) | const |
|
friend |
|
private |
|
private |
|
private |
Axes with length equal to the 4 edges that run along each of them
|
private |
|
staticprivate |
1.8.8