|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.Exhibit vmm.core3D.Exhibit3D vmm.latticemodel.LatticeModel
public abstract class LatticeModel
Nested Class Summary | |
---|---|
protected class |
LatticeModel.LatticeData
|
protected class |
LatticeModel.LMTransform
|
class |
LatticeModel.LMView
|
Fields inherited from class vmm.core3D.Exhibit3D |
---|
defaultViewpoint, defaultViewUp, previousTransform3D |
Fields inherited from class vmm.core.Exhibit |
---|
decorations, exhibitNeedsRedraw, isMorphing, morphingView, parameters, previousTransform |
Constructor Summary | |
---|---|
LatticeModel()
|
Method Summary | |
---|---|
protected void |
doDraw3D(java.awt.Graphics2D g,
View3D view,
Transform3D transform)
Draws this Exhibit in a 3D view. |
protected void |
drawTransverse(View3D view)
|
protected abstract double |
externalForceLaw(double x,
double theLatticeSpacing)
|
Animation |
getCreateAnimation(View view)
This method is called to "create" the Exhibit. |
Transform |
getDefaultTransform(View view)
Returns the default transform for use in the specified View. |
View |
getDefaultView()
Returns the default View of this Exhibit. |
ActionList |
getSettingsCommandsForView(View view)
Returns a list of "settings commands" that can be applied to this Exibit, when displayed in the specified View. |
protected abstract double |
internalForceLaw(double x,
double theLatticeSpacing)
|
protected abstract double |
potentialEnergy(double x,
double theLatticeSpacing)
|
Methods inherited from class vmm.core3D.Exhibit3D |
---|
computeDrawData3D, computeDrawDataHook, doDrawHook, getDefaultViewpoint, getDefaultViewUp, setDefaultViewpoint, setDefaultViewUp |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_NUMBER_OF_NODES
public static final int DISPLAY_TRANSVERSE
public static final int DISPLAY_LONGITUDINAL
public static final int DISPLAY_CIRCILAR
public static final int DISPLAY_PENDULUM
public static final int DISPLAY_BRIDGE
public static final int DISPLAY_FPU_GRAPH
public static final int BOUNDARY_CONDITION_ZERO
public static final int BOUNDARY_CONDITION_PERIODIC
public static final int INITIAL_SHAPE_SINUSOIDAL
public static final int INITIAL_SHAPE_GAUSSIAN
public static final int INITIAL_SHAPE_THERMAL
public static final int INITIAL_SHAPE_KINK
public static final int INITIAL_SHAPE_BREATHER
public static final int INITIAL_MODE_FIRST
public static final int INITIAL_MODE_SECOND
public static final int INITIAL_MODE_FOURTH
public static final int INITIAL_MODE_EIGHTH
public static final int INITIAL_MODE_SIXTEENTH
protected int numIterations
protected double defaultStepSize
protected int defaultBoundaryCondition
protected int defaultInitialShape
protected int defaultInitialMode
protected int defaultDisplayStyle
protected boolean canShowNormalModeDisplay
protected double defaultLatticeLength
protected double defaultLatticeDensity
protected double defaultAmplitude
protected int defaultNumberOfNodes
protected double defaultScaleFactor
protected boolean MaxPermittedDisplacementExceeded
Constructor Detail |
---|
public LatticeModel()
Method Detail |
---|
protected abstract double potentialEnergy(double x, double theLatticeSpacing)
protected abstract double internalForceLaw(double x, double theLatticeSpacing)
protected abstract double externalForceLaw(double x, double theLatticeSpacing)
protected void drawTransverse(View3D view)
protected void doDraw3D(java.awt.Graphics2D g, View3D view, Transform3D transform)
Exhibit3D
Exhibit3D.computeDrawData3D(View3D, boolean, Transform3D, Transform3D)
has already been called, so that any cached data should be correct.
Note that this method is called only if the Exhibit is being drawn in a View3D. Exhibits that have
both two and three dimensional renderings should also override Exhibit.doDraw(Graphics2D, View, Transform)
.
When drawing a 3D exhibit, you are strongly advised to use the drawing routines supplied by the
View3D
and View3DLit
classes. These routines will automatically produce the correct results
in stereo views -- the same is not true about direct drawing to the graphics context.
doDraw3D
in class Exhibit3D
g
- the graphics context where the exhibit is being drawn.view
- The View3D in which the exhibit is being drawn. In general, it is advisable to use the view for
all drawing operations.transform
- The transform that is being used to draw the exhibit.public View getDefaultView()
Exhibit3D
View3D
.
getDefaultView
in class Exhibit3D
public Animation getCreateAnimation(View view)
Exhibit
getCreateAnimation
in class Exhibit
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.
public ActionList getSettingsCommandsForView(View view)
Exhibit
The items in the returned list must implement the ActionItem interface and
generally belong to one of the classes AbstractActionVMM
,
ToggleAction
, ActionRadioGroup
, or
ActionList
. Null items represent separators.
The idea is that the list items will be added to a menu or otherwise presented to the user
so that the user can invoke the commands (with ActionList items representing submenus).
In this top-level Exhibit class, the list contains several commands that call up dialogs where the user can change various settings. (These include: "Set Parameters", "Set Morphing", "Set Number of Frames", and "Set Visible Ranges".) Note that for these commands, the View parameter is used simply to get the View's Display, which is used as the parent of the dialog.
In general, when overriding this method, subclasses should call "super.getSettingsCommandsForView()" to obtain a list of commands from the superclass. It can then add additional commands or remove or disable commands that are in the list from the superclass.
getSettingsCommandsForView
in class Exhibit
public Transform getDefaultTransform(View view)
Exhibit3D
View3D
class, then a Transform3D
object is returned; this object is constructed from the
exhibit's default viewpoint and default window. If the view is not a View3D, then a 2D Transform
is
returned that is constructed using the exhibit's default window only.
getDefaultTransform
in class Exhibit3D
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.
getDefaultWindow
.Exhibit3D.setDefaultViewpoint(Vector3D)
,
Exhibit.setDefaultWindow(double, double, double, double)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |