|
||||||||||
| 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 Segmentpublic Vec getCenter()
public double getDistanceToEnd(Vec pos)
getDistanceToEnd in class Segmentpublic double getDistanceToLeft(Vec pos)
getDistanceToLeft in class Segmentpublic double getDistanceToMiddle(Vec pos)
getDistanceToMiddle in class Segmentpublic double getDistanceToRight(Vec pos)
getDistanceToRight in class Segmentpublic double getDistanceToSide(Vec pos)
getDistanceToSide in class Segmentpublic double getEndAng()
public double getEndWidth()
getEndWidth in class Segmentpublic double getLength()
getLength in class Segmentpublic Vec getMiddle()
getMiddle in class Segmentpublic double getRadius()
getRadius in class Segmentpublic double getStartAng()
public double getStartWidth()
getStartWidth in class Segmentpublic int getType()
getType in class Segmentpublic double getWidth(Vec pos)
public boolean isOnSegment(Vec pos)
isOnSegment in class Segmentpublic void move(Vec moveVec)
move in class Segment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||