artisynth.core.femmodels
Class FemElement3d

java.lang.Object
  extended by artisynth.core.modelbase.ModelComponentBase
      extended by artisynth.core.modelbase.RenderableComponentBase
          extended by artisynth.core.femmodels.FemElement
              extended by artisynth.core.femmodels.FemElement3d
All Implemented Interfaces:
CopyableComponent, ModelComponent, RenderableComponent, PropertyChangeListener, ScalableUnits, java.lang.Cloneable, Boundable, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable
Direct Known Subclasses:
HexElement, PyramidElement, QuadhexElement, QuadpyramidElement, QuadtetElement, QuadwedgeElement, TetElement, WedgeElement

public abstract class FemElement3d
extends FemElement
implements Boundable


Nested Class Summary
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent
ModelComponent.NavpanelVisibility
 
Field Summary
static PropertyList myProps
           
 
Fields inherited from class artisynth.core.modelbase.ModelComponentBase
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
 
Fields inherited from interface artisynth.core.modelbase.CopyableComponent
COPY_REFERENCES
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
FemElement3d()
           
 
Method Summary
 void addAuxiliaryMaterial(AuxiliaryMaterial mat)
           
 void addNodeForce(Vector3d f, int i, boolean corotated)
           
 void addNodeForce0(Vector3d f, int i, boolean corotated)
           
 void addNodeForce0(VectorNd f, int offset, int i, boolean corotated)
           
 void addNodeStiffness(int i, int j, boolean corotated)
           
 void addNodeStiffness(Matrix3d Kij, int i, int j, boolean corotated)
           
 void clearState()
           
 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.
 double computeDirectedRenderSize(Vector3d dir)
           
 VectorNd computeGravityWeights()
           
 void computePressures(double[] pressures, IncompressibleMaterial imat)
           
 void computeRenderCoordsAndGradient(Matrix3d F, float[] coords)
          Computes the current coordinates and deformation gradient at the warping point, using render coordinates.
 double computeRestVolumes()
          Default method to compute the element rest volume and partial volumes.
 double computeVolumes()
          Default method to compute an element's volume and partial volumes.
 void computeWarping()
           
 void computeWarping(Matrix3d F, SymmetricMatrix3d P)
           
 void connectToHierarchy()
          Called by the system after this component is added to the component hierarchy (i.e., when it is added as a child of another CompositeComponent).
abstract  boolean coordsAreInside(Vector3d coords)
           
 FemElement3d copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
          Create a copy of this component.
static FemElement3d createElement(FemNode3d[] nodes)
           
static FemElement3d createElement(FemNode3d[] nodes, boolean flipped)
           
static IntegrationPoint3d[] createIntegrationPoints(FemElement3d exampleElem, double[] cdata)
           
 void disconnectFromHierarchy()
          Called by the system after this component is removed from the component hierarchy (i.e., when it is removed as a child of its parent).
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 AuxiliaryMaterial[] getAuxiliaryMaterials()
           
 boolean getCopyReferences(java.util.List<ModelComponent> refs, ModelComponent ancestor)
          Collects external references which must also be copied in order to duplicate this component.
abstract  void getdNds(Vector3d dNds, int i, Vector3d coords)
           
abstract  int[] getEdgeIndices()
           
 double getElementWidgetSize()
           
 PropertyMode getElementWidgetSizeMode()
           
abstract  int[] getFaceIndices()
           
 Matrix3d getFrame()
           
 double getH(int i, Vector3d coords)
          Returns the value of the pressure shape function.
 MatrixBlock[] getIncompressConstraints()
          Returns an array of MatrixBlocks to be used as constraints to make the element incompressible.
 int getIncompressIndex()
           
abstract  double[] getIntegrationCoords()
           
 IntegrationData3d[] getIntegrationData()
           
abstract  IntegrationPoint3d[] getIntegrationPoints()
           
 void getMarkerCoordinates(VectorNd coords, Point3d pnt)
           
