|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.View vmm.core3D.View3D vmm.core3D.View3DWithLightSettings vmm.core3D.View3DLit
public class View3DLit
Field Summary | |
---|---|
protected ToggleAction |
dragAsSurfaceToggle
ToggleAction for turning the dragAsSurface property on and off. |
static int |
NO_ORIENTATION
A constant that can be used as a parameter to setOrientation(int) to specify that
surfaces have no orientation, so that both faces of a patch are treated as front faces. |
static int |
NORMAL_ORIENTATION
A constant that can be used as a parameter to setOrientation(int) to specify that
surfaces have normal orientation, in which the normal vector points out from the front face. |
static int |
PATCH_RENDERING
A constant that can be used as a parameter to setRenderingStyle(int) to specify that
surfaces should always be rendered as solid patches. |
static int |
REVERSE_ORIENTATION
A constant that can be used as a parameter to setOrientation(int) to specify that
surfaces have reverse orientation, in which the normal vector points out from the back face. |
protected ActionRadioGroup |
selectColoredCommands
Commands for choosing between a black and white drawing or a color drawing. |
protected ActionRadioGroup |
selectOrientationCommands
Commands for selecting orientation type. |
protected ActionRadioGroup |
selectRenderingCommands
Commands for selecting a rendering style. |
protected ActionRadioGroup |
selectShadingCommands
Commands for choosing between phong shading and flat shading. |
protected AbstractActionVMM |
setTransparencyCommand
|
static int |
WIREFRAME_RENDERING
A constant that can be used as a parameter to setRenderingStyle(int) to specify that
surfaces should always be rendered as wireframes. |
Fields inherited from class vmm.core3D.View3DWithLightSettings |
---|
lightingEnabledToggle, lightSettingsCommand |
Fields inherited from class vmm.core3D.View3D |
---|
CROSS_EYE_STEREO_VIEW, leftStereographOSI, MONOCULAR_VIEW, projectionCommands, RED_GREEN_STEREO_VIEW, rightStereographOSI, set3DViewOptionsAction, setViewpointAction, stereoComposite, STEREOGRAPH_VIEW, transform3D, viewStyleCommands |
Fields inherited from class vmm.core.View |
---|
backgroundCommands, buildAnimation, buildingImageForFilmstrip, currentGraphics, decorations, directOffscreenDrawing, fullOSI, needsRedraw, offscreenImageType, parameters, showAxesAction |
Constructor Summary | |
---|---|
View3DLit()
Create a View3DLit object, using default light settings and normal orientation. |
Method Summary | |
---|---|
void |
drawSurface(Grid3D surfaceData)
Draws an entire surface represented in the form of a Grid3D object, taking into account current lighting and rendering settings. |
void |
drawSurface(Grid3D surfaceData,
double startPercent,
double endPercent)
Draws all or part of a surface that is represented in the form of a Grid3D object, taking into account current lighting and rendering settings. |
void |
fillPolygon(Vector3D[] vertices,
java.awt.Color outlineColor)
Draws a filled-in polygon in current drawing color. |
boolean |
getBlackAndWhite()
Tells whether surfaces are rendered in gray-scale rather than color. |
boolean |
getDragAsSurface()
Determines how surfaces are rendered when the "fast draw" mode is in effect, such as during rotation, zooming, or dragging by the user. |
int |
getOrientation()
Returns the current orientation setting for surfaces. |
boolean |
getPhongShading()
Returns the current shading setting, true for Phong shading or false for flat shading. |
int |
getRenderingStyle()
Returns the current rendering style. |
ActionList |
getSettingsCommands()
Adds a checkbox for setting the dragAsSurface property to any settings contributed by the superclass. |
double |
getTransparency()
Returns the current degree of transparency. |
ActionList |
getViewCommands()
Adds commands for setting various View3DLit options to any view commands contributed by the superclass. |
void |
setBlackAndWhite(boolean blackAndWhite)
Set whether surfaces should be rendered in gray-scale or in color. |
void |
setDragAsSurface(boolean dragAsSurface)
Specify how surfaces are rendered when the "fast draw" mode is in effect, such as during rotation, zooming, or dragging by the user. |
void |
setEnableThreeD(boolean enable)
Sets the enableThreeD property. |
void |
setOrientation(int orientation)
Set how front and back faces of surface patches are determined. |
void |
setPhongShading(boolean phongShading)
Select the type of shading to be used for surface patches. |
void |
setRenderingStyle(int style)
Sets the rendering style that is used to draw surfaces. |
void |
setTransparency(double transparency)
Set the degree of transparency for surfaces displayed in this View3DLit. |
void |
setViewStyle(int style)
Overridden in this subclass to swap in the anaglyph or non-anaglph light settings, as appropriate. |
void |
takeExhibit(View view,
boolean shareTransform)
Set this View to view the same exhibit as another specififed view. |
Methods inherited from class vmm.core3D.View3DWithLightSettings |
---|
addExtraXML, getLightingEnabled, getLightSettings, readExtraXML, setAnaglyphLightSettings, setLightingEnabled, setLightSettings, setNonAnaglyphLightSettings |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WIREFRAME_RENDERING
setRenderingStyle(int)
to specify that
surfaces should always be rendered as wireframes.
public static final int PATCH_RENDERING
setRenderingStyle(int)
to specify that
surfaces should always be rendered as solid patches.
public static final int NORMAL_ORIENTATION
setOrientation(int)
to specify that
surfaces have normal orientation, in which the normal vector points out from the front face.
public static final int REVERSE_ORIENTATION
setOrientation(int)
to specify that
surfaces have reverse orientation, in which the normal vector points out from the back face.
public static final int NO_ORIENTATION
setOrientation(int)
to specify that
surfaces have no orientation, so that both faces of a patch are treated as front faces.
protected ActionRadioGroup selectRenderingCommands
protected ActionRadioGroup selectOrientationCommands
protected ActionRadioGroup selectShadingCommands
protected ActionRadioGroup selectColoredCommands
protected ToggleAction dragAsSurfaceToggle
setDragAsSurface(boolean)
protected AbstractActionVMM setTransparencyCommand
Constructor Detail |
---|
public View3DLit()
Method Detail |
---|
public int getRenderingStyle()
setRenderingStyle(int)
public void setRenderingStyle(int style)
style
- the new rendering style; must be one of the constants WIREFRAME_RENDERING or PATCH_RENDERINGpublic boolean getBlackAndWhite()
setBlackAndWhite(boolean)
public void setBlackAndWhite(boolean blackAndWhite)
blackAndWhite
- true if surfaces are to be drawn in gray-scale; false if they are to be drawn in colorpublic int getOrientation()
setOrientation(int)
public void setOrientation(int orientation)
orientation
- the method for determining front/back faces of surface patches. Must be one of the contstants
NORMAL_ORIENTATION, REVERSE_ORIENTATION, or NO_ORIENTATION.public boolean getPhongShading()
getPhongShading()
public void setPhongShading(boolean phongShading)
public boolean getDragAsSurface()
setDragAsSurface(boolean)
,
View.setFastDrawing(boolean)
public void setDragAsSurface(boolean dragAsSurface)
public double getTransparency()
View3D.setTransform(vmm.core.Transform)
public void setTransparency(double transparency)
transparency
- the desired degree of transparency. The value is clamped so that it lies
in the range 0 to 1, inclusive.public void setEnableThreeD(boolean enable)
View3D
Note that if this view has an Axes decoration, they type of Axes decoration (Axes2D or Axes3D) is set to match the new state of the enableThreeD property.
WARNING: This method does NOT do anything about mouse tasks, so you might want to change the mouse task in this View's display at the same time that you call this method.
setEnableThreeD
in class View3D
public ActionList getSettingsCommands()
getSettingsCommands
in class View3DWithLightSettings
View.getSettingsCommands()
public void setViewStyle(int style)
View3DWithLightSettings
View3DWithLightSettings.setAnaglyphLightSettings(LightSettings)
and View3DWithLightSettings.setNonAnaglyphLightSettings(LightSettings)
.
setViewStyle
in class View3DWithLightSettings
style
- the new view style. This is ignored if it is not one of the four legal options.public void takeExhibit(View view, boolean shareTransform)
View3D
takeExhibit
in class View3D
view
- The view whose Exhibit is to be copied. After the method is called, both views will
be drawing the same exhibit. If null, then the exhibit of this view will also be set to null.shareTransform
- If true, the two views will share the same Transform, so that changes made to the transform in
one will also result in a change in the other.public ActionList getViewCommands()
getViewCommands
in class View3D
View.getViewCommands()
public void drawSurface(Grid3D surfaceData)
public void drawSurface(Grid3D surfaceData, double startPercent, double endPercent)
If fast drawing mode is in effect, the entire
surface is always drawn; the startIndex and endIndex are ignored in this case. Also, if WIREFRAME_RENDERING
is in effect, the entire surface is drawn in wireframe form. For normal speed rendering with patch display, the
startPercent and endPercent specify a range of subpatches to draw; these numbers are given as percentages
of the total number of available patches (taking into account patches that have been clipped).
The subpatches are sorted into back-to-front order. (The total number
of subpatches can be determined by calling Grid3D.getSubPatchCountInSurface()
, but note that some
of the patches might not be included in the drawing or in the calculation of percentages because ofclipping.)
public void fillPolygon(Vector3D[] vertices, java.awt.Color outlineColor)
IFS
.
vertices
- The vertices of the polygon, in object coordinates.outlineColor
- If non-null, then the polygon is outlined with this color.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |