Class RMPath3D
java.lang.Object
com.inductiveautomation.rm.graphics.RMPath3D
- All Implemented Interfaces:
- Cloneable
This class represents a path in 3D space.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a 2D path to the path3D at the given depth.voidalign(RMVector3D aVector) Transforms the path so the normal is aligned with the given vector.clone()Standard clone implementation.voidclose()Adds a close element to the path3d.intUNUSED!!! Returns wether the given path is behind (ASCEND) or in front (DESCEND) of this path.intcomparePlane(RMPath3D aPath) Returns whether receiver is in front (ORDER_ASCEND) or aPath in front (ORDER_DESCEND).voidcurveTo(double cp1x, double cp1y, double cp1z, double cp2x, double cp2y, double cp2z, double x, double y, double z) Adds a curve-to to the path3d with the given 3d coords.getBBox()Returns the bounding box for the path as {min,max}.Returns the center point of the path.doublegetDistance(RMPoint3D aPoint) Returns the distance from a point to the plane of this polygon.bytegetElement(int anIndex) Returns the element type at the given index.bytegetElement(int anIndex, RMPoint3D[] points) Returns the element at the given index.intReturns the number of elements in the path3d.Returns the normal of the path3d.getPath()Returns a path for the path3d.getPoint(int anIndex) Returns the point3d at the given index.intReturns the number of points in the path3d.doublegetXMax()Returns the max X for the path.doublegetXMin()Returns the max X for the path.doublegetYMax()Returns the max Y for the path.doublegetYMin()Returns the max Y for the path.doublegetZMax()Returns the max Z for the path.doublegetZMin()Returns the max Z for the path.voidlineTo(double x, double y, double z) Adds a line to the path3d with the given 3D coords.voidmoveTo(double x, double y, double z) Adds a moveto to the path3d with the given 3D coords.voidquadTo(double cpx, double cpy, double cpz, double x, double y, double z) Adds a quad-to to the path3d with the given 3D control point and coords.voidreverse()Reverses the path3d.voidSets the center point of the path.voidtransform(RMTransform3D xform) Transforms the path by the given transform3d.
- 
Field Details- 
MOVE_TOpublic static final byte MOVE_TO- See Also:
 
- 
LINE_TOpublic static final byte LINE_TO- See Also:
 
- 
QUAD_TOpublic static final byte QUAD_TO- See Also:
 
- 
CURVE_TOpublic static final byte CURVE_TO- See Also:
 
- 
CLOSEpublic static final byte CLOSE- See Also:
 
 
- 
- 
Constructor Details- 
RMPath3Dpublic RMPath3D()Creates a new empty path.
- 
RMPath3DCreates a 3D path from a 2D path with a depth.
 
- 
- 
Method Details- 
getElementCountpublic int getElementCount()Returns the number of elements in the path3d.
- 
getElementpublic byte getElement(int anIndex) Returns the element type at the given index.
- 
getPointCountpublic int getPointCount()Returns the number of points in the path3d.
- 
getPointReturns the point3d at the given index.
- 
getElementReturns the element at the given index.
- 
moveTopublic void moveTo(double x, double y, double z) Adds a moveto to the path3d with the given 3D coords.
- 
lineTopublic void lineTo(double x, double y, double z) Adds a line to the path3d with the given 3D coords.
- 
quadTopublic void quadTo(double cpx, double cpy, double cpz, double x, double y, double z) Adds a quad-to to the path3d with the given 3D control point and coords.
- 
curveTopublic void curveTo(double cp1x, double cp1y, double cp1z, double cp2x, double cp2y, double cp2z, double x, double y, double z) Adds a curve-to to the path3d with the given 3d coords.
- 
closepublic void close()Adds a close element to the path3d.
- 
addPathAdds a 2D path to the path3D at the given depth.
- 
getCenterReturns the center point of the path.
- 
setCenterSets the center point of the path.
- 
getNormalReturns the normal of the path3d. Right hand rule for clockwise/counter-clockwise defined polygons.
- 
getDistanceReturns the distance from a point to the plane of this polygon.
- 
reversepublic void reverse()Reverses the path3d.
- 
transformTransforms the path by the given transform3d.
- 
alignTransforms the path so the normal is aligned with the given vector.
- 
getPathReturns a path for the path3d.
- 
compareUNUSED!!! Returns wether the given path is behind (ASCEND) or in front (DESCEND) of this path.
- 
comparePlaneReturns whether receiver is in front (ORDER_ASCEND) or aPath in front (ORDER_DESCEND). Returns (ORDER_SAME) if the two paths are coplanar, or (ORDER_INDETERMINATE) if they intersect.
- 
getBBoxReturns the bounding box for the path as {min,max}.
- 
getXMinpublic double getXMin()Returns the max X for the path.
- 
getXMaxpublic double getXMax()Returns the max X for the path.
- 
getYMinpublic double getYMin()Returns the max Y for the path.
- 
getYMaxpublic double getYMax()Returns the max Y for the path.
- 
getZMinpublic double getZMin()Returns the max Z for the path.
- 
getZMaxpublic double getZMax()Returns the max Z for the path.
- 
cloneStandard clone implementation.
 
-