abstract  double getN(int i, Vector3d coords)
           
 boolean getNaturalCoordinates(Vector3d coords, Point3d pnt)
          Given point p, get its natural coordinates with respect to this element.
 boolean getNaturalCoordinatesRobust(Vector3d coords, Point3d pnt, int maxIters)
          Given point p, get its natural coordinates with respect to this element.
abstract  double[] getNodalExtrapolationMatrix()
           
abstract  double[] getNodeCoords()
           
 void getNodeCoords(Vector3d coords, int nodeIdx)
           
 FemNode3d[] getNodes()
           
 int getNumEdges()
           
 int getNumFaces()
           
 Point3d getPoint(int idx)
          Returns the idx-th point associated with this element.
 Matrix getPressureWeightMatrix()
          Returns the pressure weight matrix for this element.
 FaceNodes3d[] getTriFaces()
          Returns an array of FaceNodes3d describing a set of triangular faces associated with this element.
 IntegrationData3d getWarpingData()
           
abstract  IntegrationPoint3d getWarpingPoint()
           
 boolean hasEdge(FemNode3d n0, FemNode3d n1)
           
 boolean hasFace(FemNode3d n0, FemNode3d n1, FemNode3d n2)
           
 boolean hasFace(FemNode3d n0, FemNode3d n1, FemNode3d n2, FemNode3d n3)
           
 void invalidateRestData()
          Invalidate data that relies on the element's rest position, such as rest Jacobians and the base stiffness for co-rotated stiffness.
 boolean isInside(Point3d pnt)
          Tests whether or not a point is inside an element.
 boolean isInvertedAtRest()
          Returns true if the rest position for this element results in a negative Jacobian determinant for at least one integration point.
 boolean materialsAreInvertible()
          Return true if the effective material for this element, and all auxiliary materials, are defined for non-positive deformation gradients.
 int numAuxiliaryMaterials()
           
abstract  int numIntegrationPoints()
           
 int numPoints()
          Returns the number of points associated with this element, if any, or zero otherwise.
 int numPressureVals()
          Returns the number of pressure variables associated with this element.
 boolean removeAuxiliaryMaterial(AuxiliaryMaterial mat)
           
 void render(GLRenderer renderer, int flags)
          Render this object using Open GL via the JOGL.
 void render(GLRenderer renderer, RenderProps rprops, int flags)
           
 void renderEdges(GLRenderer renderer, RenderProps props)
           
 void renderWidget(GLRenderer renderer, double scale, int[] trifaces, RenderProps props)
          Helper method to render an element widget by drawing a set of triangular faces formed from the element nodes.
 void renderWidget(GLRenderer renderer, double size, RenderProps props)
           
 void renderWidget(GLRenderer renderer, RenderProps props)
           
 void renderWidgetEdges(GLRenderer renderer, double size, RenderProps props)
           
 void renderWidgetEdges(GLRenderer renderer, RenderProps props)
           
 void scaleDistance(double s)
          Scales all distance coordinates.
 void setElementWidgetSize(double size)
           
 void setElementWidgetSizeMode(PropertyMode mode)
           
 void setFrame(Matrix3dBase M)
          Set reference frame information for this element.
 void setIncompressIndex(int idx)
           
 FemNode3d[][] triangulateFace(FaceNodes3d face)
           
 void updateBounds(Point3d pmin, Point3d pmax)
          Update the minimum and maximum points for this object.
 void updateWarpingStiffness()
           
 
Methods inherited from class artisynth.core.femmodels.FemElement
containsNode, createRenderProps, getDensity, getDensityMode, getEffectiveMaterial, getHardReferences, getIndex, getLocalNodeIndex, getMass, getMaterial, getRestVolume, getSelection, getVolume, hasActiveNodes, hasControllableNodes, integrationPointsMapToNodes, isDuplicatable, isInverted, numberString, numNodes, prerender, propertyChanged, scaleMass, setDensity, setDensityMode, setIndex, setInverted, setMass, setMaterial, updateNodeMasses
 
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase
getRenderHints, getRenderProps, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateRenderProps
 
