Package snap.gfx3d

Class Shape3D

All Implemented Interfaces:
PropChange.DoChange
Direct Known Subclasses:
FacetShape, ParentShape, VertexArrayShape

public abstract class Shape3D extends PropObject
This class represents a 3D shape to be rendered in a G3DView.
  • Field Details

    • _smoothSides

      protected boolean _smoothSides
  • Constructor Details

    • Shape3D

      public Shape3D()
      Constructor.
  • Method Details

    • getParent

      public ParentShape getParent()
      Returns the parent that holds this shape.
    • setParent

      protected void setParent(ParentShape aParent)
      Sets the parent that holds this shape.
    • getName

      public String getName()
      Returns the name of shape.
    • setName

      public void setName(String aName)
      Sets the name of shape.
    • getColor

      public Color getColor()
      Returns the color of shape.
    • setColor

      public void setColor(Color aColor)
      Sets the color of shape.
    • getStroke

      public Stroke getStroke()
      Returns the stroke of shape.
    • setStroke

      public void setStroke(Stroke aStroke)
      Sets the stroke of shape.
    • setStroke

      public void setStroke(Color aColor, double aWidth)
      Returns the stroke color of shape.
    • getStrokeColor

      public Color getStrokeColor()
      Returns the stroke color of shape.
    • setStrokeColor

      public void setStrokeColor(Color aColor)
      Sets the stroke color of shape.
    • getOpacity

      public double getOpacity()
      Returns the opacity of shape.
    • setOpacity

      public void setOpacity(double aValue)
      Sets the opacity of shape.
    • isVisible

      public boolean isVisible()
      Returns whether shape is visible.
    • setVisible

      public void setVisible(boolean aValue)
      Sets whether shape is visible.
    • isDoubleSided

      public boolean isDoubleSided()
      Returns whether shape surfaces are double-sided.
    • setDoubleSided

      public void setDoubleSided(boolean aValue)
      Sets whether shape surfaces are double-sided.
    • setSmoothSides

      public void setSmoothSides(boolean aValue)
      Called to make sides smooth.
    • getBounds3D

      public Bounds3D getBounds3D()
      Returns the bounds.
    • createBounds3D

      protected abstract Bounds3D createBounds3D()
      Creates the bounds.
    • setBounds3D

      public void setBounds3D(Bounds3D aBox)
      Sets the bounds.
    • getMinX

      public double getMinX()
      Returns the max X for the path.
    • getMinY

      public double getMinY()
      Returns the max Y for the path.
    • getMinZ

      public double getMinZ()
      Returns the max Z for the path.
    • getMaxX

      public double getMaxX()
      Returns the max X for the path.
    • getMaxY

      public double getMaxY()
      Returns the max Y for the path.
    • getMaxZ

      public double getMaxZ()
      Returns the max Z for the path.
    • getBoundsCenter

      public Point3D getBoundsCenter()
      Returns the center point of the path.
    • getTriangleArray

      public abstract VertexArray getTriangleArray()
      Returns the array of Path3D that can render this shape.
    • clearCachedValues

      protected void clearCachedValues()
      Clears cached values when shape changes.
    • toStringProps

      public String toStringProps()
      Standard toStringProps implementation.
      Overrides:
      toStringProps in class PropObject