Package snap.gfx3d

Class ParentShape

All Implemented Interfaces:
PropChange.DoChange
Direct Known Subclasses:
CubeShape, PathBox3D, Scene3D

public class ParentShape extends Shape3D
This Shape3D subclass holds child shapes.
  • Field Details

  • Constructor Details

    • ParentShape

      public ParentShape()
      Constructor.
  • Method Details

    • getChildCount

      public int getChildCount()
      Returns the number of children.
    • getChild

      public Shape3D getChild(int anIndex)
      Returns the child at given index.
    • getChildren

      public Shape3D[] getChildren()
      Returns the children.
    • setChildren

      public void setChildren(Shape3D... theChildren)
      Sets the children.
    • addChild

      public void addChild(Shape3D aShape)
      Adds a child.
    • addChild

      public void addChild(Shape3D aShape, int anIndex)
      Adds a child.
    • removeChild

      public Shape3D removeChild(int anIndex)
      Removes the child at given index.
    • removeChild

      public void removeChild(Shape3D aShape)
      Removes the given child.
    • removeChildren

      public void removeChildren()
      Removes the shape at the given index from the shape list.
    • createBounds3D

      protected Bounds3D createBounds3D()
      Override to calculate bounds from children.
      Specified by:
      createBounds3D in class Shape3D
    • rebuildShape

      public void rebuildShape()
      Calls to register for rebuild.
    • buildShape

      public void buildShape()
      Calls to build shape.
    • repaintShape

      public void repaintShape()
      Calls to register for repaint.
    • isNeedsRepaint

      public boolean isNeedsRepaint()
      Returns whether needs repaint.
    • setNeedsRepaint

      protected void setNeedsRepaint(boolean aValue)
      Sets whether needs repaint.
    • buildShapeImpl

      protected void buildShapeImpl()
      Called to actually build shape.
    • getTriangleArray

      public VertexArray getTriangleArray()
      Override to return null (parent don't have VertexArray).
      Specified by:
      getTriangleArray in class Shape3D