Class PointSet3DInt

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:
Graph3DInt, Mesh3DInt

public class PointSet3DInt
extends Shape3DInt
Shape interface for a set of 3D points.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Constructor Details

    • PointSet3DInt

      public PointSet3DInt()
    • PointSet3DInt

      public PointSet3DInt​(PointSet3D set)
    • PointSet3DInt

      public PointSet3DInt​(PointSet3D set, java.lang.String name)
  • Method Details

    • getVertexAppearance

      protected org.jogamp.java3d.Appearance getVertexAppearance​(int index)
      Description copied from class: Shape3DInt
      Returns the appearance of vertex i.
      Overrides:
      getVertexAppearance in class Shape3DInt
      Returns:
    • getVertexColour

      public java.awt.Color getVertexColour​(int index)
      Description copied from class: Shape3DInt
      Returns the colour of vertex i; depends on whether the ShowData attribute is true, and this shape has a current vertex data column.
      Overrides:
      getVertexColour in class Shape3DInt
      Returns:
    • getVertexAlpha

      protected float getVertexAlpha​(int index)
    • getLabelAppearance

      protected org.jogamp.java3d.Appearance getLabelAppearance​(java.lang.Integer index)
    • getGeometryInstance

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

      protected void setIcon()
      Overrides:
      setIcon 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
    • getPointSet

      public PointSet3D getPointSet()
    • 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
    • getXML

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

      protected org.jogamp.java3d.Shape3D getVerticesAsPoints()
    • getVerticesAsSpheres

      protected org.jogamp.java3d.Node getVerticesAsSpheres()
    • 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 Shape3DInt
      Returns:
    • getShape2D

      protected Shape2DInt getShape2D​(Plane3D plane, float above_dist, float below_dist, org.jogamp.vecmath.Matrix4d matrix)
      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:
    • 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 Shape3DInt
      Returns:
      the dimensions of this object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class Shape3DInt
    • 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 Shape3DInt
      Returns:
    • appendPoints

      public void appendPoints​(PointSet3DInt points)
      Appends points to this point set. If points has vertex data with the same name as this point set, transfers those values. Note that this may result in truncation if the data types do not match (e.g., mapping MguiDouble to MguiInteger).
      Parameters:
      points -
    • appendPoints

      public void appendPoints​(PointSet3DInt points, boolean update)
      Appends points to this point set. If points has vertex data with the same name as this point set, transfers those values. Note that this may result in truncation if the data types do not match (e.g., mapping MguiDouble to MguiInteger). Name maps will also be transferred: (1) if they exist already in this shape; and (2) only for indices not already in the current name map.
      Parameters:
      points -