Package com.reportmill.graphics
Class RMPath3D
java.lang.Object
com.reportmill.graphics.RMPath3D
- All Implemented Interfaces:
Cloneable
This class represents a path in 3D space.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a 2D path to the path3D at the given depth.void
align
(RMVector3D vector) Transforms the path so the normal is aligned with the given vector.clone()
void
close()
Adds a close element to the path3d.int
UNUSED!!! Returns wether the given path is behind (ASCEND) or in front (DESCEND) of this path.int
comparePlane
(RMPath3D aPath) Returns whether receiver is in front (ORDER_ASCEND) or aPath in front (ORDER_DESCEND).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.getBBox()
Returns the bounding box for the path as {min,max}Returns the center point of the path.float
getDistance
(RMPoint3D aPoint) Returns the distance from a point to the plane of this polygon.byte
getElement
(int anIndex, RMPoint3D[] points) Returns the element at the given index.int
Returns 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.int
Returns the number of points in the path3d.float
getXMax()
Returns the max X for the path.float
getXMin()
Returns the max X for the path.float
getYMax()
Returns the max Y for the path.float
getYMin()
Returns the max Y for the path.float
getZMax()
Returns the max Z for the path.float
getZMin()
Returns the max Z for the path.void
lineTo
(float x, float y, float z) Adds a line to the path3d with the given 3D coords.void
moveTo
(float x, float y, float z) Adds a moveto to the path3d with the given 3D coords.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.void
reverse()
Reverses the path3d.void
Sets the center point of the path.void
transform
(RMTransform3D xform) Transforms the path by the given transform3d.
-
Field Details
-
MOVE_TO
public static final byte MOVE_TO- See Also:
-
LINE_TO
public static final byte LINE_TO- See Also:
-
QUAD_TO
public static final byte QUAD_TO- See Also:
-
CURVE_TO
public static final byte CURVE_TO- See Also:
-
CLOSE
public static final byte CLOSE- See Also:
-
-
Constructor Details
-
RMPath3D
public RMPath3D()Creates a new empty path. -
RMPath3D
Creates a 3D path from a 2D path with a depth.
-
-
Method Details
-
clone
-
getElement
Returns the element at the given index. -
getElementCount
public int getElementCount()Returns the number of elements in the path3d. -
getPoint
Returns the point3d at the given index. -
getPointCount
public int getPointCount()Returns the number of points in the path3d. -
getCenter
Returns the center point of the path. -
setCenter
Sets the center point of the path. -
getNormal
Returns the normal of the path3d. Right hand rule for clockwise/counter-clockwise defined polygons. -
getDistance
Returns the distance from a point to the plane of this polygon. -
moveTo
public void moveTo(float x, float y, float z) Adds a moveto to the path3d with the given 3D coords. -
lineTo
public void lineTo(float x, float y, float z) Adds a line to the path3d with the given 3D coords. -
quadTo
public 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. -
curveTo
public 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. -
close
public void close()Adds a close element to the path3d. -
addPath
Adds a 2D path to the path3D at the given depth. -
reverse
public void reverse()Reverses the path3d. -
transform
Transforms the path by the given transform3d. -
align
Transforms the path so the normal is aligned with the given vector. -
getPath
Returns a path for the path3d. -
compare
UNUSED!!! Returns wether the given path is behind (ASCEND) or in front (DESCEND) of this path. -
comparePlane
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. -
getBBox
Returns the bounding box for the path as {min,max} -
getXMin
public float getXMin()Returns the max X for the path. -
getXMax
public float getXMax()Returns the max X for the path. -
getYMin
public float getYMin()Returns the max Y for the path. -
getYMax
public float getYMax()Returns the max Y for the path. -
getZMin
public float getZMin()Returns the max Z for the path. -
getZMax
public float getZMax()Returns the max Z for the path.
-