Methods inherited from class artisynth.core.modelbase.ModelComponentBase
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface artisynth.core.modelbase.ModelComponent
getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
 
Methods inherited from interface maspack.properties.HasProperties
getProperty
 
Methods inherited from interface maspack.properties.HierarchyNode
getChildren, hasChildren
 
Methods inherited from interface maspack.util.Scannable
isWritable, write
 

Field Detail

myProps

public static PropertyList myProps
Constructor Detail

FemElement3d

public FemElement3d()
Method Detail

getAllPropertyInfo

public PropertyList getAllPropertyInfo()
Description copied from interface: HasProperties
Returns a list giving static information about all properties exported by this object.

Specified by:
getAllPropertyInfo in interface HasProperties
Overrides:
getAllPropertyInfo in class FemElement
Returns:
static information for all exported properties

setElementWidgetSize

public void setElementWidgetSize(double size)

getElementWidgetSize

public double getElementWidgetSize()

setElementWidgetSizeMode

public void setElementWidgetSizeMode(PropertyMode mode)

getElementWidgetSizeMode

public PropertyMode getElementWidgetSizeMode()

getNodes

public FemNode3d[] getNodes()
Specified by:
getNodes in class FemElement

getIncompressIndex

public int getIncompressIndex()

setIncompressIndex

public void setIncompressIndex(int idx)

numPressureVals

public int numPressureVals()
Returns the number of pressure variables associated with this element. All of the linear elements have one pressure variable, whereas some of the quadratic elements have more.

Returns:
number of pressure variables.make

getH

public double getH(int i,
                   Vector3d coords)
Returns the value of the pressure shape function. By default, this method returns 1, corresponding to a single pressure variable with constant value over the entire element. Elements with a larger number of pressure DOFs should override this method to supply the appropriate shape functions.

Parameters:
i - index of the pressure variable; should be less than the value returned by numPressureVals()
coords - coordinates at which the shape function should be evaluated.

getPressureWeightMatrix

public Matrix getPressureWeightMatrix()
Returns the pressure weight matrix for this element. The pressure weight matrix is given by the inverse of the integral of H^T H, where H is the row vector formed from the pressure shape functions.

By default, this method returns a pressure weight matrix for the case where there is only one pressure value. Such matrices always have a single value of 1. Elements with a larger number of pressure values should override this method to return a pressure weight matrix appropriate for that element.


getIncompressConstraints

public MatrixBlock[] getIncompressConstraints()
Returns an array of MatrixBlocks to be used as constraints to make the element incompressible. Note this method does not compute values for these constraints; it only returns storage for them.

