Package renderer.models_L
Class Axes2D
- java.lang.Object
-
- renderer.scene.Model
-
- renderer.models_L.Axes2D
-
-
Field Summary
-
Fields inherited from class renderer.scene.Model
colorList, name, primitiveList, vertexList, visible
-
-
Constructor Summary
Constructors Constructor Description Axes2D()
Create an x and y axis from -1 to +1 on each axis.Axes2D(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks)
Create an x-axis fromxMin
toxMax
and a y-axis fromyMin
toyMax
.Axes2D(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color c)
Create an x-axis fromxMin
toxMax
and a y-axis fromyMin
toyMax
.Axes2D(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color cX, Color cY)
Create an x-axis fromxMin
toxMax
and a y-axis fromyMin
toyMax
.Axes2D(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color cX, Color cY, double z)
Create an x-axis fromxMin
toxMax
and a y-axis fromyMin
toyMax
.
-
-
-
Constructor Detail
-
Axes2D
public Axes2D()
Create an x and y axis from -1 to +1 on each axis. The defaultColor
is white.
-
Axes2D
public Axes2D(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks)
- Parameters:
xMin
- left end point for the x-axisxMax
- right end point for the x-axisyMin
- bottom end point for the y-axisyMax
- top end point for the y-axisxMarks
- number of evenly spaced tick marks on the x-axisyMarks
- number of evenly spaced tick marks on the y-axis
-
Axes2D
public Axes2D(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color c)
Create an x-axis fromxMin
toxMax
and a y-axis fromyMin
toyMax
. Use the givenColor
for both axes.- Parameters:
xMin
- left end point for the x-axisxMax
- right end point for the x-axisyMin
- bottom end point for the y-axisyMax
- top end point for the y-axisxMarks
- number of evenly spaced tick marks on the x-axisyMarks
- number of evenly spaced tick marks on the y-axisc
-Color
for both axes
-
Axes2D
public Axes2D(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color cX, Color cY)
Create an x-axis fromxMin
toxMax
and a y-axis fromyMin
toyMax
. Use the givenColor
for each axis.- Parameters:
xMin
- left end point for the x-axisxMax
- right end point for the x-axisyMin
- bottom end point for the y-axisyMax
- top end point for the y-axisxMarks
- number of evenly spaced tick marks on the x-axisyMarks
- number of evenly spaced tick marks on the y-axiscX
-Color
for the x-axiscY
-Color
for the y-axis
-
Axes2D
public Axes2D(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color cX, Color cY, double z)
Create an x-axis fromxMin
toxMax
and a y-axis fromyMin
toyMax
. Use the givenColor
for each axis.The
z
parameter is so that we can put the axis just above or just below the xy-plane (sayz=0.01
orz=-0.01
). This way, the axes can be just in front of or just behind whatever is being drawn in the xy-plane.- Parameters:
xMin
- left end point for the x-axisxMax
- right end point for the x-axisyMin
- bottom end point for the y-axisyMax
- top end point for the y-axisxMarks
- number of evenly spaced tick marks on the x-axisyMarks
- number of evenly spaced tick marks on the y-axiscX
-Color
for the x-axiscY
-Color
for the y-axisz
- offset of the axes away from the xy-plane
-
-