physicon.graphLib
Class ParamCurve

java.lang.Object
  |
  +--physicon.graphLib.GraphElementBase
        |
        +--physicon.graphLib.GraphCurveBase
              |
              +--physicon.graphLib.ParamCurve

public class ParamCurve
extends GraphCurveBase

Represents the parametric curve. Contains two Funcs - the func x(t) and y(t), where t - is the parameter.


Constructor Summary
ParamCurve(CurveDrawerBase _drawer, physicon.funcs.Func _xFunc, physicon.funcs.Func _yFunc, double _minParamValue, double _maxParamValue)
          Constructor.
 
Method Summary
 DoublePoint getLocalPoint(double _param)
          Returns the curve point at the given parameter value.
 double getMaxParamValue()
          Returns the maximal parameter value for the current curve
 double getMinParamValue()
          Returns the minimal parameter value for the current curve
 physicon.funcs.Func getXFunc()
           
 physicon.funcs.Func getYFunc()
           
 void setFixedParamStep(double _d)
           
 void setMaxParamValue(double _param)
          Sets new value for the maximal parameter for the current curve.
 void setMinParamValue(double _param)
          Sets new value for the minimal parameter for the current curve.
 void setRedrawFlag(boolean _b)
           
 void setXFunc(physicon.funcs.Func _xFunc)
          Changes x(t) function to the given one
 void setYFunc(physicon.funcs.Func _yFunc)
          Changes y(t) function to the given one
 void updateDrawer()
          Updates drawer.
 
Methods inherited from class physicon.graphLib.GraphCurveBase
getGlobalPoint, getNormLocalPoint, normilizeParamValue, restoreParamValue
 
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
 

Constructor Detail

ParamCurve

public ParamCurve(CurveDrawerBase _drawer,
                  physicon.funcs.Func _xFunc,
                  physicon.funcs.Func _yFunc,
                  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.
Method Detail

getMinParamValue

public final double getMinParamValue()
Returns the minimal parameter value for the current curve
Overrides:
getMinParamValue in class GraphCurveBase

setFixedParamStep

public void setFixedParamStep(double _d)

getMaxParamValue

public double getMaxParamValue()
Returns the maximal parameter value for the current curve
Overrides:
getMaxParamValue in class GraphCurveBase

setXFunc

public void setXFunc(physicon.funcs.Func _xFunc)
Changes x(t) function to the given one
Parameters:
_xFunc - - new x(t) fuction

setYFunc

public void setYFunc(physicon.funcs.Func _yFunc)
Changes y(t) function to the given one
Parameters:
_yFunc - - new y(t) fuction

getXFunc

public physicon.funcs.Func getXFunc()

getYFunc

public physicon.funcs.Func getYFunc()

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