artisynth.core.probes
Class MeshIntersectingProbe

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.MeshIntersectingProbe
All Implemented Interfaces:
HasState, ModelAgent, ModelComponent, RenderableComponent, java.lang.Cloneable, HasProperties, HierarchyNode, Dragger3dListener, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable

public class MeshIntersectingProbe
extends CutPlaneProbe

A basic display probe that shows the intersection of a rigid body with the display probe's plane

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
MeshIntersectingProbe()
           
MeshIntersectingProbe(Point3d center, AxisAngle orientation, Vector2d size)
          Creates a probe with a display plane
MeshIntersectingProbe(PolygonalMesh mesh)
           
 
Method Summary
 void clip(boolean set)
          Clips the display plane to lie solely within the associated mesh
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 boolean getDrawIntersections()
          Returns whether we are drawing intersections with the plane
 java.util.ArrayList<Face> getFaces(Vertex3d vtx)
          Returns a list of all faces that use this vertex
 PolygonalMesh getIntersectingMesh()
          Gets the associated mesh
 boolean isClipped()
          Returns whether we are clipped to a mesh
 void render(GLRenderer renderer, int flags)
          Render this object using Open GL via the JOGL.
 void setDrawIntersections(boolean enable)
          Enable/disable drawing of intersections of mesh with the plane
 void setIntersectingMesh(PolygonalMesh mesh)
          Sets the mesh to compute intersections with
 
Methods inherited from class artisynth.core.probes.CutPlaneProbe
apply, centerInViewer, createRenderProps, draggerAdded, draggerBegin, draggerEnd, draggerMove, draggerRemoved, getDragger, getOrientation, getPlane, getPlane, getPosition, getRenderHints, getRenderProps, getResolution, getSelection, getSize, initialize, isSelectable, numSelectionQueriesNeeded, prerender, resetInViewer, setDragger, setGridToWorld, setOrientation, setPlane, setPlane, setPosition, setRenderProps, setResolution, setSize, 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

MeshIntersectingProbe

public MeshIntersectingProbe()

MeshIntersectingProbe

public MeshIntersectingProbe(Point3d center,
                             AxisAngle orientation,
                             Vector2d size)
Creates a probe with a display plane

Parameters:
center - centre of plane
orientation - orientation of plane (originally x-y)
size - size of plane

MeshIntersectingProbe

public MeshIntersectingProbe(PolygonalMesh mesh)
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

setIntersectingMesh

public void setIntersectingMesh(PolygonalMesh mesh)
Sets the mesh to compute intersections with


getIntersectingMesh

public PolygonalMesh getIntersectingMesh()
Gets the associated mesh


setDrawIntersections

public void setDrawIntersections(boolean enable)
Enable/disable drawing of intersections of mesh with the plane


getDrawIntersections

public boolean getDrawIntersections()
Returns whether we are drawing intersections with the plane


isClipped

public boolean isClipped()
Returns whether we are clipped to a mesh


clip

public void clip(boolean set)
Clips the display plane to lie solely within the associated mesh

Parameters:
set -

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.

getFaces

public java.util.ArrayList<Face> getFaces(Vertex3d vtx)
Returns a list of all faces that use this vertex