public class MFreeNode3d extends FemNode3d implements MFreePoint3d, Boundable
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
myRenderCoords
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
COPY_REFERENCES
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
MFreeNode3d() |
MFreeNode3d(double x,
double y,
double z) |
MFreeNode3d(Point3d p) |
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.
|
double |
computeMassFromDensity() |
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.
|
FemNode3d[] |
getDependentNodes() |
Vector3d |
getDisplacement() |
Vector3d |
getFalseDisplacement() |
void |
getFalseDisplacement(Vector3d disp) |
Point3d |
getFalsePosition() |
Vector3d |
getFalseVelocity() |
double |
getInfluenceRadius() |
VectorNd |
getNodeCoordinates() |
Point3d |
getPoint(int idx)
Returns the
idx -th point associated with this element. |
Point3d |
getPosition()
Returns the current position of this point, in world coordinates.
|
Point3d |
getTrueDisplacement() |
Point3d |
getTruePosition() |
Vector3d |
getTrueVelocity() |
Vector3d |
getVelocity() |
double |
getWeight(Point3d pos) |
MFreeWeightFunction |
getWeightFunction() |
boolean |
intersects(MFreeNode3d node) |
boolean |
isInDomain(Point3d pos,
double tol) |
boolean |
isInRestDomain(Vector3d coords) |
boolean |
isRadial() |
int |
numPoints()
Returns the number of points associated with this element, if any, or
zero otherwise.
|
void |
prerender(RenderList list)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
boolean |
reduceDependencies(double tol)
Removes all dependencies with have very low weights
( |w| <= tol )
|
void |
setDependentNodes(FemNode3d[] nodes,
VectorNd coords) |
void |
setFalsePosition(Point3d pos) |
void |
setFalseVelocity(Vector3d vel) |
void |
setNodeCoordinates(VectorNd coords) |
void |
setWeightFunction(RadialWeightFunction f) |
void |
transformGeometry(GeometryTransformer gt,
TransformGeometryContext context,
int flags)
Transforms the geometry of this component, using the geometry transformer
gtr to transform its individual attributes. |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
void |
updatePosState() |
void |
updateSlavePos() |
void |
updateVelState() |
addElementDependency, addIndirectNeighbor, addScaledStrain, addScaledStress, clearIndirectNeighbors, deregisterNodeNeighbor, getElementDependencies, getIncompressIndex, getIndex, getIndirectNeighbor, getIndirectNeighborBySolveIndex, getIndirectNeighbors, getInternalForce, getLocalRestPosition, getNodeNeighbor, getNodeNeighborBySolveIndex, getNodeNeighbors, getRestPosition, getStrain, getStress, getTargetDisplacement, getVonMisesStrain, getVonMisesStress, numAdjacentElements, removeElementDependency, resetRestPosition, scaleDistance, scanItem, setFrame, setIncompressIndex, setIndex, setRestPosition, setStrain, setStress, setTargetDisplacement, zeroStrain, zeroStress
addMass, clearMass, getMass, invalidateMassIfNecessary, isMassExplicit, scaleMass, setMass, setMassExplicit
addEffectiveMass, applyGravity, applyPosImpulse, createPointAttachment, getConstraint, getCopyReferences, getEffectiveMass, getEffectiveMass, getInverseMass, getMass, getMass, getVelDerivative, isDuplicatable, mulInverseEffectiveMass, resetEffectiveMass, setConstraint, setDynamic
addExternalForce, addForce, addLocalForce, addPosImpulse, addPosJacobian, addScaledExternalForce, addScaledForce, addScaledLocalForce, addSolveBlock, addSolveBlocks, addTargetJacobian, addToPointVelocity, addToSolveBlockDiagonal, addTransformableDependencies, addVelJacobian, applyExternalForces, applyForces, createMassBlock, createSolveBlock, getEffectiveMassForces, getExternalForce, getForce, getForce, getJacobianType, getLocalPosition, getLocalPosition, getLocalVelocity, getLocalVelocity, getPointDamping, getPointDampingMode, getPointFrame, getPosDerivative, getPosition, getPosState, getPosStateSize, getRenderCoords, getRenderProps, getSelection, getState, getTargetActivity, getTargetPos, getTargetPosition, getTargetVel, getTargetVelocity, getTraceablePositionProperty, getTraceables, getVelocity, getVelState, getVelStateSize, isMassConstant, isSelectable, render, resetTargets, setContactConstraint, setExternalForce, setForce, setForce, setLocalPosition, setLocalPosition, setLocalVelocity, setLocalVelocity, setPointDamping, setPointDampingMode, setPointFrame, setPosition, setPosition, setPosState, setRenderProps, setScaledExternalForce, setState, setState, setTargetActivity, setTargetPos, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, setVelocity, setVelState, subForce, subLocalForce, velocityLimitExceeded, zeroExternalForces, zeroForces
addConstrainer, addMasterAttachment, getAttachment, getConstrainers, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setAttached, setSolveIndex, transformGeometry
getRenderHints, numSelectionQueriesNeeded, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isConnectedToHierarchy, 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
getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
addConstrainer, addMasterAttachment, checkFlag, clearFlag, getAttachment, getConstrainers, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setAttached, setFlag, setSolveIndex
transformGeometry
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 setWeightFunction(RadialWeightFunction f)
public MFreeWeightFunction getWeightFunction()
public boolean isInRestDomain(Vector3d coords)
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
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
componentspublic Point3d getTrueDisplacement()
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 FemNode3d[] getDependentNodes()
getDependentNodes
in interface MFreePoint3d
public void setDependentNodes(FemNode3d[] 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 updateSlavePos()
updateSlavePos
in interface MFreePoint3d
public void updatePosState()
updatePosState
in interface MFreePoint3d
updatePosState
in class Point
public void updateVelState()
updateVelState
in interface MFreePoint3d
updateVelState
in class Point
public Point3d getTruePosition()
public Vector3d getTrueVelocity()
public boolean isRadial()
public double getInfluenceRadius()
public Point3d getPosition()
Point
getPosition
in interface MFreePoint3d
getPosition
in class Point
public Vector3d getVelocity()
getVelocity
in class Point
public void prerender(RenderList list)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
prerender
in class Point
list
- list of objects to be renderedpublic RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class Point
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 updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface Boundable
updateBounds
in interface IsRenderable
updateBounds
in class Point
pmin
- minimum pointpmax
- maximum pointpublic 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 transformGeometry(GeometryTransformer gt, TransformGeometryContext context, int flags)
TransformableGeometry
gtr
to transform its individual attributes. The
context
argument supplies information about what other
components are currently being transformed, and also allows the
requesting of update actions to be performed after all transform called
have completed. The context is also the usual entity that calls
this method, from within its TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
method. The argument flags
provides flags to specify
various conditions associated with the the transformation.
At present, the available flags are TransformableGeometry.TG_SIMULATING
and
TransformableGeometry.TG_ARTICULATED
.
This method is not usually called directly by applications.
Instead, it is typically called from within the
TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
method of the context,
which takes care of the various operations needed for a
complete transform operation, including calling
TransformableGeometry.addTransformableDependencies(artisynth.core.modelbase.TransformGeometryContext, int)
to collect other
components that should be transformed, calling
TransformableGeometry.transformGeometry(maspack.matrix.AffineTransform3dBase)
for each component, notifying
component parents that the geometry has changed, and calling
any requested TransformGeometryAction
s. More details
are given in the documentation for
TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
.
TransformGeometryContext
provides a number of
static convenience transform
methods
which take care of building the context and calling
apply()
for a specified set of components.
This method should not
generally call transformGeometry()
for its descendant
components. Instead, descendants needing transformation should be
specified by adding them to the context in the method TransformableGeometry.addTransformableDependencies(artisynth.core.modelbase.TransformGeometryContext, int)
.
transformGeometry
in interface TransformableGeometry
transformGeometry
in class FemNode3d
gt
- transformer implementing the transformcontext
- context information, including what other components
are being transformedflags
- specifies conditions associated with the transformationpublic double computeMassFromDensity()
computeMassFromDensity
in class FemNode3d