|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.Decoration vmm.planecurve.parametric.TangentAndNormalDecoration
public class TangentAndNormalDecoration
A decoration that appears as a red tangent line and a blue normal line on a parametric plane curve at a specified value of t. The length of the lines is 40 pixels. If the functions that define the curve or their derivatives are undefined at t, or if the length of the tangent vector is zero, then nothing is drawn.
Field Summary |
---|
Fields inherited from class vmm.core.Decoration |
---|
decorationNeedsRedraw |
Constructor Summary | |
---|---|
TangentAndNormalDecoration()
Creates a TangentAndNormalDecoration with no associated curve. |
Method Summary | |
---|---|
void |
doDraw(java.awt.Graphics2D g,
View view,
Transform limits)
Draw the decoration. |
PlaneCurveParametric |
getCurve()
Returns the curve to which this decoration applies. |
double |
getT()
Returns the t-value of the point (x(t),y(t)) where the decoration is drawn on the curve. |
void |
setCurve(PlaneCurveParametric c)
Sets the curve to which this decoration applies. |
void |
setIndex(int tIndex)
Set the t-value to be at one of the points that are used for drawing the curve. |
void |
setT(double t)
Change the value of t where the decoration appears. |
Methods inherited from class vmm.core.Decoration |
---|
addChangeListener, addExtraXML, computeDrawData, fireDecorationChangeEvent, forceRedraw, getLayer, readExtraXML, removeChangeListener, setLayer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TangentAndNormalDecoration()
setCurve(PlaneCurveParametric)
, or it will be set
implicitly when the decoration is drawn.
Method Detail |
---|
public PlaneCurveParametric getCurve()
public void setCurve(PlaneCurveParametric c)
public void setT(double t)
public double getT()
public void setIndex(int tIndex)
tIndex
- An index into the array of t-values that the curve
uses to generate the curve. The index should be in the legal
range; if not, nothing is drawn. The range is from 0 to
getCurve().getPointCount().public void doDraw(java.awt.Graphics2D g, View view, Transform limits)
doDraw
in class Decoration
g
- The graphics context where the Exhibit and its decorations are being drawn.view
- The View that is drawing the Exhibit; this object contains other
information that might be of use, such as the Display, if any, associated with
the View, and the the actual Exhibit that is being drawn.limits
- Contains information about the rectangular area in the
xy-plane that is being drawn and about the rectangle of pixels in the graphics
context where it is drawn. Note that at least for the top-level View class,
transform.getX() and transform.getY() can be assumed to be zero.Exhibit.render(Graphics2D, View, Transform, ArrayList)
,
Decoration.computeDrawData(View, boolean, Transform, Transform)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |