Package snap.gfx3d
Class Shape3D
java.lang.Object
snap.props.PropObject
snap.gfx3d.Shape3D
- All Implemented Interfaces:
PropChange.DoChange
- Direct Known Subclasses:
FacetShape
,ParentShape
,VertexArrayShape
This class represents a 3D shape to be rendered in a G3DView.
-
Field Summary
Fields inherited from class snap.props.PropObject
_pcs, EMPTY_OBJECT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Clears cached values when shape changes.protected abstract Bounds3D
Creates the bounds.Returns the bounds.Returns the center point of the path.getColor()
Returns the color of shape.double
getMaxX()
Returns the max X for the path.double
getMaxY()
Returns the max Y for the path.double
getMaxZ()
Returns the max Z for the path.double
getMinX()
Returns the max X for the path.double
getMinY()
Returns the max Y for the path.double
getMinZ()
Returns the max Z for the path.getName()
Returns the name of shape.double
Returns the opacity of shape.Returns the parent that holds this shape.Returns the stroke of shape.Returns the stroke color of shape.abstract VertexArray
Returns the array of Path3D that can render this shape.boolean
Returns whether shape surfaces are double-sided.boolean
Returns whether shape is visible.void
setBounds3D
(Bounds3D aBox) Sets the bounds.void
Sets the color of shape.void
setDoubleSided
(boolean aValue) Sets whether shape surfaces are double-sided.void
Sets the name of shape.void
setOpacity
(double aValue) Sets the opacity of shape.protected void
setParent
(ParentShape aParent) Sets the parent that holds this shape.void
setSmoothSides
(boolean aValue) Called to make sides smooth.void
Returns the stroke color of shape.void
Sets the stroke of shape.void
setStrokeColor
(Color aColor) Sets the stroke color of shape.void
setVisible
(boolean aValue) Sets whether shape is visible.Standard toStringProps implementation.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
-
_smoothSides
protected boolean _smoothSides
-
-
Constructor Details
-
Shape3D
public Shape3D()Constructor.
-
-
Method Details
-
getParent
Returns the parent that holds this shape. -
setParent
Sets the parent that holds this shape. -
getName
Returns the name of shape. -
setName
Sets the name of shape. -
getColor
Returns the color of shape. -
setColor
Sets the color of shape. -
getStroke
Returns the stroke of shape. -
setStroke
Sets the stroke of shape. -
setStroke
Returns the stroke color of shape. -
getStrokeColor
Returns the stroke color of shape. -
setStrokeColor
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
Returns the bounds. -
createBounds3D
Creates the bounds. -
setBounds3D
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
Returns the center point of the path. -
getTriangleArray
Returns the array of Path3D that can render this shape. -
clearCachedValues
protected void clearCachedValues()Clears cached values when shape changes. -
toStringProps
Standard toStringProps implementation.- Overrides:
toStringProps
in classPropObject
-