vmm3d.core3D
Class Exhibit3D
- java.lang.Object
-
- vmm3d.core.Exhibit
-
- vmm3d.core3D.Exhibit3D
-
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- ConformalMap, IFS, LatticeModel, ODE_3D, SpaceCurve, Surface, SurfaceImplicit
public abstract class Exhibit3D extends Exhibit
An exhibit that can be rendered in 3D can be defined as a subclass of this class. It is not an absolute requirement that a 3D exhibit be a subclass of this class, since an Exhibit is always in charge of rendering itself. However, this class does provide some convenient default behavior for 3D exhibits. Remember that it is possible for a single exhibit to have both 2D and 3D views.
-
-
Constructor Summary
Constructors Constructor and Description Exhibit3D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description TransformgetDefaultTransform(View view)Returns the default transform for use in the specified View.ViewgetDefaultView()Returns the default View of this Exhibit.Vector3DgetDefaultViewpoint()Returns the default viewpoint for viewing this Exhibit in 3D.Vector3DgetDefaultViewUp()Returns the default view up for viewing this Exhibit in 3D.voidsetDefaultViewpoint(Vector3D defaultViewpoint)Set the default viewpoint for viewing this exhibit in 3D.voidsetDefaultViewUp(Vector3D defaultViewUp)Set the default view up vector for viewing this exhibit in 3D.-
Methods inherited from class vmm3d.core.Exhibit
addChangeListener, addDecoration, addExtraXML, addView, clearDecorations, forceRedraw, getActionsForView, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getCreateAnimation, 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
-
-
-
-
Method Detail
-
getDefaultTransform
public Transform getDefaultTransform(View view)
Returns the default transform for use in the specified View. If the View is an instance of theView3Dclass, then aTransform3Dobject is returned; this object is constructed from the exhibit's default viewpoint and default window. If the view is not a View3D, then a 2DTransformis returned that is constructed using the exhibit's default window only.- Overrides:
getDefaultTransformin classExhibit- Parameters:
view- The View is provided as a parameter since there might be several types of View appropriate for a given exhibit, and they might require different Transforms. In particular, for example, a 3D View will require a 3D Transform.- Returns:
- In this top-level Exhibit class, the Transform that is returned
is a 2D Transform created by calling "new Transform(xmin,xmax,ymin,ymax)" where the values
of xmin, xmax, ymin, and ymax are taken from the array returned
by
getDefaultWindow. - See Also:
setDefaultViewpoint(Vector3D),Exhibit.setDefaultWindow(double, double, double, double)
-
getDefaultView
public View getDefaultView()
Returns the default View of this Exhibit. In the Exhibit3D class, the return value is a basicView3D.- Overrides:
getDefaultViewin classExhibit
-
getDefaultViewpoint
public Vector3D getDefaultViewpoint()
Returns the default viewpoint for viewing this Exhibit in 3D.- See Also:
setDefaultViewpoint(Vector3D)
-
setDefaultViewpoint
public void setDefaultViewpoint(Vector3D defaultViewpoint)
Set the default viewpoint for viewing this exhibit in 3D. The default viewpoint is used to construct the default 3D view of this Exhibit ingetDefaultTransform(View). Subclasses of Exhibit3D can call this method -- probably in a construtor -- to set a resonable viewpoint for the particular exhibit. If the default viewpoint is set to null, then the default of theTransform3Dclass is used; this default is the point (20,0,0).- Parameters:
defaultViewpoint- the default viewpoint for this Exhibit3D, or null to indicate that the default viewpoint in Transform3D is to be used.
-
getDefaultViewUp
public Vector3D getDefaultViewUp()
Returns the default view up for viewing this Exhibit in 3D.- See Also:
setDefaultViewUp(Vector3D)
-
setDefaultViewUp
public void setDefaultViewUp(Vector3D defaultViewUp)
Set the default view up vector for viewing this exhibit in 3D. The value of this vector is used to set the view up vector when the exhibit is installed. The initial value is null, which indicates that the default view up should be accepeted.- Parameters:
defaultViewUp- the default view up vector for this Exhibit3D, or null to indicate that the default view up should be accepted.
-
-
DMelt 3.0 © DataMelt by jWork.ORG