Class Mesh3DInt

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:
CorticalHemisphereSet3DInt, CorticalSurfaceSet3DInt

public class Mesh3DInt
extends PointSet3DInt
Interface for a Mesh3D shape.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

    • fill_appearance

      protected org.jogamp.java3d.Appearance fill_appearance
    • edge_appearance

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

    • Mesh3DInt

      public Mesh3DInt()
    • Mesh3DInt

      public Mesh3DInt​(Mesh3D mesh)
    • Mesh3DInt

      public Mesh3DInt​(Mesh3D mesh, java.lang.String name)
  • Method Details

    • getFillColour

      public java.awt.Color getFillColour()
      Returns this shape's fill colour
      Returns:
    • getGeometryInstance

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

      protected void setIcon()
      Overrides:
      setIcon in class PointSet3DInt
    • getAlphaMode

      public java.lang.String getAlphaMode()
    • getFlipNormals

      public boolean getFlipNormals()
    • setFlipNormals

      public void setFlipNormals​(boolean b)
    • getBackFlip

      public boolean getBackFlip()
    • setBackFlip

      public void setBackFlip​(boolean b)
    • setShape

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

      public void setScene3DObject​(boolean make_live)
      return an IndexedTriangleArray object representing this mesh. Mesh must be finalized with Mesh3D.finalize()
      Overrides:
      setScene3DObject in class PointSet3DInt
    • 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 PointSet3DInt
      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:
    • isHeritableAttribute

      public boolean isHeritableAttribute​(java.lang.String name)
      Description copied from class: InterfaceShape
      Is this parent attribute inherited by a child shape?
      Overrides:
      isHeritableAttribute in class Shape3DInt
      Returns:
    • getInheritingAttribute

      public Attribute<?> getInheritingAttribute​(Attribute<?> attribute)
      Description copied from class: Shape3DInt
      Returns the 2D attribute inheriting from a 3D attribute. Use when InheritFromParent=true. Subclasses should override this method if certain 3D attributes are not intended to be inherited (e.g., vertex scales).
      Overrides:
      getInheritingAttribute in class Shape3DInt
      Returns:
      The inheriting attribute, or null if attribute is not heritable
    • getMesh

      public Mesh3D getMesh()
    • setMesh

      public void setMesh​(Mesh3D mesh)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class PointSet3DInt
    • 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 PointSet3DInt
      Parameters:
      e - an AttributeEvent specifying which attribute has been changed
    • setFillAppearance

      protected void setFillAppearance()
    • getTransparencyAttributes

      protected org.jogamp.java3d.TransparencyAttributes getTransparencyAttributes()
    • getPolygonOffset

      protected float getPolygonOffset()
    • getPolygonOffsetFactor

      protected float getPolygonOffsetFactor()
    • setEdgeAppearance

      protected void setEdgeAppearance()
    • needsRedraw

      public boolean needsRedraw​(Attribute<?> a)
      Description copied from class: InterfaceShape
      Returns true if a change to attribute will require a redraw of this shape.
      Overrides:
      needsRedraw in class PointSet3DInt
      Returns:
    • getDimensions

      public int[] getDimensions()
      Description copied from interface: VariableObject
      Returns the dimensions of this object as an array of integers
      Specified by:
      getDimensions in interface VariableObject
      Overrides:
      getDimensions in class PointSet3DInt
      Returns:
      the dimensions of this object
    • getLocalName

      public java.lang.String getLocalName()
      Description copied from interface: XMLObject
      Returns the local name associated with this XML object.
      Specified by:
      getLocalName in interface XMLObject
      Overrides:
      getLocalName in class PointSet3DInt
      Returns:
    • getXML

      public java.lang.String getXML​(int tab, XMLObject.XMLType type)
      Overrides:
      getXML in class PointSet3DInt
    • setGraphic3DPopupMenu

      public void setGraphic3DPopupMenu​(InterfacePopupMenu menu)
      Description copied from class: Shape3DInt
      Subclasses should override this if necessary and call super.getGraphic3DPopupMenu() to get this top-level menu and add items to it.
      Overrides:
      setGraphic3DPopupMenu in class Shape3DInt
    • handlePopupEvent

      public void handlePopupEvent​(java.awt.event.ActionEvent e)
      Description copied from interface: PopupMenuObject
      Handles an event on this object's popup menu.
      Specified by:
      handlePopupEvent in interface PopupMenuObject
      Overrides:
      handlePopupEvent in class Shape3DInt