public interface Boundable
Modifier and Type | Method and Description |
---|---|
void |
computeCentroid(Vector3d centroid)
Computed the centroid of this element.
|
double |
computeCovariance(Matrix3d C)
Computes the covariance of the element, assuming a uniform density
of one.
|
Point3d |
getPoint(int idx)
Returns the
idx -th point associated with this element. |
int |
numPoints()
Returns the number of points associated with this element, if any, or
zero otherwise.
|
void |
updateBounds(Vector3d min,
Vector3d max)
Updates the axis-aligned bounds of this element.
|
int numPoints()
Point3d getPoint(int idx)
idx
-th point associated with this element.idx
- index of the point (must be on the range 0 to
numPoints()
).idx
-th point associated with this element.
Must not be modified.void computeCentroid(Vector3d centroid)
centroid
- returns the computed centroid value.void updateBounds(Vector3d min, Vector3d max)
min
and max
should be decreased or increased,
respectively, so that all spatial points associated with this element lie
within the axis-aligned box defined by min
and
max
.min
- minimum values to be updatedmax
- maximum values to be updateddouble computeCovariance(Matrix3d C)
int_V \rho x x^T dV,where
\rho
is the density, x
is any
spatial point within the element, and the integral is evaluated
over the element's spatial extent. The method returns the element's
spatial size, which for elements of dimension 3, 2, 1, or 0 will
be a volume, area, length, or discrete value.
Implementation of this method is optional, with non-implementation indicated by having the method return -1. Non-implementation may prevent the element from being enclosed within certain types of oriented bounding box (OBB) constructions.
C
- returns the covariance