public class RMPath3D
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static byte |
CLOSE |
static byte |
CURVE_TO |
static byte |
LINE_TO |
static byte |
MOVE_TO |
static byte |
QUAD_TO |
Constructor and Description |
---|
RMPath3D()
Creates a new empty path.
|
RMPath3D(RMPath aPath,
float aDepth)
Creates a 3D path from a 2D path with a depth.
|
Modifier and Type | Method and Description |
---|---|
void |
addPath(RMPath aPath,
float aDepth)
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.
|
java.lang.Object |
clone() |
void |
close()
Adds a close element to the path3d.
|
int |
compare(java.lang.Object anObj)
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.
|
RMPoint3D[] |
getBBox()
Returns the bounding box for the path as {min,max}
|
RMPoint3D |
getCenter()
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 |
getElementCount()
Returns the number of elements in the path3d.
|
RMVector3D |
getNormal()
Returns the normal of the path3d.
|
RMPath |
getPath()
Returns a path for the path3d.
|
RMPoint3D |
getPoint(int anIndex)
Returns the point3d at the given index.
|
int |
getPointCount()
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 |
setCenter(RMPoint3D aPoint)
Sets the center point of the path.
|
void |
transform(RMTransform3D xform)
Transforms the path by the given transform3d.
|
public static final byte MOVE_TO
public static final byte LINE_TO
public static final byte QUAD_TO
public static final byte CURVE_TO
public static final byte CLOSE
public RMPath3D()
public RMPath3D(RMPath aPath, float aDepth)
public java.lang.Object clone()
clone
in class java.lang.Object
public byte getElement(int anIndex, RMPoint3D[] points)
public int getElementCount()
public RMPoint3D getPoint(int anIndex)
public int getPointCount()
public RMPoint3D getCenter()
public void setCenter(RMPoint3D aPoint)
public RMVector3D getNormal()
public float getDistance(RMPoint3D aPoint)
public void moveTo(float x, float y, float z)
public void lineTo(float x, float y, float z)
public void quadTo(float cpx, float cpy, float cpz, float x, float y, float z)
public void curveTo(float cp1x, float cp1y, float cp1z, float cp2x, float cp2y, float cp2z, float x, float y, float z)
public void close()
public void addPath(RMPath aPath, float aDepth)
public void reverse()
public void transform(RMTransform3D xform)
public void align(RMVector3D vector)
public RMPath getPath()
public int compare(java.lang.Object anObj)
public int comparePlane(RMPath3D aPath)
public RMPoint3D[] getBBox()
public float getXMin()
public float getXMax()
public float getYMin()
public float getYMax()
public float getZMin()
public float getZMax()