Class Polygon3DInt

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
Direct Known Subclasses:
LPolygon3DInt

public class Polygon3DInt
extends Shape3DInt
Interface for a 3D polygon object.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

    • edge_appearance

      protected org.jogamp.java3d.Appearance edge_appearance
    • cylinder_appearance

      protected org.jogamp.java3d.Appearance cylinder_appearance
  • Constructor Details

    • Polygon3DInt

      public Polygon3DInt()
    • Polygon3DInt

      public Polygon3DInt​(Polygon3D polygon)
    • Polygon3DInt

      public Polygon3DInt​(Polygon3D polygon, java.lang.String name)
  • 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
    • setIcon

      protected void setIcon()
      Overrides:
      setIcon in class Shape3DInt
    • getShape2D

      protected Shape2DInt getShape2D​(Plane3D plane, float above_dist, float below_dist, org.jogamp.vecmath.Matrix4d transform)
      Description copied from class: Shape3DInt
      To be overridden by subclasses implementing a 2D representation
      Overrides:
      getShape2D in class Shape3DInt
      Parameters:
      plane - Plane on which to render
      above_dist - Distance above plane within which to project a shape
      below_dist - Distance below plane within which to project a shape
      Returns:
    • setAntialiasing

      public void setAntialiasing​(boolean antialiasing)
      Sets whether this polygon will be rendered with anti-aliasing.
      Parameters:
      antialiasing -
    • getAntialiasing

      public boolean getAntialiasing()
      Gets the current anti-aliasing policy.
      Returns:
      true if anti-aliasing is currently on
    • setClosed

      public void setClosed​(boolean closed)
      Sets whether this polygon's end vertices are to be connected.
      Parameters:
      closed -
    • isClosed

      public boolean isClosed()
      Determines whether this polygon's end vertices are to be connected.
      Returns:
      true if this polygon is closed
    • setShape

      public void setShape​(Shape3D shape)
      Overrides:
      setShape in class Shape3DInt
    • getPolygon

      public Polygon3D getPolygon()
    • 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
    • setScene3DObject

      public void setScene3DObject()
      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
    • 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
    • toString

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

      protected void setEdgeAppearance()
    • setCylinderAppearance

      protected void setCylinderAppearance()