|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jbotrace.base.Segment | +--jbotrace.base.Curve
Description: Curve is a subclass of part and descriptes a curve in the track.
Field Summary |
Fields inherited from class jbotrace.base.Segment |
CURVE, STRAIGHT |
Constructor Summary | |
Curve(Vec center,
double radius,
double startWidth,
double endWidth,
double startAng,
double endAng)
Construcst a new curce with the given parameters. |
Method Summary | |
Vec[] |
getBoundingBox()
Returns the box bounding of the segment |
Vec |
getCenter()
Returns the center of the curve |
double |
getDistanceToEnd(Vec pos)
Returns the distance to the end of the curve from the given position |
double |
getDistanceToLeft(Vec pos)
Returns the distance to the left side of the curve at the given position |
double |
getDistanceToMiddle(Vec pos)
Returns the distance to the middle of the curve |
double |
getDistanceToRight(Vec pos)
Returns the distance to the right side of the curve at the given position |
double |
getDistanceToSide(Vec pos)
Returns the distance of the given point to the side of the curve or the maximum value for double, if the point is not beside the curve |
double |
getEndAng()
Returns the angle at the end of the curve |
double |
getEndWidth()
Returns the width at the end of the curve |
double |
getLength()
Calculates and returns the length of the curve |
Vec |
getMiddle()
Returns the middle of the represented part of the track. |
double |
getRadius()
Returns the radius of the curve |
double |
getStartAng()
Returns the angle at the beginning of the curve |
double |
getStartWidth()
Returns the width at the beginning of the curve |
int |
getType()
Returns the type number of the segment. |
double |
getWidth(Vec pos)
Return the width of the curve at the given position |
boolean |
isOnSegment(Vec pos)
Returns true of the given position is on the part and false otherwise. |
void |
move(Vec moveVec)
Moves the segment |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Curve(Vec center, double radius, double startWidth, double endWidth, double startAng, double endAng)
Method Detail |
public Vec[] getBoundingBox()
getBoundingBox
in class Segment
public Vec getCenter()
public double getDistanceToEnd(Vec pos)
getDistanceToEnd
in class Segment
public double getDistanceToLeft(Vec pos)
getDistanceToLeft
in class Segment
public double getDistanceToMiddle(Vec pos)
getDistanceToMiddle
in class Segment
public double getDistanceToRight(Vec pos)
getDistanceToRight
in class Segment
public double getDistanceToSide(Vec pos)
getDistanceToSide
in class Segment
public double getEndAng()
public double getEndWidth()
getEndWidth
in class Segment
public double getLength()
getLength
in class Segment
public Vec getMiddle()
getMiddle
in class Segment
public double getRadius()
getRadius
in class Segment
public double getStartAng()
public double getStartWidth()
getStartWidth
in class Segment
public int getType()
getType
in class Segment
public double getWidth(Vec pos)
public boolean isOnSegment(Vec pos)
isOnSegment
in class Segment
public void move(Vec moveVec)
move
in class Segment
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |