public class MeshViewer
extends java.applet.Applet
Modifier and Type | Field and Description |
---|---|
java.util.Collection<TriangulationDSCell_3<Point_3>> |
cellsCollection
A field in which to store collections of 3D triangulation cells to be shown in the scene.
|
Delaunay_3 |
del3D |
boolean |
drawTriangleEdges |
java.awt.Color[] |
edgeColors |
int[][] |
edges |
java.awt.Color[] |
faceColors |
java.util.Collection<FacetHandle<Point_3>> |
facetsCollection
A field in which to store collections of 3D triangulation facets to be shown in the scene.
|
java.util.ArrayList<Point_3> |
graphEdges |
SharedVertexRepresentation |
meshes |
SharedVertexRepresentation |
mTrans |
Point_3[] |
points |
java.util.Collection<Point_3> |
pointsCollection
A field in which to store collections of points to be shown in the scene.
|
java.awt.Color[] |
pointsColor |
Polyhedron_3<Point_3> |
polyhedron |
double |
scaleFactor |
java.util.Collection<Segment_3> |
segmentsCollection
A field in which to store collections of segments to be shown in the scene.
|
java.util.Collection<Triangle_3> |
trianglesCollection
A field in which to store collections of triangles to be shown in the scene.
|
TriangulationDS_3<Point_3> |
triangulation3D |
Constructor and Description |
---|
MeshViewer()
creates a 3D viewer with an empty scene.
|
MeshViewer(java.util.Collection<Point_3> points)
creates a 3D viewer showing a point cloud in 3D.
|
MeshViewer(java.util.Collection<Point_3> points,
java.awt.Color[] colors)
creates a 3D viewer showing a point cloud (with colors) in 3D.
|
MeshViewer(Delaunay_3 del,
boolean wired)
creates a 3D viewer showing a 3D Delaunay triangulation: the triangulation is drawn in wireframe
when the flag wired is set to true, and in plain facets otherwise.
|
MeshViewer(Point_3[] points,
int[][] edges)
creates a 3D viewer showing a collection of edges.
|
MeshViewer(Point_3[] points,
int[][] edges,
java.awt.Color[] colors)
creates a 3D viewer showing a collection of colored edges.
|
MeshViewer(Polyhedron_3<Point_3> polyhedron)
creates a 3D viewer showing a polyhedron.
|
MeshViewer(Polyhedron_3<Point_3> mesh,
Point_3[] points,
int[][] edges,
java.awt.Color[] colors)
creates a 3D viewer showing a collection of colored edges.
|
MeshViewer(SharedVertexRepresentation mr)
creates a 3D viewer showing a mesh representation.
|
MeshViewer(SharedVertexRepresentation mr,
boolean trans)
creates a 3D viewer showing a transparent mesh representation.
|
MeshViewer(java.lang.String filename)
creates a 3D viewer showing a polyhedral surface stored in a file.
|
MeshViewer(TriangulationDS_2<Point_3> mesh)
creates a 3D viewer showing a Triangle mesh.
|
MeshViewer(TriangulationDS_3<Point_3> triangulation3D)
creates a 3D viewer showing a 3D triangulation.
|
Modifier and Type | Method and Description |
---|---|
void |
add3DCells(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
java.util.Collection<TriangulationDSCell_3<Point_3>> cells,
java.awt.Color[] color)
Draw a 3D volume mesh (a set of tetrahedra in R3)
|
void |
addColoredEdges(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
Point_3[] points,
int[][] edges,
java.awt.Color[] colors)
Draw a set of colored edges in 3D (for example, as the 1-skeleton of a polyhedron)
|
void |
addEdges(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
Delaunay_3 del)
Draw a 3D volume mesh (a set of tetrahedra in R3)
|
void |
addEdgesOnly(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
Point_3[] points,
int[][] edges,
java.awt.Color color)
Draw a set of edges in 3D (for example, as the 1-skeleton of a polyhedron)
|
void |
addFacets(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
java.util.Collection<FacetHandle<Point_3>> facets,
java.awt.Color[] colors)
Draws a triangle soup in 3D represented as a collection of facet handles in a triangulation
|
void |
addFacets(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
Delaunay_3 del)
Draws the facets of a 3D Delaunay triangulation
|
void |
addPoints(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
java.util.Collection<Point_3> points,
java.awt.Color[] color)
Draws a point cloud in 3D
|
void |
addPolygonFacet(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
Point_3[] points,
java.awt.Color color)
Draw a polygonal face
|
void |
addPolygonFacets(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
Point_3[] points,
int[][] faces,
java.awt.Color[] color)
Draw a set of polygon facets
|
void |
addSegments(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
java.util.Collection<Segment_3> segments,
java.awt.Color color)
Draws a segment soup in 3D
|
void |
addTriangleFacet(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
Point_3[] points,
java.awt.Color color)
Draw a triangle face
|
void |
addTriangles(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
java.util.Collection<Triangle_3> triangles,
java.awt.Color[] color)
Draws a triangle soup in 3D
|
double[] |
boundingBox(java.util.Collection<Point_3> points)
Compute a bounding box of the input points (from a Collection)
|
double[] |
boundingBox(Point_3[] points)
Compute a bounding box of the input points (from an Array)
|
double |
computeScaleFactor(java.util.Collection<Point_3> points)
Compute the scale factor in order to adjust the 3D view (from a Collection)
|
double |
computeScaleFactor(Point_3[] points)
Compute the scale factor in order to adjust the 3D view
|
javax.media.j3d.BranchGroup |
createSceneGraph()
Create and initialize the scene graph
|
void |
destroy() |
void |
drawBoundingBox(javax.media.j3d.TransformGroup objTrans,
java.util.Collection<Point_3> points)
Draw x, y and z axis
|
void |
init() |
static void |
main(java.lang.String[] argv) |
void |
renderTriangleMesh(javax.media.j3d.TransformGroup objTrans,
javax.media.j3d.Appearance ap,
Point_3[] points,
int[][] faces,
java.awt.Color[] color)
Render the set of triangle facets of a surface mesh
(the input is a shared vertex representation)
|
void |
update() |
getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public java.util.ArrayList<Point_3> graphEdges
public Polyhedron_3<Point_3> polyhedron
public TriangulationDS_3<Point_3> triangulation3D
public Delaunay_3 del3D
public SharedVertexRepresentation meshes
public SharedVertexRepresentation mTrans
public java.util.Collection<TriangulationDSCell_3<Point_3>> cellsCollection
public java.util.Collection<FacetHandle<Point_3>> facetsCollection
public java.util.Collection<Triangle_3> trianglesCollection
public boolean drawTriangleEdges
public java.util.Collection<Segment_3> segmentsCollection
public java.util.Collection<Point_3> pointsCollection
public java.awt.Color[] pointsColor
public int[][] edges
public java.awt.Color[] edgeColors
public java.awt.Color[] faceColors
public Point_3[] points
public double scaleFactor
public MeshViewer()
public MeshViewer(SharedVertexRepresentation mr)
public MeshViewer(SharedVertexRepresentation mr, boolean trans)
public MeshViewer(java.lang.String filename)
public MeshViewer(Polyhedron_3<Point_3> polyhedron)
public MeshViewer(TriangulationDS_2<Point_3> mesh)
public MeshViewer(TriangulationDS_3<Point_3> triangulation3D)
public MeshViewer(Delaunay_3 del, boolean wired)
public MeshViewer(Point_3[] points, int[][] edges)
public MeshViewer(Point_3[] points, int[][] edges, java.awt.Color[] colors)
public MeshViewer(Polyhedron_3<Point_3> mesh, Point_3[] points, int[][] edges, java.awt.Color[] colors)
public MeshViewer(java.util.Collection<Point_3> points)
public MeshViewer(java.util.Collection<Point_3> points, java.awt.Color[] colors)
public javax.media.j3d.BranchGroup createSceneGraph()
public double[] boundingBox(Point_3[] points)
public double[] boundingBox(java.util.Collection<Point_3> points)
public double computeScaleFactor(java.util.Collection<Point_3> points)
public double computeScaleFactor(Point_3[] points)
public void drawBoundingBox(javax.media.j3d.TransformGroup objTrans, java.util.Collection<Point_3> points)
public void addTriangleFacet(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, Point_3[] points, java.awt.Color color)
public void addPolygonFacet(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, Point_3[] points, java.awt.Color color)
public void add3DCells(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, java.util.Collection<TriangulationDSCell_3<Point_3>> cells, java.awt.Color[] color)
public void addPolygonFacets(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, Point_3[] points, int[][] faces, java.awt.Color[] color)
public void addEdges(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, Delaunay_3 del)
public void addFacets(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, Delaunay_3 del)
public void addFacets(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, java.util.Collection<FacetHandle<Point_3>> facets, java.awt.Color[] colors)
public void addTriangles(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, java.util.Collection<Triangle_3> triangles, java.awt.Color[] color)
public void renderTriangleMesh(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, Point_3[] points, int[][] faces, java.awt.Color[] color)
public void addEdgesOnly(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, Point_3[] points, int[][] edges, java.awt.Color color)
public void addColoredEdges(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, Point_3[] points, int[][] edges, java.awt.Color[] colors)
public void addSegments(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, java.util.Collection<Segment_3> segments, java.awt.Color color)
public void addPoints(javax.media.j3d.TransformGroup objTrans, javax.media.j3d.Appearance ap, java.util.Collection<Point_3> points, java.awt.Color[] color)
public void init()
init
in class java.applet.Applet
public void destroy()
destroy
in class java.applet.Applet
public void update()
public static void main(java.lang.String[] argv)