Package snap.gfx3d
Class FacetShape
java.lang.Object
snap.props.PropObject
snap.gfx3d.Shape3D
snap.gfx3d.FacetShape
- All Implemented Interfaces:
PropChange.DoChange
- Direct Known Subclasses:
Path3D
,Polygon3D
,PolygonPath3D
This Shape3D subclass represents a surface.
-
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 TypeMethodDescriptionprotected void
Clears cached values when path changes.clone()
Standard clone implementation.abstract FacetShape
copyForMatrix
(Matrix3D aTrans) Copies path for given transform matrix.protected abstract Vector3D
Returns the normal of the facet.protected VertexArray
Creates a VertexArray of shape surface triangles.protected VertexArray
Creates the VertexArrays.Returns the normal of the facet.Returns the painter to render texture for this path.Returns the transform from Painter to this shape.protected VertexArray
Returns the painter VertexArray for 'painted' triangles on shape surface.abstract Point3D
getPoint
(int anIndex) Returns the Point3D at given index.abstract int
Returns the number of points in the facet.abstract Shape
Returns the 2D shape for the FacetShape (should only be called when path is facing Z).protected VertexArray
Returns a VertexArray for path stroke.Returns the texture to render on the facet shape surface.getTransformToAlignToVector
(double aX, double aY, double aZ) Returns the transform to make this FacetShape align with given vector.Returns a VertexArray of shape surface triangles.abstract void
reverse()
Reverses the path3d.void
setPainter
(Painter3D aPntr) Sets the painter to render texture for this path.void
setTexture
(Texture aTexture) Sets the texture to render on the facet shape surface.Methods inherited from class snap.gfx3d.Shape3D
createBounds3D, 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
-
Field Details
-
_triangleArray
-
-
Constructor Details
-
FacetShape
public FacetShape()
-
-
Method Details
-
getTexture
Returns the texture to render on the facet shape surface. -
setTexture
Sets the texture to render on the facet shape surface. -
getPainter
Returns the painter to render texture for this path. -
setPainter
Sets the painter to render texture for this path. -
getNormal
Returns the normal of the facet. -
createNormal
Returns the normal of the facet. -
getPointCount
public abstract int getPointCount()Returns the number of points in the facet. -
getPoint
Returns the Point3D at given index. -
getShape2D
Returns the 2D shape for the FacetShape (should only be called when path is facing Z). -
getTriangleArray
Returns a VertexArray of shape surface triangles.- Specified by:
getTriangleArray
in classShape3D
-
createVertexArrays
Creates the VertexArrays. -
createTriangleArray
Creates a VertexArray of shape surface triangles. -
getStrokeTriangleArray
Returns a VertexArray for path stroke. -
getPainterVertexArray
Returns the painter VertexArray for 'painted' triangles on shape surface. -
reverse
public abstract void reverse()Reverses the path3d. -
getPainterToLocal
Returns the transform from Painter to this shape. -
getTransformToAlignToVector
Returns the transform to make this FacetShape align with given vector. -
clearCachedValues
protected void clearCachedValues()Clears cached values when path changes.- Overrides:
clearCachedValues
in classShape3D
-
copyForMatrix
Copies path for given transform matrix. -
clone
Standard clone implementation.- Overrides:
clone
in classPropObject
-