public class MFreeNode3d extends FemNode3d implements MFreePoint3d, Boundable
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_RENDER_BOUNDARY |
static PropertyList |
myProps |
myRenderCoords
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSLUCENT, TWO_DIMENSIONAL
ARTICULATED, SIMULATING
COPY_REFERENCES
Constructor and Description |
---|
MFreeNode3d() |
MFreeNode3d(double x,
double y,
double z) |
MFreeNode3d(Point3d p) |
Modifier and Type | Method and Description |
---|---|
void |
addElementDependency(MFreeElement3d e) |
void |
addPartitionRestVolume(double pvol) |
void |
addPartitionVolume(double pvol) |
void |
addRestVolume(double pvol) |
void |
addVolume(double pvol) |
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.
|
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).
|
MFreeNode3d |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
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).
|
double |
distance(Point pnt) |
double |
distance(Point3d pos) |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
PolygonalMesh |
getBoundaryMesh() |
java.util.ArrayList<MFreeNode3d> |
getDependentNodes() |
Vector3d |
getDisplacement() |
Vector3d |
getFalseDisplacement() |
void |
getFalseDisplacement(Vector3d disp) |
Point3d |
getFalsePosition() |
Vector3d |
getFalseVelocity() |
double |
getInfluenceRadius() |
java.util.LinkedList<MFreeElement3d> |
getMFreeElementDependencies() |
VectorNd |
getNodeCoordinates() |
double |
getPartitionRestVolume() |
double |
getPartitionVolume(double vol) |
Point3d |
getPoint(int idx)
Returns the
idx -th point associated with this element. |
Point3d |
getPosition() |
double |
getPressure() |
boolean |
getRenderBoundary() |
double |
getRestVolume() |
MFreeShapeFunction |
getShapeFunction() |
Vector3d |
getTargetDisplacement() |
int |
getTargetPos(double[] post,
double s,
double h,
int idx) |
Point3d |
getTargetPosition() |
int |
getTargetVel(double[] velt,
double s,
double h,
int idx) |
Vector3d |
getTargetVelocity() |
Point3d |
getTruePosition() |
Vector3d |
getTrueVelocity() |
Vector3d |
getVelocity() |
double |
getVolume() |
double |
getWeight(Point3d pos) |
MFreeWeightFunction |
getWeightFunction() |
boolean |
intersects(MFreeNode3d node) |
boolean |
isInDomain(Point3d pos,
double tol) |
boolean |
isRadial() |
int |
numAdjacentElements() |
int |
numPoints()
Returns the number of points associated with this element, if any, or
zero otherwise.
|
void |
prerender(RenderList list)
Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
|
boolean |
reduceDependencies(double tol)
Removes all dependencies with have very low weights
( |w| <= tol )
|
void |
registerNodeNeighbor(MFreeNode3d nbrNode) |
void |
removeElementDependency(MFreeElement3d e) |
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
void |
renderWidget(GLRenderer renderer,
RenderProps props,
int flags) |
void |
setBoundaryMesh(PolygonalMesh mesh) |
void |
setDependentNodes(java.util.List<MFreeNode3d> nodes,
VectorNd coords) |
void |
setFalsePosition(Point3d pos) |
void |
setFalseVelocity(Vector3d vel) |
void |
setNodeCoordinates(VectorNd coords) |
void |
setPartitionRestVolume(double vol) |
void |
setPartitionVolume(double vol) |
void |
setRenderBoundary(boolean render) |
void |
setRestPosition(Point3d pos) |
void |
setRestVolume(double vol) |
void |
setShapeFunction(MFreeShapeFunction f) |
int |
setTargetPos(double[] post,
int idx) |
int |
setTargetVel(double[] velt,
int idx) |
void |
setVolume(double vol) |
void |
setWeightFunction(RadialWeightFunction f) |
void |
updateBoundaryMesh() |
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object.
|
void |
updatePosAndVelState() |
void |
updatePosState() |
void |
updateVelState() |
addElementDependency, addIndirectNeighbor, clearIndirectNeighbors, deregisterNodeNeighbor, getElementDependencies, getIncompressIndex, getIndex, getIndirectNeighbor, getIndirectNeighborBySolveIndex, getIndirectNeighbors, getInternalForce, getNodeNeighbor, getNodeNeighborBySolveIndex, getNodeNeighbors, getRestPosition, getStrain, getStress, getVonMisesStrain, getVonMisesStress, removeElementDependency, resetRestPosition, scaleDistance, scanItem, setIncompressIndex, setIndex, setStrain, setStress, setTargetDisplacement, transformGeometry, zeroStrain, zeroStress
applyGravity, applyPosImpulse, getConstraint, getCopyReferences, getInverseMass, getMass, getMass, getMass, getVelDerivative, isDuplicatable, scaleMass, setConstraint, setDynamic, setMass, transformGeometry
addExternalForce, addForce, addPosImpulse, addPosition, addPosJacobian, addScaledExternalForce, addScaledForce, addScaledPosition, addScaledVelocity, addSolveBlock, addSolveBlocks, addTargetJacobian, addToSolveBlockDiagonal, addVelJacobian, addVelocity, applyForces, createMassBlock, createSolveBlock, getExternalForce, getForce, getForce, getJacobianType, getMassForces, getPointDamping, getPointDampingMode, getPosDerivative, getPosition, getPosState, getPosStateSize, getRenderCoords, getRenderProps, getSelection, getState, getState, getTargetActivity, getTracables, getTracingProbe, getVelocity, getVelState, getVelStateSize, isMassConstant, isSelectable, resetTargets, setExternalForce, setForce, setForce, setForcesToExternal, setPointDamping, setPointDampingMode, setPosition, setPosition, setPosState, setRenderProps, setScaledExternalForce, setState, setState, setState, setTargetActivity, setTargetPosition, setTargetVelocity, setVelocity, setVelocity, setVelState, subForce, velocityLimitExceeded, zeroExternalForces, zeroForces
addMasterAttachment, getAttachment, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeMasterAttachment, setAttached, setSolveIndex
getRenderHints, numSelectionQueriesNeeded, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRestPosition
isSelected
numSelectionQueriesNeeded
getRenderHints
addMasterAttachment, checkFlag, clearFlag, getAttachment, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeMasterAttachment, setAttached, setFlag, setSolveIndex
getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getChildren, hasChildren
isWritable, write
public static boolean DEFAULT_RENDER_BOUNDARY
public static PropertyList myProps
public MFreeNode3d()
public MFreeNode3d(Point3d p)
public MFreeNode3d(double x, double y, double z)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class FemNode3d
public void setRestPosition(Point3d pos)
setRestPosition
in class FemNode3d
public int setTargetPos(double[] post, int idx)
setTargetPos
in interface MotionTargetComponent
setTargetPos
in class Point
public int getTargetPos(double[] post, double s, double h, int idx)
getTargetPos
in interface MotionTargetComponent
getTargetPos
in class Point
public Point3d getTargetPosition()
getTargetPosition
in class Point
public Vector3d getTargetDisplacement()
getTargetDisplacement
in class FemNode3d
public int setTargetVel(double[] velt, int idx)
setTargetVel
in interface MotionTargetComponent
setTargetVel
in class Point
public int getTargetVel(double[] velt, double s, double h, int idx)
getTargetVel
in interface MotionTargetComponent
getTargetVel
in class Point
public Vector3d getTargetVelocity()
getTargetVelocity
in class Point
public void registerNodeNeighbor(MFreeNode3d nbrNode)
public void addElementDependency(MFreeElement3d e)
public void removeElementDependency(MFreeElement3d e)
public java.util.LinkedList<MFreeElement3d> getMFreeElementDependencies()
public int numAdjacentElements()
numAdjacentElements
in class FemNode3d
public void setWeightFunction(RadialWeightFunction f)
public MFreeWeightFunction getWeightFunction()
public void setShapeFunction(MFreeShapeFunction f)
public MFreeShapeFunction getShapeFunction()
public boolean isInDomain(Point3d pos, double tol)
public boolean intersects(MFreeNode3d node)
public double getWeight(Point3d pos)
public MFreeNode3d copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponent
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
.copy
in interface CopyableComponent
copy
in class FemNode3d
public void getFalseDisplacement(Vector3d disp)
public Vector3d getFalseDisplacement()
public Vector3d getDisplacement()
getDisplacement
in class FemNode3d
public Point3d getFalsePosition()
public void setFalsePosition(Point3d pos)
public Vector3d getFalseVelocity()
public void setFalseVelocity(Vector3d vel)
public java.util.ArrayList<MFreeNode3d> getDependentNodes()
getDependentNodes
in interface MFreePoint3d
public void setDependentNodes(java.util.List<MFreeNode3d> nodes, VectorNd coords)
setDependentNodes
in interface MFreePoint3d
public boolean reduceDependencies(double tol)
MFreePoint3d
reduceDependencies
in interface MFreePoint3d
public VectorNd getNodeCoordinates()
getNodeCoordinates
in interface MFreePoint3d
public void setNodeCoordinates(VectorNd coords)
setNodeCoordinates
in interface MFreePoint3d
public void updatePosAndVelState()
updatePosAndVelState
in interface MFreePoint3d
public void updatePosState()
updatePosState
in interface MFreePoint3d
public void updateVelState()
updateVelState
in interface MFreePoint3d
public Point3d getTruePosition()
public Vector3d getTrueVelocity()
public boolean isRadial()
public double getInfluenceRadius()
public Point3d getPosition()
getPosition
in interface MFreePoint3d
getPosition
in class Point
public Vector3d getVelocity()
getVelocity
in class Point
public void prerender(RenderList list)
GLRenderable
prerender
in interface GLRenderable
prerender
in class Point
public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class Point
public void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
render
in class Point
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
.public void renderWidget(GLRenderer renderer, RenderProps props, int flags)
public void setBoundaryMesh(PolygonalMesh mesh)
public PolygonalMesh getBoundaryMesh()
public void connectToHierarchy()
ModelComponentBase
When this method is called, ModelComponent.getParent()
will return
the new parent component; the system will have set this beforehand.
connectToHierarchy
in interface ModelComponent
connectToHierarchy
in class FemNode3d
public void disconnectFromHierarchy()
ModelComponentBase
When this
method is called, ModelComponent.getParent()
will still return this original
parent component; the system will set this to null
after.
disconnectFromHierarchy
in interface ModelComponent
disconnectFromHierarchy
in class FemNode3d
public void computeCentroid(Vector3d centroid)
Boundable
computeCentroid
in interface Boundable
centroid
- returns the computed centroid value.public 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 void updateBoundaryMesh()
public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface Boundable
updateBounds
in interface GLRenderable
updateBounds
in class Point
pmin
- minimum pointpmax
- maximum pointpublic boolean getRenderBoundary()
public void setRenderBoundary(boolean render)
public void setRestVolume(double vol)
public void setPartitionRestVolume(double vol)
public void setVolume(double vol)
public void setPartitionVolume(double vol)
public double getRestVolume()
public double getPartitionVolume(double vol)
public double getPartitionRestVolume()
public double getVolume()
public void addRestVolume(double pvol)
public void addVolume(double pvol)
public void addPartitionVolume(double pvol)
public void addPartitionRestVolume(double pvol)
public double getPressure()
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.