vmm3d.polyhedron
Class IFS
- java.lang.Object
-
- vmm3d.core.Exhibit
-
- vmm3d.core3D.Exhibit3D
-
- vmm3d.polyhedron.IFS
-
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- RegularPolyhedron
public class IFS extends Exhibit3D
Represents a polyhedron given in the form of a indexed face set. That is, the data for the polyhedron consists of a list of vertices plus a list of data for the faces of the polyhedron. A face is specified by a list of integers, one for each vertex of the face, where each integer is an index into the list of vertices. The vertices for a face must be listed in counterclockwise order as viewed from the front of face. No public method is provided for changing the indexed face set data after the object is constructed, but subclasses can do so using the protected methodsetIFSData(Vector3D[], int[][]).An IFS has a create animation that shows the faces of the polyhedron being drawn in back-to-front order using a simple painter's algorithm.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classIFS.IFSView
-
Constructor Summary
Constructors Constructor and Description IFS(Vector3D[] vertexList, int[][] faceData)Create a polyhedron, using specifed lists of vertices and faces.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ActionListgetActionsForView(View view)Adds to the Actions a toggle to control whether thick lines are used for drawing the wireframe form of the polyhedron.AnimationgetCreateAnimation(View view)Returns an animation in which the faces of the polyhedron are drawn one at a time, in back-to-front order.ViewgetDefaultView()Returns a View of typeIFS.IFSView.-
Methods inherited from class vmm3d.core3D.Exhibit3D
getDefaultTransform, getDefaultViewpoint, getDefaultViewUp, setDefaultViewpoint, setDefaultViewUp
-
Methods inherited from class vmm3d.core.Exhibit
addChangeListener, addDecoration, addExtraXML, addView, clearDecorations, forceRedraw, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, readExtraXML, removeChangeListener, removeDecoration, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
-
-
-
-
Constructor Detail
-
IFS
public IFS(Vector3D[] vertexList, int[][] faceData)
Create a polyhedron, using specifed lists of vertices and faces. The data is not verified.- Parameters:
vertexList- an array containing the vertices of the polyhedronfaceData- describes the faces of the polyhedron. faceData[i] is a list of vertices in the i-th face, listed in counterclockwise order as seen from in front of the face, with each vertex specified as an index into the vertex array.
-
-
Method Detail
-
getDefaultView
public View getDefaultView()
Returns a View of typeIFS.IFSView.- Overrides:
getDefaultViewin classExhibit3D
-
getCreateAnimation
public Animation getCreateAnimation(View view)
Returns an animation in which the faces of the polyhedron are drawn one at a time, in back-to-front order.- Overrides:
getCreateAnimationin classExhibit- Parameters:
view- A View that is displaying this Exhibit. The animation, if any, that is returned by this method will be installed in the View's display. If the view is null, than a creation animation that can run independently of a view could be returned.- Returns:
- A creation animation for the given View of this Exhibit. The return value can be null to indicate that no creation animation is to be run.
-
getActionsForView
public ActionList getActionsForView(View view)
Adds to the Actions a toggle to control whether thick lines are used for drawing the wireframe form of the polyhedron.- Overrides:
getActionsForViewin classExhibit
-
-
DMelt 3.0 © DataMelt by jWork.ORG