Package snap.gfx3d
Class PolygonPath3D
java.lang.Object
snap.props.PropObject
snap.gfx3d.Shape3D
snap.gfx3d.FacetShape
snap.gfx3d.PolygonPath3D
- All Implemented Interfaces:
Cloneable
,PropChange.DoChange
This Shape subclass represents one or more polygons.
-
Field Summary
Fields inherited from class snap.gfx3d.FacetShape
_triangleArray
Fields inherited from class snap.gfx3d.Shape3D
_smoothSides
Fields inherited from class snap.props.PropObject
_pcs, EMPTY_OBJECT
-
Constructor Summary
ConstructorDescriptionConstructor.PolygonPath3D
(Shape aShape, double aDepth) Constructor for given Shape. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPolygon
(Polygon3D aPoly, int anIndex) Adds a polygon.void
appendPathIter
(PathIter aPathIter, double aDepth) Appends given PathIter to this polygon path.void
appendShape
(Shape aShape, double aDepth) Appends given shape to this polygon path.clone()
Standard clone implementation.void
close()
Closes the current polygon.copyForMatrix
(Matrix3D aTrans) Override to support this class.protected Bounds3D
Override to return combined Shape2D for polygons.static FacetShape
createFacetShapeForShapeAndDepth
(Shape aShape, double aDepth) Creates a Shape3D (either Polygon3D or PolygonPath3D) for given shape and depth.protected Vector3D
Override for this shape.Returns the last polygon.getPoint
(int anIndex) Override to support polygon array.int
Override to support polygon array.int
Returns the number of polygons.Returns the Polygons.Override to return combined Shape2D for polygons.protected VertexArray
Returns a VertexArray for path stroke.void
lineTo
(double aX, double aY, double aDepth) LineTo.void
moveTo
(double aX, double aY, double aDepth) Moveto.void
reverse()
Override to support this class.Methods inherited from class snap.gfx3d.FacetShape
clearCachedValues, createTriangleArray, createVertexArrays, getNormal, getPainter, getPainterToLocal, getPainterVertexArray, getTexture, getTransformToAlignToVector, getTriangleArray, setPainter, setTexture
Methods inherited from class snap.gfx3d.Shape3D
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, firePropChange, firePropChange, firePropChange, getPropDefault, getPropForName, getPropParent, getPropSet, getPropsForArchival, getPropsForArchivalExtra, getPropsString, getPropValue, initProps, isPropDefault, processPropChange, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropsString, setPropValue, setPropValues, toString
-
Constructor Details
-
PolygonPath3D
public PolygonPath3D()Constructor. -
PolygonPath3D
Constructor for given Shape.
-
-
Method Details
-
getPolygons
Returns the Polygons. -
getPolygonCount
public int getPolygonCount()Returns the number of polygons. -
addPolygon
Adds a polygon. -
getLastPolygon
Returns the last polygon. -
moveTo
public void moveTo(double aX, double aY, double aDepth) Moveto. -
lineTo
public void lineTo(double aX, double aY, double aDepth) LineTo. -
close
public void close()Closes the current polygon. -
appendShape
Appends given shape to this polygon path. -
appendPathIter
Appends given PathIter to this polygon path. -
createNormal
Override for this shape.- Specified by:
createNormal
in classFacetShape
-
getPointCount
public int getPointCount()Override to support polygon array.- Specified by:
getPointCount
in classFacetShape
-
getPoint
Override to support polygon array.- Specified by:
getPoint
in classFacetShape
-
createBounds3D
Override to return combined Shape2D for polygons.- Specified by:
createBounds3D
in classShape3D
-
getShape2D
Override to return combined Shape2D for polygons.- Specified by:
getShape2D
in classFacetShape
-
getStrokeTriangleArray
Returns a VertexArray for path stroke.- Overrides:
getStrokeTriangleArray
in classFacetShape
-
reverse
public void reverse()Override to support this class.- Specified by:
reverse
in classFacetShape
-
copyForMatrix
Override to support this class.- Specified by:
copyForMatrix
in classFacetShape
-
clone
Standard clone implementation.- Overrides:
clone
in classFacetShape
-
createFacetShapeForShapeAndDepth
Creates a Shape3D (either Polygon3D or PolygonPath3D) for given shape and depth.
-