physicon.graphLib
Class FuncCurve
java.lang.Object
|
+--physicon.graphLib.GraphElementBase
|
+--physicon.graphLib.GraphCurveBase
|
+--physicon.graphLib.FuncCurve
- public class FuncCurve
- extends GraphCurveBase
Represents the parametric curve.
Contains two Funcs - the func x(t) and y(t),
where t - is the parameter.
Constructor Summary |
FuncCurve(CurveDrawerBase _drawer,
physicon.funcs.Func _func,
double _minParamValue,
double _maxParamValue)
Constructor. |
Methods inherited from class physicon.graphLib.GraphElementBase |
addDependent,
contains,
contains,
getContainer,
getContext,
getDepend,
getDrawer,
getGEObject,
getGraphElement,
getRedrawFlag,
getRefPoint,
getRoughRect,
getZLevel,
isCreated,
isVisible,
setDrawer,
setRefPoint,
setVisible,
setZLevel,
update |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FuncCurve
public FuncCurve(CurveDrawerBase _drawer,
physicon.funcs.Func _func,
double _minParamValue,
double _maxParamValue)
- Constructor.
- Parameters:
_drawer
- - the drawer object for the current curve._xFunc
- - the x(t) function_yFunc
- - the y(t) function_minParamValue
- - the minimal value for the parameter t._maxParamValue
- - the maximal value for the parameter t.
getMinParamValue
public final double getMinParamValue()
- Returns the minimal parameter value for the current
curve
- Overrides:
- getMinParamValue in class GraphCurveBase
setAccuracy
public void setAccuracy(double a)
getAccuracy
public double getAccuracy()
setFixedParamStep
public void setFixedParamStep(double _d)
getMaxParamValue
public double getMaxParamValue()
- Returns the maximal parameter value for the current
curve
- Overrides:
- getMaxParamValue in class GraphCurveBase
setFunc
public void setFunc(physicon.funcs.Func _func)
- Changes x(t) function to the given one
- Parameters:
_xFunc
- - new x(t) fuction
getFunc
public physicon.funcs.Func getFunc()
setRedrawFlag
public void setRedrawFlag(boolean _b)
- Overrides:
- setRedrawFlag in class GraphElementBase
setMinParamValue
public void setMinParamValue(double _param)
- Sets new value for the minimal parameter for the
current curve. The simulator is responsible for
the correction of this parameter.
- Parameters:
_param
- - new minimal parameter value.
setMaxParamValue
public void setMaxParamValue(double _param)
- Sets new value for the maximal parameter for the
current curve. The simulator is responsible for
the correction of this parameter.
- Parameters:
_param
- - new minimal parameter value.
getLocalPoint
public DoublePoint getLocalPoint(double _param)
- Returns the curve point at the given parameter
value. If the parameter is less than minimal
parameter value, first point is returned.
If parameter is grater then maximum parameter
value, last point is returned.
- Parameters:
_param
- - the given parameter value- Overrides:
- getLocalPoint in class GraphCurveBase
updateDrawer
public void updateDrawer()
- Updates drawer.
The point array of drawer is filled in this function
- Overrides:
- updateDrawer in class GraphElementBase