Class RegularPolyhedron

  • All Implemented Interfaces:
    EventListener, ChangeListener, Decorateable, Parameterizable
    Direct Known Subclasses:
    Cube, Dodecahedron, Icosahedron, Octahedron, RhombicDodecahedron, Rhombohedron, Tetrahedron

    public abstract class RegularPolyhedronextends 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.

    • Method Detail

      • getStellationWanted

        public boolean getStellationWanted()
      • setStellationWanted

        public void setStellationWanted(boolean stellationWanted)
      • parameterChanged

        public void parameterChanged(Parameter param,                    Object oldValue,                    Object newValue)
        This is overridden to keep the selected item in the action group truncationSelect in sync with the value of the parameter truncation.
        Specified by:
        parameterChanged in interface Parameterizable
        parameterChanged in class Exhibit
        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:
      • getAdditionalAnimationsForView

        public ActionList getAdditionalAnimationsForView(View view)
        Description copied from class: Exhibit
        This method returns a list of ActionItem that 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 by View#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.

        getAdditionalAnimationsForView in class Exhibit
        view - The view in which the animations will be run.

SCaVis 1.7 ©