public class FemCutPlane extends Frame implements FemMesh
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static Renderer.ColorInterpolation |
DEFAULT_COLOR_INTERPOLATION |
static PropertyList |
myProps |
dynamicVelInWorldCoords, myRenderFrame
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
COPY_REFERENCES, REST_POSITION
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
Constructor and Description |
---|
FemCutPlane() |
FemCutPlane(double res) |
FemCutPlane(double res,
RigidTransform3d TPW) |
FemCutPlane(RigidTransform3d TPW) |
Modifier and Type | Method and Description |
---|---|
FemCutPlane |
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.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
Renderer.ColorInterpolation |
getColorInterpolation() |
ColorMapBase |
getColorMap() |
PropertyMode |
getColorMapMode() |
double |
getCurrentResolution()
Returns the currently computed grid resolution for the display.
|
FemModel3d |
getFem() |
boolean |
getHighlightColoredMesh() |
PolygonalMesh |
getMesh() |
double |
getResolution()
Gets the grid resolution of the display, in units of distance.
|
double |
getSquareSize()
Gets the size of the square.
|
DoubleInterval |
getStressPlotRange() |
PropertyMode |
getStressPlotRangeMode() |
FemModel.Ranging |
getStressPlotRanging() |
PropertyMode |
getStressPlotRangingMode() |
FemModel.SurfaceRender |
getSurfaceRendering() |
PropertyMode |
getSurfaceRenderingMode() |
void |
invalidateMesh() |
boolean |
isMeshPolygonal() |
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).
|
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
resetAutoStressPlotRange() |
void |
setColorInterpolation(Renderer.ColorInterpolation interp) |
void |
setColorMap(ColorMapBase map) |
void |
setColorMapMode(PropertyMode mode) |
void |
setHighlightColoredMesh(boolean enable) |
void |
setResolution(double res)
Sets the grid resolution of the display, in units of distance.
|
void |
setSquareSize(double size)
Sets the size of the square.
|
void |
setStressPlotRange(DoubleInterval range) |
void |
setStressPlotRangeMode(PropertyMode mode) |
void |
setStressPlotRanging(FemModel.Ranging ranging) |
void |
setStressPlotRangingMode(PropertyMode mode) |
void |
setSurfaceRendering(FemModel.SurfaceRender rendering) |
void |
setSurfaceRenderingMode(PropertyMode mode) |
void |
transformGeometry(GeometryTransformer gtr,
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.
|
add1DConstraintBlocks, add2DConstraintBlocks, addEffectiveFrameMass, addEffectivePointMass, addExternalForce, addForce, addForce, addFrameForce, addPointForce, addPointForce, addPosImpulse, addPosJacobian, addRelativeVelocity, addScaledExternalForce, addSolveBlock, addSolveBlocks, addTargetJacobian, addToPointVelocity, addTransformableDependencies, addVelJacobian, applyExternalForces, applyForces, applyGravity, collectMasterComponents, computeAppliedWrench, computeForceOnMasters, computeFrameLocation, computeFramePosition, computeFramePosVel, computeFrameVelocity, computePointCoriolis, computePointLocation, computePointPosition, computePointPosVel, computePointVelocity, createFrameAttachment, createMassBlock, createPointAttachment, getAxisDrawStyle, getAxisLength, getBodyForce, getBodyVelocity, getBodyVelState, getCopyReferences, getEffectiveMass, getEffectiveMass, getEffectiveMassForces, getExternalForce, getForce, getForce, getForce, getFrameDamping, getFrameDampingMode, getJacobianType, getMass, getMass, getMoment, getOrientation, getOrientation, getPosDerivative, getPose, getPose, getPosition, getPosState, getPosStateSize, getRenderFrame, getRotaryDamping, getRotaryDampingMode, getRotation, getSelection, getState, getTargetActivity, getTargetOrientation, getTargetPos, getTargetPose, getTargetPosition, getTargetVel, getTargetVelocity, getTraceablePositionProperty, getTraceables, getTransForce, getVelocity, getVelocity, getVelState, getVelStateSize, getWorldVelState, hasForce, isDuplicatable, isMassConstant, mulInverseEffectiveMass, resetEffectiveMass, resetTargets, scaleDistance, scaleMass, setAxisDrawStyle, setAxisLength, setBodyVelocity, setContactConstraint, setExternalForce, setForce, setForce, setFrameDamping, setFrameDampingMode, setOrientation, setPose, setPosition, setPosState, setRandomForce, setRandomPosState, setRandomVelState, setRotaryDamping, setRotaryDampingMode, setRotation, setState, setState, setTargetActivity, setTargetOrientation, setTargetPos, setTargetPose, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, setVelocity, setVelState, transformPose, updateAttachmentPosStates, velocityLimitExceeded, zeroExternalForces, zeroForces
addAttachmentRequest, addConstrainer, addMasterAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachment, getConstrainers, getInverseMass, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeAttachmentRequest, removeConstrainer, removeMasterAttachment, setAttached, setSolveIndex, transformGeometry
defaultRenderPropsAreNull, getRenderHints, getRenderProps, isSelectable, isVisible, numSelectionQueriesNeeded, setRenderProps, setVisible, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
getSelection, isSelectable, numSelectionQueriesNeeded
getRenderHints
getRenderProps, setRenderProps
addAttachmentRequest, removeAttachmentRequest
addConstrainer, addMasterAttachment, getAttachment, getConstrainers, getInverseMass, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeConstrainer, removeMasterAttachment, setAttached, setSolveIndex
advanceState, getAuxVarDerivative, getAuxVarState, getStateVersion, hasState, numAuxVars, requiresAdvance, setAuxVarState
transformGeometry, transformPriority
isControllable
public static final Renderer.ColorInterpolation DEFAULT_COLOR_INTERPOLATION
public static PropertyList myProps
public FemCutPlane()
public FemCutPlane(RigidTransform3d TPW)
public FemCutPlane(double res)
public FemCutPlane(double res, RigidTransform3d TPW)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class Frame
public FemModel3d getFem()
public boolean isMeshPolygonal()
isMeshPolygonal
in interface FemMesh
public PolygonalMesh getMesh()
public Renderer.ColorInterpolation getColorInterpolation()
public void setColorInterpolation(Renderer.ColorInterpolation interp)
public double getSquareSize()
setSquareSize(double)
public void setSquareSize(double size)
size <= 0
, then the square is not displayed. and selected in the
viewer.size
- new square sizepublic double getResolution()
setResolution(double)
public void setResolution(double res)
public double getCurrentResolution()
setResolution(double)
, this will be computed
automatically from a sampling of the FEM elements.public void setSurfaceRendering(FemModel.SurfaceRender rendering)
public FemModel.SurfaceRender getSurfaceRendering()
public void setSurfaceRenderingMode(PropertyMode mode)
public PropertyMode getSurfaceRenderingMode()
public void setStressPlotRanging(FemModel.Ranging ranging)
public FemModel.Ranging getStressPlotRanging()
public void setStressPlotRangingMode(PropertyMode mode)
public PropertyMode getStressPlotRangingMode()
public void resetAutoStressPlotRange()
public void setStressPlotRange(DoubleInterval range)
public DoubleInterval getStressPlotRange()
public void setStressPlotRangeMode(PropertyMode mode)
public PropertyMode getStressPlotRangeMode()
public boolean getHighlightColoredMesh()
public void setHighlightColoredMesh(boolean enable)
public void setColorMap(ColorMapBase map)
public ColorMapBase getColorMap()
public PropertyMode getColorMapMode()
public void setColorMapMode(PropertyMode mode)
public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
updateBounds
in class Frame
pmin
- minimum pointpmax
- maximum pointpublic RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class Frame
public void prerender(RenderList list)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
prerender
in class Frame
list
- list of objects to be renderedpublic void invalidateMesh()
public void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class Frame
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public void transformGeometry(GeometryTransformer gtr, 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 Frame
gtr
- transformer implementing the transformcontext
- context information, including what other components
are being transformedflags
- specifies conditions associated with the transformationpublic FemCutPlane 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 Frame
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
components