vmm3d.polyhedron
Class RegularPolyhedron
- java.lang.Object
-
- vmm3d.core.Exhibit
-
- vmm3d.core3D.Exhibit3D
-
- vmm3d.polyhedron.IFS
-
- vmm3d.polyhedron.RegularPolyhedron
-
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- Cube, Dodecahedron, Icosahedron, Octahedron, RhombicDodecahedron, Rhombohedron, Tetrahedron
public abstract class RegularPolyhedron extends IFS
Represents a regular polyhedron, with a parameter that allows the corners to be "truncated" by various amounts. In fact, this class can also be used for many non-regular polyhedra. The main requirement is that the algorithm that is used for truncating the corners of the polyhedron makes the following assumption: For each vertex, the opposite endpoints of the set of edges that are incident on that vertex must be co-planar (otherwise, the facets that are produced when the corners are truncated will not be planar polygons). Also, the faces should not have any colinear vertices; that is, all the vertices of each face should be real corners of that face.This class is abstract, even though it has no abstract methods, because this class does not define any data for any polyhedron. The data must be provided by any concrete subclass, probably in the constructor of the subclass, but in any case before the computeDrawData3D() method in this class is called.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class vmm3d.polyhedron.IFS
IFS.IFSView
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ActionListgetActionsForView(View view)AddstruncationSelectto the actions from the superclass.ActionListgetAdditionalAnimationsForView(View view)This method returns a list ofActionItemthat will be added to the Animation menu of the 3dxm applicaiton.booleangetStellationWanted()voidparameterChanged(Parameter param, java.lang.Object oldValue, java.lang.Object newValue)This is overridden to keep the selected item in the action grouptruncationSelectin sync with the value of the parametertruncation.voidsetStellationWanted(boolean stellationWanted)-
Methods inherited from class vmm3d.polyhedron.IFS
getCreateAnimation, getDefaultView
-
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, getAlternativeViews, getBuildAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, readExtraXML, removeChangeListener, removeDecoration, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
-
-
-
-
Method Detail
-
getStellationWanted
public boolean getStellationWanted()
-
setStellationWanted
public void setStellationWanted(boolean stellationWanted)
-
getActionsForView
public ActionList getActionsForView(View view)
AddstruncationSelectto the actions from the superclass.- Overrides:
getActionsForViewin classIFS
-
parameterChanged
public void parameterChanged(Parameter param, java.lang.Object oldValue, java.lang.Object newValue)
This is overridden to keep the selected item in the action grouptruncationSelectin sync with the value of the parametertruncation.- Specified by:
parameterChangedin interfaceParameterizable- Overrides:
parameterChangedin classExhibit- Parameters:
param- The Parmeter whose value has been set.oldValue- The previous value of the parameter.newValue- The new, current value of the parameter. This is not necessarily guaranteed to be different from the old value (although it is for parameters definedin the VMM core).- See Also:
Exhibit.forceRedraw()
-
getAdditionalAnimationsForView
public ActionList getAdditionalAnimationsForView(View view)
Description copied from class:ExhibitThis method returns a list ofActionItemthat will be added to the Animation menu of the 3dxm applicaiton. The values in the list should ordinarily be commands (i.e.AbstractActionVMM) that run animations (although there is no way to enforce this restriction). These animations commands are in addition to the standard "Morph" and "Cyclic Morph" commands. Note that these commands are added to those returned byView#getAdditionalAnimations().In this top-level Exhibit class, the return value is a an empty list (but not null). In general, when overriding this method, subclasses should call "super.getAdditionalAnimationsForView()" to obtain a list of actions from the superclass. It can then add additional actions or remove or disable actions that are in the list from the superclass.
- Overrides:
getAdditionalAnimationsForViewin classExhibit- Parameters:
view- The view in which the animations will be run.
-
-
DMelt 3.0 © DataMelt by jWork.ORG