There is one block for each node, with each of size 3 x m, where m is the number of pressure degrees-of-freedom (returned by numPressureVals().

Returns:
incompressibility constraints

isInside

public boolean isInside(Point3d pnt)
Tests whether or not a point is inside an element.

Parameters:
pnt - point to check if is inside
Returns:
true if point is inside the element

isInvertedAtRest

public boolean isInvertedAtRest()
Returns true if the rest position for this element results in a negative Jacobian determinant for at least one integration point. This method should be used sparingly since it is computes this result from scratch.

Returns:
true if the rest position is inverted.

getNumEdges

public int getNumEdges()

getNumFaces

public int getNumFaces()

getTriFaces

public FaceNodes3d[] getTriFaces()
Returns an array of FaceNodes3d describing a set of triangular faces associated with this element. If adjoining elements have matching triangular faces, then the elimination of repeated faces can be used to generate an external mesh for the FEM. If the returned list has zero length, then this method is not supported for the element in question.

Returns:
list of triangular faces for this element

triangulateFace

public FemNode3d[][] triangulateFace(FaceNodes3d face)

computeCentroid

public void computeCentroid(Vector3d centroid)
Description copied from interface: Boundable
Computed the centroid of this element.

Specified by:
computeCentroid in interface Boundable
Parameters:
centroid - returns the computed centroid value.

computeCovariance

public double computeCovariance(Matrix3d C)
Description copied from interface: Boundable
Computes the covariance of the element, assuming a uniform density of one. The covariance is defined as
 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.

Specified by:
computeCovariance in interface Boundable
Parameters:
C - returns the covariance
Returns:
spatial size of the element, or -1 if this method is not implemented.

updateBounds

public void updateBounds(Point3d pmin,
                         Point3d pmax)
Description copied from interface: GLRenderable
Update the minimum and maximum points for this object. In an x-y-z coordinate system with x directed to the right and y directed upwards, the minimum and maximum points can be thought of as defining the left-lower-far and right-upper-near corners of a bounding cube. This method should only reduce the elements of the minimum point and increase the elements of the maximum point, since it may be used as part of an iteration to determine the bounding cube for several different objects.

Specified by:
updateBounds in interface Boundable
Specified by:
updateBounds in interface GLRenderable
Overrides:
updateBounds in class FemElement
Parameters:
pmin - minimum point
pmax - maximum point

numIntegrationPoints

public abstract int numIntegrationPoints()

getIntegrationCoords

public abstract double[] getIntegrationCoords()

getNodalExtrapolationMatrix

public abstract double[] getNodalExtrapolationMatrix()

getN

public abstract double getN(int i,
                            Vector3d coords)

getdNds

public abstract void getdNds(Vector3d dNds,
                             int i,
                             Vector3d coords)

getIntegrationPoints

public abstract IntegrationPoint3d[] getIntegrationPoints()

getWarpingPoint

public abstract IntegrationPoint3d getWarpingPoint()

getEdgeIndices

public abstract int[] getEdgeIndices()

getFaceIndices

public abstract int[] getFaceIndices()

getIntegrationData

public IntegrationData3d[] getIntegrationData()

clearState

public void clearState()

getWarpingData

public IntegrationData3d getWarpingData()

createIntegrationPoints

public static IntegrationPoint3d[] createIntegrationPoints(FemElement3d exampleElem,
                                                           double[] cdata)

connectToHierarchy

public void connectToHierarchy()
Description copied from class: ModelComponentBase
Called by the system after this component is added to the component hierarchy (i.e., when it is added as a child of another CompositeComponent). This method is responsible for doing any required hierarchy-dependent initialization.

When this method is called, ModelComponent.getParent() will return the new parent component; the system will have set this beforehand.

Specified by:
connectToHierarchy in interface ModelComponent
Overrides:
connectToHierarchy in class ModelComponentBase

invalidateRestData

public void invalidateRestData()
Description copied from class: FemElement
Invalidate data that relies on the element's rest position, such as rest Jacobians and the base stiffness for co-rotated stiffness.

Overrides:
invalidateRestData in class FemElement

disconnectFromHierarchy

public void disconnectFromHierarchy()
Description copied from class: ModelComponentBase
Called by the system after this component is removed from the component hierarchy (i.e., when it is removed as a child of its parent). This method is responsible for any required hierarchy-dependent deinitialization.

When this method is called, ModelComponent.getParent() will still return this original parent component; the system will set this to null after.

Specified by:
disconnectFromHierarchy in interface ModelComponent
Overrides:
disconnectFromHierarchy in class ModelComponentBase

coordsAreInside

public abstract boolean coordsAreInside(Vector3d coords)

getMarkerCoordinates

public void getMarkerCoordinates(VectorNd coords,
                                 Point3d pnt)
Overrides:
getMarkerCoordinates in class FemElement

getNodeCoords

public abstract double[] getNodeCoords()

getNodeCoords

public void getNodeCoords(Vector3d coords,
                          int nodeIdx)

getNaturalCoordinates

public boolean getNaturalCoordinates(Vector3d coords,
                                     Point3d pnt)
Given point p, get its natural coordinates with respect to this element. Returns true if the natural coordinates indicate that p is inside the element. Uses Newton's method to solve the equations. The coords argument that returned the coordinates is used, on input, to supply an initial guess of the coordinates. Zero is generally a safe guess.

Parameters:
coords - Outputs the natural coordinates, and supplies (on input) an initial guess as to their position.
pnt - A given point.
Returns:
true if the natural coordinates indicate that p is inside the element.

getNaturalCoordinatesRobust

public boolean getNaturalCoordinatesRobust(Vector3d coords,
                                           Point3d pnt,
                                           int maxIters)
Given point p, get its natural coordinates with respect to this element. Returns true if the algorithm converges, false if a maximum number of iterations is reached. Uses a modified Newton's method to solve the equations. The coords argument that returned the coordinates is used, on input, to supply an initial guess of the coordinates. Zero is generally a safe guess.

Parameters:
coords - Outputs the natural coordinates, and supplies (on input) an initial guess as to their position.
pnt - A given point.
maxIters - Maximum number of Newton iterations
Returns:
true if we converged

computeVolumes

public double computeVolumes()
Default method to compute an element's volume and partial volumes. Uses quadrature. If the number of pressure values is 1, then there is only one partial rest volume which is equal to the overall rest volume. The volume at each quadrature point is also stored in the dv field of the elements integration data, for possible future use.

The method should return the minimum Jacobian value found when computing the volume for this element. A negative value indicates element inversion.

Individual elements can override this with a more efficient method if needed.

Specified by:
computeVolumes in class FemElement
Returns:
minimum Jacobian value resulting from volume computation

computePressures

public void computePressures(double[] pressures,
                             IncompressibleMaterial imat)

computeRestVolumes

public double computeRestVolumes()
Default method to compute the element rest volume and partial volumes. Uses quadrature. If the number of pressure values is 1, then there is only one partial rest volume which is equal to the overall rest volume. Individual elements can override this with a more efficient method if needed.

Returns:
element rest volume

addNodeStiffness

public void addNodeStiffness(Matrix3d Kij,
                             int i,
                             int j,
                             boolean corotated)

addNodeStiffness

public void addNodeStiffness(int i,
                             int j,
                             boolean corotated)

addNodeForce

public void addNodeForce(Vector3d f,
                         int i,
                         boolean corotated)

addNodeForce0

public void addNodeForce0(Vector3d f,
                          int i,
                          boolean corotated)

addNodeForce0

public void addNodeForce0(VectorNd f,
                          int offset,
                          int i,
                          boolean corotated)

updateWarpingStiffness

public void updateWarpingStiffness()

materialsAreInvertible

public boolean materialsAreInvertible()
Return true if the effective material for this element, and all auxiliary materials, are defined for non-positive deformation gradients.


computeWarping

public void computeWarping()
Specified by:
computeWarping in class FemElement

computeWarping

public void computeWarping(Matrix3d F,
                           SymmetricMatrix3d P)

renderWidget

public void renderWidget(GLRenderer renderer,
                         double scale,
                         int[] trifaces,
                         RenderProps props)
Helper method to render an element widget by drawing a set of triangular faces formed from the element nodes. Scaling of the widget is obtained by applying a scale transformation about the centroid of the nodes.


renderWidget

public void renderWidget(GLRenderer renderer,
                         RenderProps props)

renderWidget

public void renderWidget(GLRenderer renderer,
                         double size,
                         RenderProps props)

computeDirectedRenderSize

public double computeDirectedRenderSize(Vector3d dir)

computeRenderCoordsAndGradient

public void computeRenderCoordsAndGradient(Matrix3d F,
                                           float[] coords)
Computes the current coordinates and deformation gradient at the warping point, using render coordinates. This is used in element rendering.


render

public void render(GLRenderer renderer,
                   RenderProps rprops,
                   int flags)
Overrides:
render in class FemElement

render

public void render(GLRenderer renderer,
                   int flags)
Description copied from interface: GLRenderable
Render this object using Open GL via the JOGL.

Specified by:
render in interface GLRenderable
Overrides:
render in class FemElement
Parameters:
renderer - renderer object which is used to perform the rendering. Provides pointers to GL and GLU, along with helper functions.
flags - supplies flags that may be used to control different aspects of the rendering. Flags are defined in GLRenderer and currently include GLRenderer.SELECTED, GLRenderer.VERTEX_COLORING, GLRenderer.HSV_COLOR_INTERPOLATION, GLRenderer.SORT_FACES, and GLRenderer.CLEAR_MESH_DISPLAY_LISTS.

hasEdge

public boolean hasEdge(FemNode3d n0,
                       FemNode3d n1)

hasFace

public boolean hasFace(FemNode3d n0,
                       FemNode3d n1,
                       FemNode3d n2)

hasFace

public boolean hasFace(FemNode3d n0,
                       FemNode3d n1,
                       FemNode3d n2,
                       FemNode3d n3)

addAuxiliaryMaterial

public void addAuxiliaryMaterial(AuxiliaryMaterial mat)

removeAuxiliaryMaterial

public boolean removeAuxiliaryMaterial(AuxiliaryMaterial mat)

numAuxiliaryMaterials

public int numAuxiliaryMaterials()

getAuxiliaryMaterials

public AuxiliaryMaterial[] getAuxiliaryMaterials()

renderEdges

public void renderEdges(GLRenderer renderer,
                        RenderProps props)

renderWidgetEdges

public void renderWidgetEdges(GLRenderer renderer,
                              RenderProps props)

renderWidgetEdges

public void renderWidgetEdges(GLRenderer renderer,
                              double size,
                              RenderProps props)

scaleDistance

public void scaleDistance(double s)
Description copied from interface: ScalableUnits
Scales all distance coordinates.

Specified by:
scaleDistance in interface ScalableUnits
Overrides:
scaleDistance in class FemElement
Parameters:
s - scaling factor

getCopyReferences

public boolean getCopyReferences(java.util.List<ModelComponent> refs,
                                 ModelComponent ancestor)
Collects external references which must also be copied in order to duplicate this component. These references should exclude those which are contained within a specified component hierarchy. This method should return true if and only if CopyableComponent.isDuplicatable() returns true.

Specified by:
getCopyReferences in interface CopyableComponent
Overrides:
getCopyReferences in class FemElement
Parameters:
refs - list to which references are appended
ancestor - root node of the hierarchy from which references are to be excluded
Returns:
false if it is discovered that the component cannot be duplicated

setFrame

public void setFrame(Matrix3dBase M)
Set reference frame information for this element. This can be used for computing anisotropic material parameters. In principle, each integration point can have its own frame information, but this method simply sets the same frame information for all the integration points, storing it in each IntegrationData structure. Setting M to null removes the frame information.

Parameters:
M - frame information (is copied by the method)

getFrame

public Matrix3d getFrame()

copy

public FemElement3d copy(int flags,
                         java.util.Map<ModelComponent,ModelComponent> copyMap)
Description copied from interface: CopyableComponent
Create a copy of this component. If COPY_REFERENCES is set in flags, then any component referenced by this component should itself be set to a copy. This should be done first checking copyMap for an existing copy of the referenced component. If there is no existing copy, then a copy should be created by calling copy recursively and adding the new copy to copyMap.

Specified by:
copy in interface CopyableComponent
Overrides:
copy in class FemElement

computeGravityWeights

public VectorNd computeGravityWeights()

createElement

public static FemElement3d createElement(FemNode3d[] nodes,
                                         boolean flipped)

createElement

public static FemElement3d createElement(FemNode3d[] nodes)

numPoints

public int numPoints()
Description copied from interface: Boundable
Returns the number of points associated with this element, if any, or zero otherwise. If the element has points, then it's spatial extent is assumed to be enclosed within their convex hull. At present, elements that do not have points cannot be enclosed within oriented bounding box (OBB) trees.

Specified by:
numPoints in interface Boundable
Returns:
number of points associated with this element

getPoint

public Point3d getPoint(int idx)
Description copied from interface: Boundable
Returns the idx-th point associated with this element.

Specified by:
getPoint in interface Boundable
Parameters:
idx - index of the point (must be on the range 0 to Boundable.numPoints()).
Returns:
idx-th point associated with this element. Must not be modified.