public static class MFreeModel3d.MFreeRestNode3d extends java.lang.Object implements Boundable
Constructor and Description |
---|
MFreeRestNode3d(MFreeNode3d node) |
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.
|
MFreeNode3d |
getNode() |
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.
|
public MFreeRestNode3d(MFreeNode3d node)
public int numPoints()
Boundable
public Point3d getPoint(int idx)
Boundable
idx
-th point associated with this element.getPoint
in interface Boundable
idx
- index of the point (must be on the range 0 to
Boundable.numPoints()
).idx
-th point associated with this element.
Must not be modified.public void computeCentroid(Vector3d centroid)
Boundable
computeCentroid
in interface Boundable
centroid
- returns the computed centroid value.public void updateBounds(Vector3d min, Vector3d max)
Boundable
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
.updateBounds
in interface Boundable
min
- minimum values to be updatedmax
- maximum values to be updatedpublic double computeCovariance(Matrix3d C)
Boundable
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.
computeCovariance
in interface Boundable
C
- returns the covariancepublic MFreeNode3d getNode()