OEBox

class OEBox

OEBox class represents a box aligned to the x, y and z coordinate axis.

Constructors

OEBox()
OEBox(const OEBox&)

Default and copy constructors

operator=

OEBox& operator=(const OEBox& rhs)

Assignment operator

OEBox& operator=(const OEBoxBase& rhs)

Assignment operator for OEBoxBase.

Extend

bool Extend(const float x, const float y, const float z)
bool Extend(const float value)

Extend the box in all dimensions with the specified values. The box is extended simulteneously in both maximum and minimum coordinate directions

GetArea

float GetArea() const

Returns the surface area of the box

GetVolume

float GetVolume() const

Returns the volume of the box

GetXDim

float GetXDim() const

Returns the X dimension value of the box

GetYDim

float GetYDim() const

Returns the Y dimension value of the box

GetZDim

float GetZDim() const

Returns the Z dimension value of the box

GetXMax

float GetXMax() const

Returns the maximum X value of the box

GetYMax

float GetYMax() const

Returns the maximum Y value of the box

GetZMax

float GetZMax() const

Returns the maximum Z value of the box

GetXMid

float GetXMid() const

Returns the midpoint of X dmension of the box

GetYMid

float GetYMid() const

Returns the midpoint of Y dimension of the box

GetZMid

float GetZMid() const

Returns the midpoint of Z dimension of the box

GetXMin

float GetXMin() const

Returns the minimum X value of the box

GetYMin

float GetYMin() const

Returns the minimum Y value of the box

GetZMin

float GetZMin() const

Returns the minimum Z value of the box

IsInside

bool IsInside(const float x, const float y, const float z) const

Returns if the specified point is insize the box

Setup

bool Setup(const float x1, const float y1, const float z1,
           const float x2, const float y2, const float z2)
bool Setup(const float* xyz, const unsigned numPoints, const bool addbox = 0.0f)
bool Setup(const float* center, const float* extents)

Sets up the box.

The first overload expects the maximum and minimum values in all directions. The max and min X values are the max and min of x1, x2 respectively. Minimum and maximum values of Y and Z are selected in an analogous fashion.

The second overload creates a box that encapsulates all the specified data points. The number of values in xyz nust be three times that specified in numPoints. The value in addbox extends the box in all three dimensions with the specified value. The box is extended simulteneously in both maximum and minimum coordinate directions, when specified.

The third overload creates a box with the specified center and extent.