Package geomss.app

Class GeomSSBatch.PublicScene

    • Constructor Summary

      Constructors 
      Constructor Description
      PublicScene()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void center()
      Centers the geometry in the display.
      void centerAndZoom()
      Centers the geometry in the display and zooms until the geometry fills the display.
      void draw​(GeomElement newGeom)
      Draws the specified geometry element into the 3D scene without erasing the existing geometry.
      void draw​(GeomElement newGeom, boolean erase)
      Draws the specified geometry element in the 3D scene.
      void erase()
      Erases all the geometry from the 3D scene.
      void erase​(GeomElement geometry)
      Erases the specified geometry from the 3D scene (if possible).
      Parameter<javax.measure.quantity.Length> getDrawTolerance()
      Return the tolerance used when drawing parametric objects such as curves and surfaces.
      java.awt.Color getLineColor()
      Returns the color used when rendering curves and lines.
      int getLineWidth()
      Return the width that line/curve objects are rendered in pixels.
      java.awt.Color getPointColor()
      Returns the color used when rendering points.
      int getPointSize()
      Return the size that Point objects are rendered in pixels.
      ProjectionPolicy getProjectionPolicy()
      Retrieves the current projection policy for this scene.
      RenderType getRenderType()
      Returns the rendering type for the 1st item in the scene.
      float getSurfaceAlpha()
      Get the alpha or transparency used when rendering surfaces or point-arrays.
      java.awt.Color getSurfaceColor​(SurfaceColorType colorType)
      Get the color (of the specified type) used to render surfaces and point-arrays.
      float getSurfaceShininess()
      Get the shininess used when rendering surfaces and point-arrays.
      boolean isMirrored()
      Returns a flag indicating if the geometry display is currently mirrored about the XZ plane of symmetry or not.
      GeomList pick()
      Pick items from the scene by control-clicking with the mouse.
      void setDrawTolerance​(Parameter<javax.measure.quantity.Length> tol)
      Set the tolerance used when drawing parametric objects such as curves and surfaces.
      void setLineColor​(java.awt.Color color)
      Sets the color used when rendering curves and lines.
      void setLineWidth​(int pixels)
      Set the width that line/curve objects are rendered in pixels.
      void setMirrored​(boolean mirrored)
      Sets a flag indicating that the geometry is mirrored about the XZ plane of symmetry.
      void setPointColor​(java.awt.Color color)
      Sets the color used when rendering points.
      void setPointSize​(int pixels)
      Set the size that Point objects are rendered in pixels.
      void setProjectionPolicy​(ProjectionPolicy policy)
      Sets the projection policy for this scene.
      void setRenderType​(RenderType type)
      Sets rendering type for all the objects currently displayed in the entire scene.
      void setSurfaceAlpha​(float alpha)
      Set the alpha or transparency used to render surfaces and point-arrays.
      void setSurfaceColor​(SurfaceColorType colorType, java.awt.Color color)
      Set the color (of the specified type) used to render surfaces and point-arrays.
      void setSurfaceShininess​(float shininess)
      Set the shininess used when rendering surfaces and point-arrays.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • draw

        public void draw​(GeomElement newGeom)
        Description copied from interface: GeomSSScene
        Draws the specified geometry element into the 3D scene without erasing the existing geometry. This is identical to draw(newGeom, false);.
        Specified by:
        draw in interface GeomSSScene
        Parameters:
        newGeom - The new geometry to be displayed on the 3D canvas.
      • draw

        public void draw​(GeomElement newGeom,
                         boolean erase)
        Description copied from interface: GeomSSScene
        Draws the specified geometry element in the 3D scene.
        Specified by:
        draw in interface GeomSSScene
        Parameters:
        newGeom - The new geometry to be displayed on the 3D canvas.
        erase - Set to true to erase the geometry currently displayed. Set to false to add the new geometry to the existing display.
      • erase

        public void erase()
        Description copied from interface: GeomSSScene
        Erases all the geometry from the 3D scene.
        Specified by:
        erase in interface GeomSSScene
      • erase

        public void erase​(GeomElement geometry)
        Erases the specified geometry from the 3D scene (if possible).
        Specified by:
        erase in interface GeomSSScene
        Parameters:
        geometry - The specific geometry to be erased from the 3D scene.
      • center

        public void center()
        Centers the geometry in the display.
        Specified by:
        center in interface GeomSSScene
      • pick

        public GeomList pick()
        Pick items from the scene by control-clicking with the mouse. Returns a list of selected items.
        Specified by:
        pick in interface GeomSSScene
        Returns:
        A list of picked items.
      • setMirrored

        public void setMirrored​(boolean mirrored)
        Sets a flag indicating that the geometry is mirrored about the XZ plane of symmetry.
        Specified by:
        setMirrored in interface GeomSSScene
        Parameters:
        mirrored - Set to true to turn on mirroring.
      • isMirrored

        public boolean isMirrored()
        Returns a flag indicating if the geometry display is currently mirrored about the XZ plane of symmetry or not.
        Specified by:
        isMirrored in interface GeomSSScene
        Returns:
        a flag indicating if the geometry display is currently mirrored about the XZ plane of symmetry or not.
      • setPointColor

        public void setPointColor​(java.awt.Color color)
        Sets the color used when rendering points.
        Specified by:
        setPointColor in interface GeomSSScene
        Parameters:
        color - The color to use for points drawn in the future.
      • getPointColor

        public java.awt.Color getPointColor()
        Returns the color used when rendering points.
        Specified by:
        getPointColor in interface GeomSSScene
        Returns:
        the color used when rendering points.
      • setPointSize

        public void setPointSize​(int pixels)
        Set the size that Point objects are rendered in pixels.
        Specified by:
        setPointSize in interface GeomSSScene
        Parameters:
        pixels - The number of pixels to use when displaying points.
      • getPointSize

        public int getPointSize()
        Return the size that Point objects are rendered in pixels.
        Specified by:
        getPointSize in interface GeomSSScene
        Returns:
        the size that Point objects are rendered in pixels.
      • setLineColor

        public void setLineColor​(java.awt.Color color)
        Sets the color used when rendering curves and lines.
        Specified by:
        setLineColor in interface GeomSSScene
        Parameters:
        color - The color to use when rendering lines in the future.
      • getLineColor

        public java.awt.Color getLineColor()
        Returns the color used when rendering curves and lines.
        Specified by:
        getLineColor in interface GeomSSScene
        Returns:
        the color used when rendering curves and lines.
      • setLineWidth

        public void setLineWidth​(int pixels)
        Set the width that line/curve objects are rendered in pixels.
        Specified by:
        setLineWidth in interface GeomSSScene
        Parameters:
        pixels - The number of pixels line-width to use when rendering lines.
      • getLineWidth

        public int getLineWidth()
        Return the width that line/curve objects are rendered in pixels.
        Specified by:
        getLineWidth in interface GeomSSScene
        Returns:
        the width that line/curve objects are rendered in pixels.
      • setDrawTolerance

        public void setDrawTolerance​(Parameter<javax.measure.quantity.Length> tol)
        Set the tolerance used when drawing parametric objects such as curves and surfaces. This tolerance is used when determining how to subdivide parametric objects for rendering. If the input value is null or equal to 0, it will be silently ignored.
        Specified by:
        setDrawTolerance in interface GeomSSScene
        Parameters:
        tol - The tolerance used when drawing parametric objects such as curves and surfaces.
      • getDrawTolerance

        public Parameter<javax.measure.quantity.Length> getDrawTolerance()
        Return the tolerance used when drawing parametric objects such as curves and surfaces. This tolerance is used when determining how to subdivide parametric objects for rendering.
        Specified by:
        getDrawTolerance in interface GeomSSScene
        Returns:
        The tolerance used when drawing parametric objects such as curves and surfaces.
      • setProjectionPolicy

        public void setProjectionPolicy​(ProjectionPolicy policy)
        Sets the projection policy for this scene. This specifies the type of projection transform that will be generated. A value of PARALLEL_PROJECTION specifies that a parallel projection transform is generated. A value of PERSPECTIVE_PROJECTION specifies that a perspective projection transform is generated.
        Specified by:
        setProjectionPolicy in interface GeomSSScene
        Parameters:
        policy - The new projection policy, one of PARALLEL_PROJECTION or PERSPECTIVE_PROJECTION.
      • setSurfaceColor

        public void setSurfaceColor​(SurfaceColorType colorType,
                                    java.awt.Color color)
        Set the color (of the specified type) used to render surfaces and point-arrays.
        Specified by:
        setSurfaceColor in interface GeomSSScene
        Parameters:
        colorType - The aspect or type of the surface color that is being set.
        color - The color to use for the specified type of surface color. The alpha is ignored.
        See Also:
        setSurfaceAlpha(float)
      • getSurfaceColor

        public java.awt.Color getSurfaceColor​(SurfaceColorType colorType)
        Get the color (of the specified type) used to render surfaces and point-arrays.
        Specified by:
        getSurfaceColor in interface GeomSSScene
        Parameters:
        colorType - The aspect or type of the surface color that is being set. If AMBIENT_AND_DIFFUSE is passed in, then only the ambient color is returned!
        Returns:
        The color used for the specified type of surface color. Alpha is ignored.
        See Also:
        getSurfaceAlpha()
      • setSurfaceAlpha

        public void setSurfaceAlpha​(float alpha)
        Set the alpha or transparency used to render surfaces and point-arrays.
        Specified by:
        setSurfaceAlpha in interface GeomSSScene
        Parameters:
        alpha - The alpha value to use (0.0=completely transparent, 1.0=completely opaque).
      • getSurfaceAlpha

        public float getSurfaceAlpha()
        Get the alpha or transparency used when rendering surfaces or point-arrays.
        Specified by:
        getSurfaceAlpha in interface GeomSSScene
        Returns:
        The alpha value used (0.0=completely transparent, 1.0=completely opaque).
      • setSurfaceShininess

        public void setSurfaceShininess​(float shininess)
        Set the shininess used when rendering surfaces and point-arrays.
        Specified by:
        setSurfaceShininess in interface GeomSSScene
        Parameters:
        shininess - The shininess to use in the range [0.0, 1.0] where 0.0 is not shiny and 1.0 is very shiny. Values outside this range are clamped.
      • getSurfaceShininess

        public float getSurfaceShininess()
        Get the shininess used when rendering surfaces and point-arrays.
        Specified by:
        getSurfaceShininess in interface GeomSSScene
        Returns:
        The shininess to use in the range [0.0, 1.0] where 0.0 is not shiny and 1.0 is very shiny.