Class PolygonSet3DInt

All Implemented Interfaces:
java.awt.datatransfer.Transferable, java.lang.Comparable<InterfaceShape>, AttributeListener, AttributeObject, InterfaceObject, PersistentObject, VariableObject, PopupMenuObject, NamedObject, InterfaceQueryObject, InterfaceShapeQueryObject, VertexDataColumnListener, InterfaceTransferable, TreeObject, CleanableObject, XMLObject, IconObject, org.jogamp.java3d.GeometryUpdater

public class PolygonSet3DInt
extends Shape3DInt
Interface for a set of 3D polygons.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

    • scene_group

      protected org.jogamp.java3d.BranchGroup scene_group
    • fill_appearance

      protected org.jogamp.java3d.Appearance fill_appearance
    • edge_appearance

      protected org.jogamp.java3d.Appearance edge_appearance
    • polygons

      public java.util.ArrayList<LPolygon3DInt> polygons
  • Constructor Details

    • PolygonSet3DInt

      public PolygonSet3DInt()
  • Method Details

    • getGeometryInstance

      public Shape getGeometryInstance()
      Description copied from class: InterfaceShape
      Returns an instance of this InterfaceShape's geometry class.
      Overrides:
      getGeometryInstance in class Shape3DInt
      Returns:
    • init

      protected void init()
      Overrides:
      init in class Shape3DInt
    • attributeUpdated

      public void attributeUpdated​(AttributeEvent e)
      Description copied from class: Shape3DInt
      Responds to an update in one of this shape's attributes.

      Subclasses should override and call this super method AFTER handling the attribute change appropriately. Subclasses should also override needsRedraw() to indicate whether the scene node should be regenerated.

      Specified by:
      attributeUpdated in interface AttributeListener
      Overrides:
      attributeUpdated in class Shape3DInt
      Parameters:
      e - an AttributeEvent specifying which attribute has been changed
    • addShape

      public void addShape​(Polygon3D poly)
    • addShape

      public void addShape​(Polygon3D poly, boolean updateShape, boolean updateListeners)
    • addShape

      public void addShape​(Shape3DInt thisShape, boolean updateShape, boolean updateListeners)
    • getSize

      public int getSize()
    • setScene3DObject

      public void setScene3DObject​(boolean make_live)
      Description copied from class: Shape3DInt
      Sets this ShapeInt's Java3D scene node from its current geometry and rendering attributes. This node should be retrieved using the Shape3DInt.getShapeSceneNode() method. A scene node will only created if one of these conditions is met:
      • The shape is auxiliary (i.e., not a model shape, but a helper shape such as a section polygon)
      • The shape is associated with a ShapeModel3D, and this model is live (is associated with at least one Java3D scene graph).
      Subclasses which call this super method should always check that a scene node has indeed been created.
      Overrides:
      setScene3DObject in class Shape3DInt
    • needsRedraw3D

      public boolean needsRedraw3D​(Attribute a)
    • setFillAppearance

      protected void setFillAppearance()
    • setEdgeAppearance

      protected void setEdgeAppearance()
    • getPolygonNode

      public org.jogamp.java3d.BranchGroup getPolygonNode​(LPolygon3DInt polygon)
    • updateShape

      public void updateShape()
      Description copied from class: Shape3DInt
      Updates the geometric bounds of this ShapeInt. Does not call Shape3DInt.setScene3DObject().
      Overrides:
      updateShape in class Shape3DInt
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class Shape3DInt