Package com.reportmill.graphics
Class RMPath3D
- java.lang.Object
- 
- com.reportmill.graphics.RMPath3D
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 
 public class RMPath3D extends java.lang.Object implements java.lang.CloneableThis class represents a path in 3D space.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPath(RMPath aPath, float aDepth)Adds a 2D path to the path3D at the given depth.voidalign(RMVector3D vector)Transforms the path so the normal is aligned with the given vector.java.lang.Objectclone()voidclose()Adds a close element to the path3d.intcompare(java.lang.Object anObj)UNUSED!!! 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(float cp1x, float cp1y, float cp1z, float cp2x, float cp2y, float cp2z, float x, float y, float z)Adds a curve-to to the path3d with the given 3d coords.RMPoint3D[]getBBox()Returns the bounding box for the path as {min,max}RMPoint3DgetCenter()Returns the center point of the path.floatgetDistance(RMPoint3D aPoint)Returns the distance from a point to the plane of this polygon.bytegetElement(int anIndex, RMPoint3D[] points)Returns the element at the given index.intgetElementCount()Returns the number of elements in the path3d.RMVector3DgetNormal()Returns the normal of the path3d.RMPathgetPath()Returns a path for the path3d.RMPoint3DgetPoint(int anIndex)Returns the point3d at the given index.intgetPointCount()Returns the number of points in the path3d.floatgetXMax()Returns the max X for the path.floatgetXMin()Returns the max X for the path.floatgetYMax()Returns the max Y for the path.floatgetYMin()Returns the max Y for the path.floatgetZMax()Returns the max Z for the path.floatgetZMin()Returns the max Z for the path.voidlineTo(float x, float y, float z)Adds a line to the path3d with the given 3D coords.voidmoveTo(float x, float y, float z)Adds a moveto to the path3d with the given 3D coords.voidquadTo(float cpx, float cpy, float cpz, float x, float y, float z)Adds a quad to to the path3d with the given 3D control point and coords.voidreverse()Reverses the path3d.voidsetCenter(RMPoint3D aPoint)Sets the center point of the path.voidtransform(RMTransform3D xform)Transforms the path by the given transform3d.
 
- 
- 
- 
Field Detail- 
MOVE_TOpublic static final byte MOVE_TO - See Also:
- Constant Field Values
 
 - 
LINE_TOpublic static final byte LINE_TO - See Also:
- Constant Field Values
 
 - 
QUAD_TOpublic static final byte QUAD_TO - See Also:
- Constant Field Values
 
 - 
CURVE_TOpublic static final byte CURVE_TO - See Also:
- Constant Field Values
 
 - 
CLOSEpublic static final byte CLOSE - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
RMPath3Dpublic RMPath3D() Creates a new empty path.
 - 
RMPath3Dpublic RMPath3D(RMPath aPath, float aDepth) Creates a 3D path from a 2D path with a depth.
 
- 
 - 
Method Detail- 
clonepublic java.lang.Object clone() - Overrides:
- clonein class- java.lang.Object
 
 - 
getElementpublic byte getElement(int anIndex, RMPoint3D[] points)Returns the element at the given index.
 - 
getElementCountpublic int getElementCount() Returns the number of elements in the path3d.
 - 
getPointpublic RMPoint3D getPoint(int anIndex) Returns the point3d at the given index.
 - 
getPointCountpublic int getPointCount() Returns the number of points in the path3d.
 - 
getCenterpublic RMPoint3D getCenter() Returns the center point of the path.
 - 
setCenterpublic void setCenter(RMPoint3D aPoint) Sets the center point of the path.
 - 
getNormalpublic RMVector3D getNormal() Returns the normal of the path3d. Right hand rule for clockwise/counter-clockwise defined polygons.
 - 
getDistancepublic float getDistance(RMPoint3D aPoint) Returns the distance from a point to the plane of this polygon.
 - 
moveTopublic void moveTo(float x, float y, float z)Adds a moveto to the path3d with the given 3D coords.
 - 
lineTopublic void lineTo(float x, float y, float z)Adds a line to the path3d with the given 3D coords.
 - 
quadTopublic void quadTo(float cpx, float cpy, float cpz, float x, float y, float z)Adds a quad to to the path3d with the given 3D control point and coords.
 - 
curveTopublic void curveTo(float cp1x, float cp1y, float cp1z, float cp2x, float cp2y, float cp2z, float x, float y, float z)Adds a curve-to to the path3d with the given 3d coords.
 - 
closepublic void close() Adds a close element to the path3d.
 - 
addPathpublic void addPath(RMPath aPath, float aDepth) Adds a 2D path to the path3D at the given depth.
 - 
reversepublic void reverse() Reverses the path3d.
 - 
transformpublic void transform(RMTransform3D xform) Transforms the path by the given transform3d.
 - 
alignpublic void align(RMVector3D vector) Transforms the path so the normal is aligned with the given vector.
 - 
getPathpublic RMPath getPath() Returns a path for the path3d.
 - 
comparepublic int compare(java.lang.Object anObj) UNUSED!!! Returns wether the given path is behind (ASCEND) or in front (DESCEND) of this path.
 - 
comparePlanepublic int comparePlane(RMPath3D aPath) Returns 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.
 - 
getBBoxpublic RMPoint3D[] getBBox() Returns the bounding box for the path as {min,max}
 - 
getXMinpublic float getXMin() Returns the max X for the path.
 - 
getXMaxpublic float getXMax() Returns the max X for the path.
 - 
getYMinpublic float getYMin() Returns the max Y for the path.
 - 
getYMaxpublic float getYMax() Returns the max Y for the path.
 - 
getZMinpublic float getZMin() Returns the max Z for the path.
 - 
getZMaxpublic float getZMax() Returns the max Z for the path.
 
- 
 
-