public class Draw3D extends javafx.application.Application implements Draw3DDefaults
AMBIENT_LIGHT_ON, ARROW_POINT_HEIGHT, ARROW_POINT_RADIUS, ARROW_RADIUS, AV_POINT_DIVISIONS, AXIS_LENGTH, AXIS_RADIUS, BACKGROUND_COLOR, BOUNDRY_RADIUS, CAMERA_FAR_CLIP, CAMERA_INITIAL_DISTANCE, CAMERA_INITIAL_X_ANGLE, CAMERA_INITIAL_Y_ANGLE, CAMERA_NEAR_CLIP, CONE_DIVISIONS, CUMULATE_DEFAULT, CUMULATE_MANUAL_DEFAULT, CYLINDER_DIVISIONS, DEFAULT_ORIGIN, EDGE_RADIUS, EPSILON, LABEL_FONT, LABEL_FONT_SIZE, LINE_RADIUS, MIN_MAX_X, MIN_MAX_Y, MIN_MAX_Z, MOUSE_SPEED, OVAL_DIVISIONS, POINT_LIGHT_1_X, POINT_LIGHT_1_Y, POINT_LIGHT_1_Z, POINT_LIGHT_2_X, POINT_LIGHT_2_Y, POINT_LIGHT_2_Z, POINT_LIGHT_ON, POINT_SIZE, ROTATION_SPEED, SCENE_HEIGHT, SCENE_WIDTH, SCROLL_DELTA, SCROLL_FACTOR, SHOW_AXES, SHOW_BOUNDARY_CUBE, SHOW_DEFAULT_GRID, SHOW_TICK_MARKS, SHOW_X_Y_ONLY, SHOW_Z_AXIS_UP, SPHERE_DIVISIONS, TICK_MARK_LENGTH, TICK_MARK_RADIUS, VECTOR_POINT_HEIGHT, VECTOR_POINT_RADIUS, VECTOR_RADIUS, VERTEX_SIZE
Constructor and Description |
---|
Draw3D() |
Modifier and Type | Method and Description |
---|---|
javafx.scene.Scene |
buildScene()
Builds the Scene for display and use by Draw3D methods.
|
void |
buildSubScene()
Builds the SubScene, creates the data structures and groups required for Draw3D,
and initializes to default state per the settings in Draw3DDefaults.
|
void |
buildTest()
Draws a test set of eight vectors, one in each quadrant of the user coordinate space.
|
void |
drawArrow(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Constructs an Arrow3D object with specified start and end points and draws it.
|
void |
drawArrow3D(Arrow3D a3d)
Draws an Arrow3D object.
|
void |
drawBezier(javafx.geometry.Point3D[] p)
Draws a Bezier curve defined by the specified array of control points.
|
void |
drawBox3D(Box3D b3d)
Draws a Box3D object.
|
void |
drawBox3D(Box3D b3d,
boolean showEdges)
Draws a Box3D object, optionally with edges highlighted.
|
void |
drawBoxEdges3D(Box3D b3d)
Draws the edges of Box3D
|
void |
drawCircle(double x,
double y,
double z,
double r)
Constructs a circle object (JavaFX Cylinder w/ height .1) with specified center point
and radius and draws it.
|
void |
drawCircle(double x,
double y,
double z,
double r,
double rx,
double ry,
double rz)
Constructs a circle object (JavaFX Cylinder w/ height .1) with specified center point, radius, and
x-rotation, y-rotation, z-rotation and draws it.
|
void |
drawCone(double x,
double y,
double z,
double r,
double h)
Constructs a Cone3D object with point at specified coordinates, radius, and height and draws it.
|
void |
drawCone(double x,
double y,
double z,
double r,
double h,
double rx,
double ry,
double rz)
Constructs a Cone3D object with point at specified coordinates, radius, height, and
xyz rotations and draws it.
|
void |
drawCone3D(Cone3D c3d)
Draws a Cone3D object.
|
void |
drawCuboid(double x,
double y,
double z,
double width,
double height,
double depth)
Constructs a Box3D object with specified center point, width, height, and depth
and draws it.
|
void |
drawCuboid(double x,
double y,
double z,
double width,
double height,
double depth,
double rx,
double ry,
double rz)
Constructs a Box3D object with specified center point, width, height, depth, and
x-rotation, y-rotation, z-rotation and draws it.
|
void |
drawCylinder(double x,
double y,
double z,
double r,
double h)
Constructs a Cylinder3D object with specified center point, radius, and height
and draws it.
|
void |
drawCylinder(double x,
double y,
double z,
double r,
double h,
double rx,
double ry,
double rz)
Constructs a Cylinder3D object with specified center point, radius, height,
x-rotation, y-rotation, z-rotation and draws it.
|
void |
drawCylinder3D(Cylinder3D c3d)
Draws a Cylinder3D object.
|
void |
drawDrone3D(Drone3D d3d)
Draws a Drone3D object.
|
void |
drawDrone3D(int view,
Drone3D d3d)
Draws a Drone3D object.
|
void |
drawGrid(int sector,
int div,
javafx.scene.paint.PhongMaterial m)
Draws grid lines in the user coordinate space.
|
void |
drawLabel(double x,
double y,
double z,
double rx,
double ry,
double rz,
java.lang.String s)
Constructs a Text3D object and draws it with center at xyz location and xyz rotation specifications.
|
void |
drawLabel(double x,
double y,
double z,
double rx,
double ry,
double rz,
java.lang.String s,
javafx.scene.text.Font f,
javafx.scene.paint.Color c)
Constructs a Text3D object and draws it with center at xyz location and xyz rotation
with the specified color and size.
|
void |
drawLabel(double x,
double y,
double z,
java.lang.String s)
Constructs a Text3D object and draws it with center at xyz location.
|
void |
drawLabel(double x,
double y,
double z,
java.lang.String s,
javafx.scene.text.Font f,
javafx.scene.paint.Color c)
Constructs a Text3D object and draws it with center at xyz location
with the specified color and size.
|
void |
drawLabel3D(Text3D t3d)
Draws a Text3D object according to its xyz location, xyz rotation, String contents,
with default or object specific font and color specifications.
|
void |
drawLine(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Constructs a line object with specified start and end points and draws it.
|
void |
drawLine3D(Line3D ln)
Draws a Line3D object.
|
void |
drawLine3DSet(Line3D[] ln)
Draws a set of Line3D line segments with specified color
|
void |
drawLineEquation(double a1,
double a2,
double a3,
double b1,
double b2,
double b3)
Constructs a Line3D object given the symmetric line equation coefficients, finds the intersection
points with the current boundary of the user coordinate space, and draws the line between the
intersection points.
|
void |
drawMesh3D(Mesh3D m3d)
Draws a variable Mesh3D object.
|
void |
drawOval(double xi,
double yi,
double zi,
double a,
double b)
Constructs an oval object with specified center points, major radius, minor radius,
and drawing parameters and draws it.
|
void |
drawOval(double xi,
double yi,
double zi,
double a,
double b,
double rx,
double ry,
double rz)
Constructs an Oval3D object with specified center points, major radius, minor radius,
x-rotation, y-rotation, z-rotation and draws it.
|
void |
drawOval3D(Oval3D o3d)
Draws an Oval3D object.
|
void |
drawPlane(double a,
double b,
double c,
double d)
Constructs a plane object with specified plane equation coordinates and draws it.
|
void |
drawPlane(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3)
Constructs a plane object using specification of three points in the plane and draws it.
|
void |
drawPlane3D(Plane3D pl)
Draws a plane object terminated at the bounding box defined by minmaxX, minmaxY, minmaxZ.
|
void |
drawPlanePoints(Plane3D pl)
Displays a series of points lying in the specified Plane.
|
void |
drawPoint(double x,
double y,
double z)
Constructs a Sphere3D object corresponding to the point using the coordinates
specified as its center and with radius of size pointSize (in pixels).
|
void |
drawPoint3D(javafx.geometry.Point3D p)
Constructs a Sphere3D object corresponding to the coordinates of the Point3D
specified as its center and with radius of size pointSize (in pixels).
|
void |
drawPoint3DSet(javafx.geometry.Point3D[] p)
Draws a set of points with specified color.
|
void |
drawPolygon(javafx.geometry.Point3D[] v)
Constructs a polygon object using the Point3D array of vertices and draws it.
|
void |
drawPolygon(javafx.geometry.Point3D[] v,
boolean drawEdges,
boolean drawVertices,
boolean drawVertexLabels)
Constructs a polygon object using the Point3D array of vertices and draws it.
|
void |
drawPolygon3D(Polygon3D p3d)
Draws the polygon object specified.
|
void |
drawPolyhedron3D(org.edisonwj.draw3d.Polyhedron3D p3d)
Draws a Polyhedron3D object.
|
void |
drawPolyhedron3D(org.edisonwj.draw3d.Polyhedron3D p3d,
boolean showEdges)
Draws a Polyhedron3D object.
|
void |
drawPolyhedronEdges3D(org.edisonwj.draw3d.Polyhedron3D p3d)
Draws the edges of a Polyhedron3D object
|
void |
drawPolyLine3D(javafx.geometry.Point3D[] p)
Draws a polyline as specified by the parameter array of points.
|
void |
drawRectangle(double x,
double y,
double z,
double w,
double h)
Constructs a rectangle object with specified center point, width, and height,
and draws it.
|
void |
drawRectangle(double x,
double y,
double z,
double w,
double h,
double rx,
double ry,
double rz)
Constructs a rectangle object with specified center point, width, height,
x rotation, y rotation, and z rotation and draws it.
|
void |
drawRectangle3D(Rectangle3D r)
Draws the rectangle object specified.
|
void |
drawSphere(double x,
double y,
double z,
double r)
Constructs a Sphere3D object with specified center point and radius and draws it.
|
void |
drawSphere3D(Sphere3D s3d)
Draws the Sphere3D object specified.
|
void |
drawSphere3DSet(Sphere3D[] ss)
Draws a set of Sphere3D objects
|
void |
drawSquare(double x,
double y,
double z,
double ln)
Constructs a square object (Rectangle3D) with specified center point and side length
and draws it.
|
void |
drawSquare(double x,
double y,
double z,
double ln,
double rx,
double ry,
double rz)
Constructs a square object (Rectangle3D) with specified center point, side length,
x-rotation, y-rotation, z-rotation and draws it.
|
void |
drawTriangle3D(Triangle3D t3d)
Draws a Triangle3D object.
|
void |
drawVector(double[] v)
Constructs a Vector3D object with specified end points and draws it.
|
void |
drawVector(double x,
double y,
double z)
Constructs a Vector3D object with specified end point and draws it.
|
void |
drawVector3D(Vector3D vc)
Draws the Vector3D object specified.
|
void |
drawVector3DSet(Vector3D[] v)
Draws a set of Vector3D objects as specified in the parameter array.
|
double |
dX(double xu)
Converts x coordinate value from user to screen coordinate space.
|
double |
dY(double yu)
Converts y coordinate value from user to screen coordinate space.
|
double |
dZ(double zu)
Converts z coordinate value from user to screen coordinate space.
|
double |
getXMinMax()
Gets the current minimum/maximum value for the X coordinate in user space.
|
double |
getYMinMax()
Gets the current minimum/maximum value for the Y coordinate in user space.
|
double |
getZMinMax()
Gets the current minimum/maximum value for the Z coordinate in user space.
|
void |
incrSequence()
Initiates a new view and makes it immediately visible while making the
previous view invisible in a sequence of views with associated data objects.
|
Algorithm |
loadAlgorithm(java.lang.String className)
Loads the specified Algorithm class.
|
void |
loadData(java.lang.String fileName)
Loads the specified data file.
|
void |
loadData(java.lang.String pathName,
java.lang.String fileName)
Loads the specified data file.
|
static void |
main(java.lang.String[] args) |
void |
openFile(java.lang.String fileName)
Opens the specified file using the default application for its extension.
|
void |
openFile(java.lang.String pathName,
java.lang.String fileName)
Opens the specified file using the default application for its extension.
|
Line3D |
rotateLine3D(Line3D ln,
double rxd,
double ryd,
double rzd)
Computes a new Line3D object with start and end coordinates
transformed by rotations on each axis about the origin.
|
void |
saveData(java.lang.String fileName)
Saves current view data to the specified data file.
|
void |
saveData(java.lang.String pathName,
java.lang.String fileName)
Saves current view data to the specified data file.
|
void |
saveScene(java.lang.String format,
java.lang.String fileName)
Saves the current scene with the specified format to the specified file.
|
void |
saveScene(java.lang.String format,
java.lang.String pathName,
java.lang.String fileName)
Saves the current scene with the specified format to the specified file.
|
void |
saveSubScene(java.lang.String format,
java.lang.String fileName)
Saves the current subScene with the specified format to the specified file.
|
void |
saveSubScene(java.lang.String format,
java.lang.String pathName,
java.lang.String fileName)
Saves the current subScene with the specified format to the specified file.
|
void |
setAmbientLight(boolean b)
Activates (true value) ambient light for a view.
|
void |
setArrowRadius(double d)
Specifies the radius (pixels) to be used with basic drawArrow() methods.
|
void |
setBackgroundColor(javafx.scene.paint.Color c)
Sets the scene Background Color.
|
void |
setCamera(double x,
double y,
double z)
Sets the camera location associated with a view.
|
void |
setConeDivisions(int i)
Specifies the number of divisions to be used with basic drawCone() methods.
|
void |
setCullFace(javafx.scene.shape.CullFace cf)
Sets the default CullFace value.
|
void |
setCumulate(boolean b)
Activates (true value) overlay of subsequent views in the sequence of displays.
|
void |
setCylinderDivisions(int i)
Specifies the number of divisions to be used with basic drawCylinder() methods.
|
void |
setDefaults()
Set defaults:
-View settings
-Origin
-Scale
-XYZ Range
-Camera position
-Drawing settings
|
void |
setDrawColor(javafx.scene.paint.Color c1)
Creates a new default PhongMaterial object (drawMaterial) to be used in drawing all objects
and sets the default diffuse color.
|
void |
setDrawColor(javafx.scene.paint.Color c1,
javafx.scene.paint.Color c2)
Creates a new default PhongMaterial object (drawMaterial) to be used in drawing all objects
and sets the default diffuse and specular colors.
|
void |
setDrawMode(javafx.scene.shape.DrawMode dm)
Sets the default DrawMode value.
|
void |
setLabelFont(javafx.scene.text.Font f)
Sets the default Label font and size.
|
void |
setLabelFontSize(double d)
Sets the default Label font to "Regular" with specified size.
|
void |
setLineRadius(double d)
Specifies the radius (pixels) to be used with basic drawLine() methods.
|
void |
setMaterial(javafx.scene.paint.PhongMaterial m)
Sets the default PhongMaterial value.
|
void |
setOriginView(int x,
int y,
int z)
Sets the default origin (center) x, y, z coordinates in screen space (pixels).
|
void |
setOvalDivisions(int i)
Specifies the number of divisions to be used with basic drawOval() methods.
|
void |
setPointLight(boolean b)
Activates (true value) point lights for a view.
|
void |
setPointSize(double d)
Specifies the radius (pixels) to be used with basic drawPoint() methods.
|
void |
setScale(double scaleX,
double scaleY,
double scaleZ)
Sets the scale associated with a view.
|
void |
setSequencingOn()
Indicates the beginning of a sequence of views with associated data objects.
|
void |
setShowAxes(boolean b)
Activates (true value) display of axes.
|
void |
setShowBoundaryCube(boolean b)
Activates (true value) display of the boundary cube determined by the current values
of minX, maxX, minY, maxY, minZ, and maxZ
|
void |
setShowTickMarks(boolean b)
Activates (true value) display of tick marks.
|
void |
setSphereDivisions(int i)
Specifies the number of divisions to be used with basic drawSphere() methods.
|
void |
setStart()
Sets the default (0) initially displayed view number in a sequence of views.
|
void |
setStart(int num)
Sets the initially displayed view number in a sequence of views.
|
void |
setTexture(javafx.scene.image.Image image)
Sets the default Texture value.
|
void |
setVectorRadius(double d)
Specifies the radius (pixels) to be used with basic drawVector() methods.
|
void |
setXYaxesOnly(boolean b)
Activates (true value) display of coordinate axes with the positive Y axis pointing up
and no Z axis displayed.
|
void |
setXYZRange(double minmaxX,
double minmaxY,
double minmaxZ)
Sets the user coordinate range for x, y, and z dimensions.
|
void |
setYaxisUp(boolean b)
Activates (true value) display of coordinate axes with the positive Y axis pointing up.
|
void |
setZaxisUp(boolean b)
Activates (true value) display of coordinate axes with the positive Z axis pointing up.
|
void |
start(javafx.stage.Stage stage) |
double |
uX(double xs)
Converts an x value in screen coordinate space to user space.
|
public void start(javafx.stage.Stage stage) throws java.lang.Exception
start
in class javafx.application.Application
java.lang.Exception
public javafx.scene.Scene buildScene()
public void buildSubScene()
public void drawGrid(int sector, int div, javafx.scene.paint.PhongMaterial m)
sector
- int code indicating the grid sector to draw
0 - grid lines across all sectors
1 - +X, +Y, +Z sector
2 - +X, -Y, +Z sector
3 - -X, -Y, +Z sector
4 - -X, +Y, +Z sector
5 - +X, +Y, -Z sector
6 - +X, -Y, -Z sector
7 - -X, -Y, -Z sector
8 - -X, +Y, -Z sectordiv
- int specification of the number of divisions of the grid spacem
- PhongMaterial value determining the color of the boundary linepublic void setScale(double scaleX, double scaleY, double scaleZ)
scaleX
- Scale value for x coordinate.scaleY
- Scale value for y coordinate.scaleZ
- Scale value for z coordinate.public void setCamera(double x, double y, double z)
x
- Camera angle relative to the x axis in screen coordinate spacey
- Camera angle relative to the y axis in screen coordinate spacez
- Camera distance on the z axis in screen coordinate space (pixels)
Negative toward the viewer and positive going into the screen.public void setOriginView(int x, int y, int z)
x
- int value for the origin (center) x coordinate in pixelsy
- int value for the origin (center) y coordinate in pixelsz
- int value for the origin (center) z coordinate in pixelspublic void setXYZRange(double minmaxX, double minmaxY, double minmaxZ)
minmaxX
- Double minimum and maximum value for the x dimensionminmaxY
- Double minimum and maximum value for the y dimensionminmaxZ
- Double minimum and maximum value for the z dimensionpublic double getXMinMax()
public double getYMinMax()
public double getZMinMax()
public void buildTest()
public void setDefaults()
public void setAmbientLight(boolean b)
b
- boolean value that for true turns on ambient light and for false turns it offpublic void setPointLight(boolean b)
b
- boolean value that for true turns on point lights and for false turns then offpublic void setStart()
public void setStart(int num)
num
- Integer number of the initially displayed viewpublic void setShowAxes(boolean b)
b
- boolean value that for true turns on axes display and for false turns axes display offpublic void setShowTickMarks(boolean b)
b
- boolean value that for true turns on tick mark display and for false turns tick mark display offpublic void setYaxisUp(boolean b)
b
- boolean value that for true turns on axes display with Y up and for false sets axes display to Z uppublic void setXYaxesOnly(boolean b)
b
- boolean value that for true turns on axes display with Y up and for false sets axes display to Z uppublic void setZaxisUp(boolean b)
b
- boolean value that for true turns on axes display with Z up and for false sets axes display to Y uppublic void setShowBoundaryCube(boolean b)
b
- boolean value that for true turns on boundary cube display and false turns it offpublic void setPointSize(double d)
d
- radius in pixels of point objectspublic void setLineRadius(double d)
d
- radius in pixels of line objectspublic void setArrowRadius(double d)
d
- radius in pixels of arrow objectspublic void setVectorRadius(double d)
d
- radius in pixels of vector objectspublic void setConeDivisions(int i)
i
- Number of divisions to be used in drawing conespublic void setCylinderDivisions(int i)
i
- Number of divisions to be used in drawing cylinderspublic void setOvalDivisions(int i)
i
- Number of divisions to be used in drawing ovalspublic void setSphereDivisions(int i)
i
- Number of divisions to be used in drawing spherespublic void setBackgroundColor(javafx.scene.paint.Color c)
c
- Color specification for background colorpublic void setCullFace(javafx.scene.shape.CullFace cf)
cf
- default CullFace valuepublic void setDrawMode(javafx.scene.shape.DrawMode dm)
dm
- default DrawMode valuepublic void setDrawColor(javafx.scene.paint.Color c1)
c1
- default PhongMaterial (drawMaterial) Diffuse Color is set to this value.public void setDrawColor(javafx.scene.paint.Color c1, javafx.scene.paint.Color c2)
c1
- default PhongMaterial (drawMaterial) Diffuse Color is set to this value.c2
- default PhongMaterial (drawMaterial) Specular Color is set to this value.public void setLabelFontSize(double d)
d
- font sizepublic void setLabelFont(javafx.scene.text.Font f)
f
- specifies default Label font with format: Font.font("name", size)public void setMaterial(javafx.scene.paint.PhongMaterial m)
m
- PhongMaterialpublic void setTexture(javafx.scene.image.Image image)
image
- Image texture to be appliedpublic void setSequencingOn()
public void incrSequence()
public void setCumulate(boolean b)
b
- boolean value indicating cumulation of views is on (true) or off (false)public double uX(double xs)
xs
- x value to be convertedpublic double dX(double xu)
xu
- x coordinate to be convertedpublic double dY(double yu)
yu
- y coordinate to be convertedpublic double dZ(double zu)
zu
- z coordinate to be convertedpublic void drawArrow(double x1, double y1, double z1, double x2, double y2, double z2)
x1
- defines start point x coordinatey1
- defines start point y coordinatez1
- defines start point z coordinatex2
- defines end point x coordinatey2
- defines end point y coordinatez2
- defines end point z coordinatepublic void drawArrow3D(Arrow3D a3d)
a3d
- specifies an Arrow3D object with start point, end point,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawBezier(javafx.geometry.Point3D[] p)
p
- Point3D[] array of control points defining the curvepublic void drawBox3D(Box3D b3d)
b3d
- specifies a Box3D object with center point, width, height, and depth,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawBox3D(Box3D b3d, boolean showEdges)
b3d
- specifies a Box3D object with center point, width, height, and depth,
x-rotation, y-rotation, z-rotation and drawing parameters.showEdges
- boolean value indicating whether to show edges or notpublic void drawBoxEdges3D(Box3D b3d)
b3d
- specifies a BOX3D object with center point, size,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawCircle(double x, double y, double z, double r)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinater
- specifies radiuspublic void drawCircle(double x, double y, double z, double r, double rx, double ry, double rz)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinater
- specifies radiusrx
- x-rotationry
- y-rotationrz
- z-rotationpublic void drawCone(double x, double y, double z, double r, double h)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinater
- specifies radiush
- specifies heightpublic void drawCone(double x, double y, double z, double r, double h, double rx, double ry, double rz)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinater
- specifies radiush
- heightrx
- x-rotationry
- y-rotationrz
- z-rotationpublic void drawCone3D(Cone3D c3d)
c3d
- specifies a Cone3D object with tip point, radius, height,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawCuboid(double x, double y, double z, double width, double height, double depth)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinatewidth
- specifies widthheight
- specifies heightdepth
- specifies depthpublic void drawCuboid(double x, double y, double z, double width, double height, double depth, double rx, double ry, double rz)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinatewidth
- specifies widthheight
- specifies heightdepth
- specifies depthrx
- x-rotationry
- y-rotationrz
- z-rotationpublic void drawCylinder(double x, double y, double z, double r, double h)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinater
- specifies radiush
- specifies heightpublic void drawCylinder(double x, double y, double z, double r, double h, double rx, double ry, double rz)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinater
- specifies radiush
- specifies heightrx
- specifies x-rotationry
- specifies y-rotationrz
- specifies z-rotationpublic void drawCylinder3D(Cylinder3D c3d)
c3d
- specifies a Cylinder3D object with center point, radius, height,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawDrone3D(Drone3D d3d)
d3d
- specifies a Drone3D object with xyz location, xyz rotations, and drawing parameters.public void drawDrone3D(int view, Drone3D d3d)
view
- specifies the view number to use for drawingd3d
- specifies a Drone3D object with xyz location, xyz rotations, and drawing parameters.public void drawLabel(double x, double y, double z, java.lang.String s)
x
- x coordinate of the center of the Text labely
- y coordinate of the center of the Text labelz
- z coordinate of the center of the Text labels
- String contents of the labelpublic void drawLabel(double x, double y, double z, java.lang.String s, javafx.scene.text.Font f, javafx.scene.paint.Color c)
x
- x coordinate of the center of the Text labely
- y coordinate of the center of the Text labelz
- z coordinate of the center of the Text labels
- String contents of the labelf
- Font for the labelc
- Color for the labelpublic void drawLabel(double x, double y, double z, double rx, double ry, double rz, java.lang.String s)
x
- x coordinate of the center of the Text labely
- y coordinate of the center of the Text labelz
- z coordinate of the center of the Text labelrx
- degrees of rotation about the x axisry
- degrees of rotation about the y axisrz
- degrees of rotation about the z axiss
- String contents of the labelpublic void drawLabel(double x, double y, double z, double rx, double ry, double rz, java.lang.String s, javafx.scene.text.Font f, javafx.scene.paint.Color c)
x
- x coordinate of the center of the Text labely
- y coordinate of the center of the Text labelz
- z coordinate of the center of the Text labelrx
- degrees of rotation about the x axisry
- degrees of rotation about the y axisrz
- degrees of rotation about the z axiss
- String contents of the labelf
- Font for the labelc
- Color for the labelpublic void drawLabel3D(Text3D t3d)
t3d
- Text3D object to be drawnpublic void drawLine(double x1, double y1, double z1, double x2, double y2, double z2)
x1
- defines start point x coordinatey1
- defines start point y coordinatez1
- defines start point z coordinatex2
- defines end point x coordinatey2
- defines end point y coordinatez2
- defines end point z coordinate
Uses value lineRadius for radius of line
Uses value drawMaterial for drawing colorpublic void drawLine3D(Line3D ln)
ln
- specifies a Line3D object with start point, end point, drawing parameters.public void drawLine3DSet(Line3D[] ln)
ln
- Array of Line3D object to be drawnpublic void drawLineEquation(double a1, double a2, double a3, double b1, double b2, double b3)
a1
- a1 coordinate of Cartesian line equationa2
- a2 coordinate of Cartesian line equationa3
- a3 coordinate of Cartesian line equationb1
- b1 coordinate of Cartesian line equationb2
- b2 coordinate of Cartesian line equationb3
- b3 coordinate of Cartesian line equationpublic void drawMesh3D(Mesh3D m3d)
m3d
- specifies a Mesh3D object with location point,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawOval(double xi, double yi, double zi, double a, double b)
xi
- specifies center point x coordinateyi
- specifies center point y coordinatezi
- specifies center point z coordinatea
- specifies major radiusb
- specifies minor radiuspublic void drawOval(double xi, double yi, double zi, double a, double b, double rx, double ry, double rz)
xi
- specifies center point x coordinateyi
- specifies center point y coordinatezi
- specifies center point z coordinatea
- specifies major radiusb
- specifies minor radiusrx
- x-rotationry
- y-rotationrz
- z-rotationpublic void drawOval3D(Oval3D o3d)
o3d
- specifies an Oval3D object with center point, major radius, minor radius,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawPlane(double a, double b, double c, double d)
a
- x coefficient of plane equationb
- y coefficient of plane equationc
- z coefficient of plane equationd
- coefficient of equationpublic void drawPlane(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
x1
- point 1 x coordinatey1
- point 1 y coordinatez1
- point 1 z coordinatex2
- point 2 x coordinatey2
- point 2 y coordinatez2
- point 2 z coordinatex3
- point 3 x coordinatey3
- point 3 y coordinatez3
- point 3 z coordinatepublic void drawPlane3D(Plane3D pl)
pl
- specifies a plane object with drawing parameters.public void drawPlanePoints(Plane3D pl)
pl
- Plane3D object defining a Planepublic void drawPoint(double x, double y, double z)
x
- y coordinate of pointy
- y coordinate of pointz
- z coordinate of pointpublic void drawPoint3D(javafx.geometry.Point3D p)
p
- Point3D specifying point locationpublic void drawPoint3DSet(javafx.geometry.Point3D[] p)
p
- Point3D[] array specifying point locationspublic void drawPolygon(javafx.geometry.Point3D[] v)
v
- Point3D array containing polygon vertices in counter clockwise orderpublic void drawPolygon(javafx.geometry.Point3D[] v, boolean drawEdges, boolean drawVertices, boolean drawVertexLabels)
v
- Point3D array containing polygon vertices in counter clockwise orderdrawEdges
- Boolean flag indicating whether to draw edgesdrawVertices
- Boolean flag indicating whether to draw verticesdrawVertexLabels
- Boolean flag indicating whether to draw vertex labelspublic void drawPolygon3D(Polygon3D p3d)
p3d
- Polygon3D object to be drawnpublic void drawPolyhedron3D(org.edisonwj.draw3d.Polyhedron3D p3d)
p3d
- specifies a Polyhedron3D object with center point, size,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawPolyhedron3D(org.edisonwj.draw3d.Polyhedron3D p3d, boolean showEdges)
p3d
- specifies a Polyahedron3D object with center point, size,
x-rotation, y-rotation, z-rotation and drawing parameters.showEdges
- Boolean value indicating whether to show the
Polyhedron edges (true) or not (false).public void drawPolyhedronEdges3D(org.edisonwj.draw3d.Polyhedron3D p3d)
p3d
- specifies a Polyhedron3D object with center point, size,
x-rotation, y-rotation, z-rotation and drawing parameters.public void drawPolyLine3D(javafx.geometry.Point3D[] p)
p
- Point3D{} array of points defining successive line segments to be displayedpublic void drawRectangle(double x, double y, double z, double w, double h)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinatew
- specifies widthh
- heightpublic void drawRectangle(double x, double y, double z, double w, double h, double rx, double ry, double rz)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinatew
- specifies widthh
- heightrx
- x-rotationry
- y-rotationrz
- z-rotationpublic void drawRectangle3D(Rectangle3D r)
r
- Rectangle3D object to be drawnpublic void drawSphere(double x, double y, double z, double r)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinater
- specifies radiuspublic void drawSphere3D(Sphere3D s3d)
s3d
- Sphere3D object to be drawnpublic void drawSphere3DSet(Sphere3D[] ss)
ss
- Array of Sphere3D objects to be drawnpublic void drawSquare(double x, double y, double z, double ln)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinateln
- specifies side lengthpublic void drawSquare(double x, double y, double z, double ln, double rx, double ry, double rz)
x
- specifies center point x coordinatey
- specifies center point y coordinatez
- specifies center point z coordinateln
- specifies side lengthrx
- x-rotationry
- y-rotationrz
- z-rotationpublic void drawTriangle3D(Triangle3D t3d)
t3d
- specifies a Triangle3D object with vertices and drawing parameters.public void drawVector(double[] v)
v
- specifies double[3] array containing x, y, z coordinates of vector end pointpublic void drawVector(double x, double y, double z)
x
- specifies vector end point x coordinatey
- specifies vector end point y coordinatez
- specifies vector end point z coordinatepublic void drawVector3D(Vector3D vc)
vc
- Vector3D object to be drawn with Cartesian coordinatespublic void drawVector3DSet(Vector3D[] v)
v
- Vector3D{} array of Vector3D objectspublic void openFile(java.lang.String pathName, java.lang.String fileName)
pathName
- String specification of file pathfileName
- String specification of file namepublic void openFile(java.lang.String fileName)
fileName
- String specification of file name in current working directory
(or Resources directory if present)public void loadData(java.lang.String pathName, java.lang.String fileName)
pathName
- String specification of the full file pathfileName
- String specification of file namepublic void loadData(java.lang.String fileName)
fileName
- String specification of file name in current working directory
(or Resources directory if present)public Algorithm loadAlgorithm(java.lang.String className)
className
- String name of the Algorithm class file to be executedpublic void saveScene(java.lang.String format, java.lang.String pathName, java.lang.String fileName)
format
- String "bmp", "jpg", "png", "gif"pathName
- String specification of file pathfileName
- String specification of file namepublic void saveScene(java.lang.String format, java.lang.String fileName)
format
- String "bmp", "jpg", "png", "gif"fileName
- String specification of file name in current working directory
(or Resources directory if present)public void saveSubScene(java.lang.String format, java.lang.String pathName, java.lang.String fileName)
format
- String "bmp", "jpg", "png", "gif"pathName
- String specification of file pathfileName
- String specification of file namepublic void saveSubScene(java.lang.String format, java.lang.String fileName)
format
- String "bmp", "jpg", "png", "gif"fileName
- String specification of file name in current working directory
(or Resources directory if present)public void saveData(java.lang.String pathName, java.lang.String fileName)
pathName
- String specification of file pathfileName
- String specification of file namepublic void saveData(java.lang.String fileName)
fileName
- String specification of file name in current working directory
(or Resources directory if present)public Line3D rotateLine3D(Line3D ln, double rxd, double ryd, double rzd)
ln
- Line to be rotatedrxd
- Rotation with respect to x axisryd
- Rotation with respect to y axisrzd
- Rotation with respect to z axispublic static void main(java.lang.String[] args)