View3DWithLightSettings
vmm3d.core3D

Class View3DWithLightSettings

    • Constructor Detail

      • View3DWithLightSettings

        public View3DWithLightSettings()
        Create the view, with a default LightSettings object.
    • Method Detail

      • setLightSettings

        public void setLightSettings(LightSettings lightSettings)
        Sets the current light settings for this view. Note that calling this method does not automatically force a redraw; it simply replaces the current light settings in the view. If 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.
        Parameters:
        lightSettings - the new light settings; if this is null, the current light settings are not changed.
      • getLightingEnabled

        public boolean getLightingEnabled()
        Check whether lighting is currently enabled.
        See Also:
        setLightingEnabled(boolean)
      • setLightingEnabled

        public void setLightingEnabled(boolean lightingEnabled)
        Set whether lighting is currently enabled. When lighting is enabled, surface colors are computed based on intrinsic color plus illumination. When it is disabled, surface patches are drawn using intrinsic color only (leading to a completely flat appearance). The default value is true.
        Parameters:
        lightingEnabled -
      • getSettingsCommands

        public ActionList getSettingsCommands()
        Adds a checkbox for setting the lighting and dragAsSurface commands to any settings contributed by the superclass.
        Overrides:
        getSettingsCommands in class View3D
        See Also:
        View#getSettingsCommands()
      • addExtraXML

        public void addExtraXML(Document containingDocument,               Element viewElement)
        Overridden to add light settings info.
        Overrides:
        addExtraXML in class View3D
        Parameters:
        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.
        See Also:
        View.readExtraXML(Element)
      • readExtraXML

        public void readExtraXML(Element viewInfo)                  throws IOException
        Overridden to read back the light settings info.
        Overrides:
        readExtraXML in class View3D
        Parameters:
        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.
        Throws:
        IOException - If an error is found, an exception of type IOException should be thrown. This will abort the whole processing of the XML file.

SCaVis 2.0 © jWork.ORG