|
|||||||||
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.surface.Surface vmm.surface.parametric.SurfaceParametric
public abstract class SurfaceParametric
Defines a suface by a set of parametric equations defined on a rectangular domain in the uv-plane.
Field Summary | |
---|---|
static int |
COLOR_GAUSS_CURVATURE
|
static int |
COLOR_MEAN_CURVATURE
|
static int |
COLOR_TWO_SIDED_DEFAULT
|
static int |
COLOR_TWO_SIDED_USER
|
static int |
COLOR_USER
|
static int |
COLOR_USER_FUNCTION_HSB
|
static int |
COLOR_USER_FUNCTION_RGB
|
static int |
COLOR_WHITE
One of the types of surface coloration, for use in the setColoration method. |
protected RealParamAnimateable |
umax
The upper limit of u values for the domain of the parametric functions that define this surface. |
protected RealParamAnimateable |
umin
The lower limit of u values for the domain of the parametric functions that define this surface. |
protected RealParamAnimateable |
vmax
The upper limit of v values for the domain of the parametric functions that define this surface. |
protected RealParamAnimateable |
vmin
The lower limit of v values for the domain of the parametric functions that define this surface. |
Fields inherited from class vmm.surface.Surface |
---|
data, uPatchCount, vPatchCount |
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 | |
---|---|
SurfaceParametric()
Adds umin, umax, vmin, and vmax as parameters of the exhibit. |
Method Summary | |
---|---|
void |
addExtraXML(org.w3c.dom.Document containingDocument,
org.w3c.dom.Element viewElement)
This method is called when an XML representation of this exhibit is being constructed by the SaveAndRestore class to give the exhibit a chance to write any extra infomation that
is not saved by default. |
protected void |
createData()
Computes the data for the surface using equally spaced values of u and v in the ranges defined by umin, umax, vmin, and vmax. |
Vector3D |
deriv_u(double u,
double v)
Returns an approximation for the partial derivative in the direction u at a specified (u,v) point. |
Vector3D |
deriv_v(double u,
double v)
Returns an approximation for the partial derivative in the direction v at a specified (u,v) point. |
Vector3D |
gaussMap(double u,
double v)
|
ActionList |
getActionsForView(View view)
This method returns a list of ActionItem that can be applied to a View that
contains this Exhibit. |
void |
readExtraXML(org.w3c.dom.Element viewInfo)
This method is called when this exhibit is being reconstructed from an XML representation by the SaveAndRestore class. |
void |
removeView(View view)
Overridden to shut down the task manager that is used for parallelization, when there are no more views of the exhibit. |
Vector3D |
surfaceNormal(double u,
double v)
Returns the Surface Normal, by default from numerical differentiation. |
abstract Vector3D |
surfacePoint(double u,
double v)
The parametric equations that define the surface, given as a function from the uv-plane into R3. |
Methods inherited from class vmm.surface.Surface |
---|
computeDrawData3D, doDraw3D, getBuildAnimation, getDefaultOrientation, getDefaultView, setDefaultOrientation |
Methods inherited from class vmm.core3D.Exhibit3D |
---|
computeDrawDataHook, doDrawHook, getDefaultTransform, 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 COLOR_WHITE
public static final int COLOR_USER
public static final int COLOR_TWO_SIDED_DEFAULT
public static final int COLOR_TWO_SIDED_USER
public static final int COLOR_GAUSS_CURVATURE
public static final int COLOR_MEAN_CURVATURE
public static final int COLOR_USER_FUNCTION_HSB
public static final int COLOR_USER_FUNCTION_RGB
protected RealParamAnimateable umin
protected RealParamAnimateable umax
protected RealParamAnimateable vmin
protected RealParamAnimateable vmax
Constructor Detail |
---|
public SurfaceParametric()
Method Detail |
---|
public abstract Vector3D surfacePoint(double u, double v)
public Vector3D deriv_u(double u, double v)
public Vector3D deriv_v(double u, double v)
public Vector3D surfaceNormal(double u, double v)
public void removeView(View view)
removeView
in class Exhibit
view
- The view that is no longer displaying this exhibit.protected void createData()
createData
in class Surface
public ActionList getActionsForView(View view)
Exhibit
ActionItem
that can be applied to a View that
contains this Exhibit. If the view parameter is null, it should return actions
that are appropriate in any View.
View is presumably one that is displaying this 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.
In this top-level Exhibit class, the return value is a list that contains
one object of type AbstractActionVMM
. The action represents the "Create" command, which is meant to run the
"create animation" of the Exhibit.
In general, when overriding this method, subclasses should call "super.getActionsForView()" 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.
getActionsForView
in class Exhibit
public void addExtraXML(org.w3c.dom.Document containingDocument, org.w3c.dom.Element viewElement)
Exhibit
SaveAndRestore
class to give the exhibit a chance to write any extra infomation that
is not saved by default. Any Parameters associated with the exhibit are
saved automatically. Note that Decorations associated with the exhibit
are NOT saved automatically UNLESS the decoration class is marked with a VMMSave
annotation. Property variables will also be saved automatically IF they are marked
with VMMSave
annotations.
The method in this top level class does nothing.
When a subclass overrides this method, it should ordinarily start by calling super.addExtraXML(containingDocument,exhibitElement) to make sure that information from the superclass is saved.
addExtraXML
in class Exhibit
containingDocument
- The overall XML document that contains the exhibit Element that is being created.
This parameter is necessary because it is needed to create any nested subelements that are to be added
to the exhibit element.viewElement
- The XML element that is being constructed. This element already exists; the
purpose of this method to add any extra information that would be needed to reconstruct this exhibit
object from the XML represenation.Exhibit.readExtraXML(Element)
public void readExtraXML(org.w3c.dom.Element viewInfo) throws java.io.IOException
Exhibit
SaveAndRestore
class. The Exhibit object has already been created, and default information
(parameters and decorations) have been retrieved. This method is responsible
for retrieving any data that was written by Exhibit.addExtraXML(Document, Element)
,
except that properties written with SaveAndRestore.addProperty(Object, String, Document, Element)
are retrieved automatically, and decorations saved with SaveAndRestore.addDecorationElement(Document, Element, Decoration)
are retrieved automatically.
The method in this top-level Exhibit class does nothing.
In general, when a subclass overrides this method, it should be sure to call super.readExtraXML(exhibitInfo).
readExtraXML
in class Exhibit
viewInfo
- The <exhibit> element from the XML file that contains the information about this
exhibit. Some methods from the SaveAndRestore
class might be useful for getting the data.
java.io.IOException
- If an error is found, an exception of type IOException should be thrown.
This will abort the whole processing of the XML file.Exhibit.addExtraXML(Document, Element)
public Vector3D gaussMap(double u, double v)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |