Package snap.gfx3d
Class ParentShape
java.lang.Object
snap.props.PropObject
snap.gfx3d.Shape3D
snap.gfx3d.ParentShape
- All Implemented Interfaces:
PropChange.DoChange
This Shape3D subclass holds child shapes.
-
Field Summary
Fields inherited from class snap.gfx3d.Shape3D
_smoothSides
Fields inherited from class snap.props.PropObject
_pcs, EMPTY_OBJECT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a child.void
Adds a child.void
Calls to build shape.protected void
Called to actually build shape.protected Bounds3D
Override to calculate bounds from children.getChild
(int anIndex) Returns the child at given index.int
Returns the number of children.Shape3D[]
Returns the children.Override to return null (parent don't have VertexArray).boolean
Returns whether needs repaint.void
Calls to register for rebuild.removeChild
(int anIndex) Removes the child at given index.void
removeChild
(Shape3D aShape) Removes the given child.void
Removes the shape at the given index from the shape list.void
Calls to register for repaint.void
setChildren
(Shape3D... theChildren) Sets the children.protected void
setNeedsRepaint
(boolean aValue) Sets whether needs repaint.Methods inherited from class snap.gfx3d.Shape3D
clearCachedValues, getBounds3D, getBoundsCenter, getColor, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getName, getOpacity, getParent, getStroke, getStrokeColor, isDoubleSided, isVisible, setBounds3D, setColor, setDoubleSided, setName, setOpacity, setParent, setSmoothSides, setStroke, setStroke, setStrokeColor, setVisible, toStringProps
Methods inherited from class snap.props.PropObject
addDeepChangeListener, addPropChangeListener, addPropChangeListener, clone, firePropChange, firePropChange, firePropChange, getPropDefault, getPropForName, getPropParent, getPropSet, getPropsForArchival, getPropsForArchivalExtra, getPropsString, getPropValue, initProps, isPropDefault, processPropChange, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropsString, setPropValue, setPropValues, toString
-
Field Details
-
NeedsRepaint_Prop
- See Also:
-
-
Constructor Details
-
ParentShape
public ParentShape()Constructor.
-
-
Method Details
-
getChildCount
public int getChildCount()Returns the number of children. -
getChild
Returns the child at given index. -
getChildren
Returns the children. -
setChildren
Sets the children. -
addChild
Adds a child. -
addChild
Adds a child. -
removeChild
Removes the child at given index. -
removeChild
Removes the given child. -
removeChildren
public void removeChildren()Removes the shape at the given index from the shape list. -
createBounds3D
Override to calculate bounds from children.- Specified by:
createBounds3D
in classShape3D
-
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
Override to return null (parent don't have VertexArray).- Specified by:
getTriangleArray
in classShape3D
-