artisynth.core.probes
Class FemDisplayProbe

java.lang.Object
  extended by artisynth.core.modelbase.ModelComponentBase
      extended by artisynth.core.modelbase.ModelAgentBase
          extended by artisynth.core.probes.Probe
              extended by artisynth.core.probes.OutputProbe
                  extended by artisynth.core.probes.CutPlaneProbe
                      extended by artisynth.core.probes.FemDisplayProbe
All Implemented Interfaces:
HasState, ModelAgent, ModelComponent, RenderableComponent, java.lang.Cloneable, HasProperties, HierarchyNode, Dragger3dListener, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable

public class FemDisplayProbe
extends CutPlaneProbe

A probe that allows you to examine the stress/strain inside a FemModel3d.

Author:
Antonio

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.probes.Probe
useOldSaveMethod, writeStartStopTimeInSeconds
 
Fields inherited from class artisynth.core.modelbase.ModelComponentBase
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
FemDisplayProbe()
           
FemDisplayProbe(FemModel3d fem)
           
 
Method Summary
 void apply(double t)
          Called when the probe is being applied to a model
 void clip(boolean set)
          Clip the probe viewer to fall within the FEM.
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 double getBackgroundAlpha()
          Transparency of the background for this probe
 ColorMapBase getColorMap()
          Gets the map used for interpolating colors in stress/strain plots
 boolean getDrawIntersections()
          Gets whether we are computing/drawing intersection of mesh with plane
 FemModel3d getFem()
          Gets the examined FEM
 int getRenderHints()
          Returns a bit code giving rendering hints about this renderable.
 DoubleInterval getStressPlotRange()
          Gets the stress plot range
 FemModel.Ranging getStressPlotRanging()
          Gets the stress/strain plot range type (auto or fixed)
 FemModel.SurfaceRender getSurfaceRendering()
          Gets the surface rendering mode
 void initialize(double t)
           
 boolean isClipped()
           
 boolean isUsingRestCoordinates()
           
 void render(GLRenderer renderer, int flags)
          Render this object using Open GL via the JOGL.
 void resetStressPlotRange()
           
 void setBackgroundAlpha(double val)
          Sets the transparency for the background of this probe
 void setColorMap(ColorMapBase map)
          Sets the color mapping for stress/strain plots
 void setDragger(GLViewer.DraggerType type)
          Sets the dragger type for manipulating the display
 void setDrawIntersections(boolean enable)
          Sets whether to draw an outline of the intersection of this mesh with the plane
 void setFem(FemModel3d model)
          Sets the fem model to examine
 void setOrientation(AxisAngle axisAng)
          Sets the orientation of the display
 void setPosition(Point3d pos)
          Sets the 3D position of the centre of the display
 void setResolution(Vector2d res)
          Sets the resolution fo teh display, integers (nx, ny) corresponding to the number of divisions along the x and y axes.
 void setSize(Vector2d size)
          Sets the size of the display grid
 void setStressPlotRange(DoubleInterval range)
          Sets the stress/strain plot range
 void setStressPlotRanging(FemModel.Ranging ranging)
          Sets the stress/strain plot range type (auto or fixed)
 void setSurfaceRendering(FemModel.SurfaceRender mode)
          Sets the surface rendering mode, allowing Stress, Strain, Shaded or None
 void setUseRestCoordinates(boolean set)
           
 void updateDisplay()
          Updates display colors and intersections
 void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor)
          write components to a file
 
Methods inherited from class artisynth.core.probes.CutPlaneProbe
centerInViewer, createRenderProps, draggerAdded, draggerBegin, draggerEnd, draggerMove, draggerRemoved, getDragger, getOrientation, getPlane, getPlane, getPosition, getRenderProps, getResolution, getSelection, getSize, isSelectable, numSelectionQueriesNeeded, prerender, resetInViewer, setGridToWorld, setPlane, setPlane, setRenderProps, transformGeometry, transformGeometry, updateBounds
 
Methods inherited from class artisynth.core.probes.Probe
createState, getAttachedFile, getAttachedFileName, getChildren, getDefaultScale, getDefaultStartTime, getDefaultStopTime, getDefaultUpdateInterval, getInitialState, getProperty, getScale, getStartTime, getState, getStopTime, getTimelineTime, getTrack, getUpdateInterval, getVirtualTime, hasAttachedFile, hasChildren, hasState, isActive, isAttachedFileRelative, isCloneable, isEventTime, isInput, isPrintable, isScalable, isSettable, load, nextEventTime, print, save, scan, setActive, setAttachedFileName, setData, setName, setScalable, setScale, setStartStopTimes, setStartTime, setState, setStopTime, setTrack, setUpdateInterval
 
