|
|||||||||
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
public class View3DWithLightSettings
A 3D view, with associated light settings. This class is the base class for View3DLit
, which adds
a varitey of other lighting controls. A View3DWithLightSettings was introduced for use with
implicit surfaces, where many of the lighting controls in View3DLit are not appropriate.
Field Summary | |
---|---|
protected ToggleAction |
lightingEnabledToggle
ToggleAction for enabling/disabling lighting. |
protected AbstractActionVMM |
lightSettingsCommand
Command for displaying a light settings dialog. |
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 | |
---|---|
View3DWithLightSettings()
Create the view, with a default LightSettings object. |
Method Summary | |
---|---|
void |
addExtraXML(org.w3c.dom.Document containingDocument,
org.w3c.dom.Element viewElement)
Overridden to add light settings info. |
boolean |
getLightingEnabled()
Check whether lighting is currently enabled. |
LightSettings |
getLightSettings()
Retrieve the current LightSettings for this view. |
ActionList |
getSettingsCommands()
Adds a checkbox for setting the lighting and dragAsSurface commands to any settings contributed by the superclass. |
void |
readExtraXML(org.w3c.dom.Element viewInfo)
Overridden to read back the light settings info. |
protected void |
setAnaglyphLightSettings(LightSettings lightSettings)
Set the light setting object that is used for anaglyph view style. |
void |
setLightingEnabled(boolean lightingEnabled)
Set whether lighting is currently enabled. |
void |
setLightSettings(LightSettings lightSettings)
Sets the current light settings for this view. |
protected void |
setNonAnaglyphLightSettings(LightSettings lightSettings)
Set the light setting object that is used for non-anaglyph view styles. |
void |
setViewStyle(int viewStyle)
Overridden in this subclass to swap in the anaglyph or non-anaglph light settings, as appropriate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AbstractActionVMM lightSettingsCommand
protected ToggleAction lightingEnabledToggle
View3DLit.getSettingsCommands()
.
Constructor Detail |
---|
public View3DWithLightSettings()
Method Detail |
---|
public LightSettings getLightSettings()
LightSettings
for this view. The return value can
depend on whether the current view style is anaglyph. By default, the
same light settings object is used for both; this can only change if either
setAnaglyphLightSettings(LightSettings)
or setNonAnaglyphLightSettings(LightSettings)
is called in a subclass.
public void setLightSettings(LightSettings lightSettings)
setAnaglyphLightSettings(LightSettings)
or setNonAnaglyphLightSettings(LightSettings)
has been called, then this only affects the light settings for the current view style;
otherwise, the new light settings replaces the light settings that are used for all view styles.
lightSettings
- the new light settings; if this is null, the current light settings are not changed.protected void setAnaglyphLightSettings(LightSettings lightSettings)
lightSettings
- the new lidht settings object; if this is null, nothing is done.protected void setNonAnaglyphLightSettings(LightSettings lightSettings)
lightSettings
- the new lidht settings object; if this is null, nothing is done.public boolean getLightingEnabled()
setLightingEnabled(boolean)
public void setLightingEnabled(boolean lightingEnabled)
lightingEnabled
- public void setViewStyle(int viewStyle)
setAnaglyphLightSettings(LightSettings)
and setNonAnaglyphLightSettings(LightSettings)
.
setViewStyle
in class View3D
viewStyle
- the new view style. This is ignored if it is not one of the four legal options.public ActionList getSettingsCommands()
getSettingsCommands
in class View3D
View.getSettingsCommands()
public void addExtraXML(org.w3c.dom.Document containingDocument, org.w3c.dom.Element viewElement)
addExtraXML
in class View3D
containingDocument
- The overall XML document that contains the view 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 view 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 view
object from the XML represenation.View.readExtraXML(Element)
public void readExtraXML(org.w3c.dom.Element viewInfo) throws java.io.IOException
readExtraXML
in class View3D
viewInfo
- The <view> element from the XML file that contains the information about this
view. 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |