Axes constructor
Axes({
- double xMin = -FRAME_X_RADIUS,
- double xMax = FRAME_X_RADIUS,
- double yMin = -FRAME_Y_RADIUS,
- double yMax = FRAME_Y_RADIUS,
- Vector3 centerPoint = ORIGIN,
- AxisConfig axisConfig = DefaultAxisConfig,
- AxisConfig xAxisConfig = DefaultXAxisConfig,
- AxisConfig yAxisConfig = DefaultYAxisConfig,
Implementation
Axes({
double xMin = -FRAME_X_RADIUS,
double xMax = FRAME_X_RADIUS,
double yMin = -FRAME_Y_RADIUS,
double yMax = FRAME_Y_RADIUS,
this.centerPoint = ORIGIN,
this.axisConfig = DefaultAxisConfig,
this.xAxisConfig = DefaultXAxisConfig,
this.yAxisConfig = DefaultYAxisConfig,
}) : super(
xMin: xMin,
xMax: xMax,
yMin: yMin,
yMax: yMax,
) {
xAxis = createAxis(xMin, xMax, xAxisConfig.merge(defaultXAxisConfig));
yAxis = createAxis(yMin, yMax, yAxisConfig.merge(defaultYAxisConfig));
yAxis.rotateAboutOrigin(-90 * DEGREES);
axes = VGroup([xAxis, yAxis]);
add([xAxis, yAxis]);
shift(centerPoint);
}