Methods inherited from class artisynth.core.modelbase.ModelAgentBase
dispose, finalize, getModel, setModel, setModelFromComponent, write
 
Methods inherited from class artisynth.core.modelbase.ModelComponentBase
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface artisynth.core.modelbase.ModelComponent
connectToHierarchy, disconnectFromHierarchy, getHardReferences, 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

FemDisplayProbe

public FemDisplayProbe()

FemDisplayProbe

public FemDisplayProbe(FemModel3d fem)
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 CutPlaneProbe
Returns:
static information for all exported properties

setFem

public void setFem(FemModel3d model)
Sets the fem model to examine


getFem

public FemModel3d getFem()
Gets the examined FEM


updateDisplay

public void updateDisplay()
Updates display colors and intersections


setDragger

public void setDragger(GLViewer.DraggerType type)
Description copied from class: CutPlaneProbe
Sets the dragger type for manipulating the display

Overrides:
setDragger in class CutPlaneProbe

setOrientation

public void setOrientation(AxisAngle axisAng)
Description copied from class: CutPlaneProbe
Sets the orientation of the display

Overrides:
setOrientation in class CutPlaneProbe

setPosition

public void setPosition(Point3d pos)
Description copied from class: CutPlaneProbe
Sets the 3D position of the centre of the display

Overrides:
setPosition in class CutPlaneProbe

setResolution

public void setResolution(Vector2d res)
Description copied from class: CutPlaneProbe
Sets the resolution fo teh display, integers (nx, ny) corresponding to the number of divisions along the x and y axes. This triggers a rebuild of the mesh.

Overrides:
setResolution in class CutPlaneProbe

setSize

public void setSize(Vector2d size)
Description copied from class: CutPlaneProbe
Sets the size of the display grid

Overrides:
setSize in class CutPlaneProbe

getRenderHints

public int getRenderHints()
Description copied from interface: GLRenderable
Returns a bit code giving rendering hints about this renderable. Current bit codes include TRANSLUCENT.

Specified by:
getRenderHints in interface GLRenderable
Overrides:
getRenderHints in class CutPlaneProbe
Returns:
bit code of rendering hints.

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 CutPlaneProbe
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.

clip

public void clip(boolean set)
Clip the probe viewer to fall within the FEM. This also causes the probe to stick to the FEM, acting like an embedded surface


isClipped

public boolean isClipped()

setSurfaceRendering

public void setSurfaceRendering(FemModel.SurfaceRender mode)
Sets the surface rendering mode, allowing Stress, Strain, Shaded or None

Parameters:
mode -

getSurfaceRendering

public FemModel.SurfaceRender getSurfaceRendering()
Gets the surface rendering mode


getStressPlotRanging

public FemModel.Ranging getStressPlotRanging()
Gets the stress/strain plot range type (auto or fixed)


setStressPlotRanging

public void setStressPlotRanging(FemModel.Ranging ranging)
Sets the stress/strain plot range type (auto or fixed)


getStressPlotRange

public DoubleInterval getStressPlotRange()
Gets the stress plot range


resetStressPlotRange

public void resetStressPlotRange()

setStressPlotRange

public void setStressPlotRange(DoubleInterval range)
Sets the stress/strain plot range


setColorMap

public void setColorMap(ColorMapBase map)
Sets the color mapping for stress/strain plots


getColorMap

public ColorMapBase getColorMap()
Gets the map used for interpolating colors in stress/strain plots


getBackgroundAlpha

public double getBackgroundAlpha()
Transparency of the background for this probe


setBackgroundAlpha

public void setBackgroundAlpha(double val)
Sets the transparency for the background of this probe


setDrawIntersections

public void setDrawIntersections(boolean enable)
Sets whether to draw an outline of the intersection of this mesh with the plane


getDrawIntersections

public boolean getDrawIntersections()
Gets whether we are computing/drawing intersection of mesh with plane


initialize

public void initialize(double t)
Specified by:
initialize in interface ModelAgent
Overrides:
initialize in class CutPlaneProbe

apply

public void apply(double t)
Description copied from class: Probe
Called when the probe is being applied to a model

Overrides:
apply in class CutPlaneProbe

isUsingRestCoordinates

public boolean isUsingRestCoordinates()

setUseRestCoordinates

public void setUseRestCoordinates(boolean set)

writeItems

public void writeItems(java.io.PrintWriter pw,
                       NumberFormat fmt,
                       CompositeComponent ancestor)
                throws java.io.IOException
write components to a file

Throws:
java.io.IOException