Package geomss.j3d

Class J3DGeomGroup<T extends GeomElement>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String USERDATA_KEY
      The key used to store this instance in the user data of the supplied GeomElement object.
      • Fields inherited from class org.jogamp.java3d.BranchGroup

        ALLOW_DETACH
      • Fields inherited from class org.jogamp.java3d.Group

        ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE
      • Fields inherited from class org.jogamp.java3d.Node

        ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
    • Constructor Summary

      Constructors 
      Constructor Description
      J3DGeomGroup​(GeomSSCanvas3D canvas, T geometry)
      Construct a J3DGeomGroup using the specified GeomElement as a reference.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static J3DRenderingPrefs getDefaultRenderingPrefs()  
      T getGeomElement()  
      J3DRenderingPrefs getRenderingPrefs()  
      RenderType getRenderType()
      Return the render type used for this group.
      boolean isDisplayed()
      Returns the display setting of this geometry group.
      boolean isMirrored()
      Returns a flag indicating if the geometry display is currently mirrored about the XZ plane of symmetry or not.
      static void setDefaultRenderingPrefs​(J3DRenderingPrefs prefs)
      Set the currently active rendering preferences that will be used to render future objects.
      void setDisplayed​(boolean visible)
      Sets the display of this geometry group to either displayed (true) or not displayed (false).
      static void setDrawTolerance​(Parameter<javax.measure.quantity.Length> tol)
      Set the tolerance used when drawing parametric objects such as curves and surfaces.
      static void setLineColor​(java.awt.Color color)
      Set the color to use when rendering curves and lines.
      static void setLineWidth​(int pixels)
      Set the width that line/curve objects are rendered in pixels.
      void setMirrored​(boolean mirrored)
      Set the display of a copy of this geometry mirrored across the XZ plane to either DISPLAYED (true) or NOT_DISPLAYED (false).
      static void setPointColor​(java.awt.Color color)
      Set the color to use when rendering points.
      static void setPointSize​(int pixels)
      Set the size that Point objects are rendered in pixels.
      void setRenderType​(RenderType type)
      Set the render type used for this group.
      • Methods inherited from class org.jogamp.java3d.BranchGroup

        cloneNode, compile, detach, pickAll, pickAll, pickAllSorted, pickAllSorted, pickAny, pickAny, pickClosest, pickClosest
      • Methods inherited from class org.jogamp.java3d.Group

        addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds
      • Methods inherited from class org.jogamp.java3d.Node

        cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
      • Methods inherited from class org.jogamp.java3d.SceneGraphObject

        clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • USERDATA_KEY

        public static final java.lang.String USERDATA_KEY
        The key used to store this instance in the user data of the supplied GeomElement object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • J3DGeomGroup

        public J3DGeomGroup​(GeomSSCanvas3D canvas,
                            T geometry)
        Construct a J3DGeomGroup using the specified GeomElement as a reference.
        Parameters:
        canvas - The canvas that the geometry is being rendered into.
        geometry - The GeomSS geometry to be turned into a Java3D node.
    • Method Detail

      • isDisplayed

        public boolean isDisplayed()
        Returns the display setting of this geometry group.
        Returns:
        true if the geometry is being displayed and false if it is not displayed.
      • setDisplayed

        public void setDisplayed​(boolean visible)
        Sets the display of this geometry group to either displayed (true) or not displayed (false). Subclasses that override this method should call "super.setDisplayed()" to maintain proper state and object display.
        Parameters:
        visible - Flag indicating if the geometry is displayed or not.
      • setMirrored

        public void setMirrored​(boolean mirrored)
        Set the display of a copy of this geometry mirrored across the XZ plane to either DISPLAYED (true) or NOT_DISPLAYED (false). Subclasses that override this method should call "super.setMirrored(mirrored)" to maintain proper state information.
        Parameters:
        mirrored - Flag indicating if the mirrored geometry should be displayed or not.
        See Also:
        isMirrored(), internalSetMirrored(boolean)
      • isMirrored

        public boolean isMirrored()
        Returns a flag indicating if the geometry display is currently mirrored about the XZ plane of symmetry or not.
        Returns:
        true if mirroring across the XZ plane is being DISPLAYED and false if it is NOT_DISPLAYED.
        See Also:
        setMirrored(boolean)
      • setRenderType

        public void setRenderType​(RenderType type)
        Set the render type used for this group. Sub-classes must provide specific implementations that depend on the implementation of the geometry and must call "super.setRenderType()" to properly maintain state.
        Parameters:
        type - Value indicating the way that some objects should be rendered.
        See Also:
        getRenderType()
      • setDefaultRenderingPrefs

        public static void setDefaultRenderingPrefs​(J3DRenderingPrefs prefs)
        Set the currently active rendering preferences that will be used to render future objects.
        Parameters:
        prefs - The rendering preferences to make current.
      • setPointColor

        public static void setPointColor​(java.awt.Color color)
        Set the color to use when rendering points. This is a convenience method for J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changePointColor(color)).
        Parameters:
        color - The Color to use for rending Point objects in the future.
      • setLineColor

        public static void setLineColor​(java.awt.Color color)
        Set the color to use when rendering curves and lines. This is a convenience method for J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changeLineColor(color)).
        Parameters:
        color - The Color to use for rending lines and curves objects in the future.
      • setPointSize

        public static void setPointSize​(int pixels)
        Set the size that Point objects are rendered in pixels. This is a convenience method for J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changePointSize(pixels)).
        Parameters:
        pixels - The size, in pixels, to use when rendering points in the future.
        Throws:
        java.lang.IllegalArgumentException - if the point size provided is < 1 pixel.
      • setLineWidth

        public static void setLineWidth​(int pixels)
        Set the width that line/curve objects are rendered in pixels. This is a convenience method for J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changeLineWidth(pixels)).
        Parameters:
        pixels - The width, in pixels, to use when rendering lines/curves in the future.
        Throws:
        java.lang.IllegalArgumentException - if the line size provided is < 1 pixel.
      • setDrawTolerance

        public static 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. This is a convenience method for J3DGeomGroup.setDefaultRenderingPrefs(getDefaultRenderingPrefs().changeDrawTolerance(tol)).
        Parameters:
        tol - The geometric tolerance to use when rendering parametric objects.