|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.chart.util.PolarConverter
Utility class for polar coordinate calculation.
Field Summary | |
static int |
NET
Equal to ChartConstants.NET |
static int |
RING
Equal to ChartConstants.RING |
Constructor Summary | |
PolarConverter(ScaleModel tangentialScaleModel,
int orientation,
float innerRadius)
Constructs a new PolarConverter that uses the given scale model as the tangential scale model. |
Method Summary | |
float |
convertX(float tangentialPosition,
float radialPosition)
Returns the x-coordinate of a point. |
float |
convertY(float tangentialPosition,
float radialPosition)
Returns the y-coordinate of a point. |
double |
getAngle(float tangentialPosition)
Returns the angle of the given tangential position. |
float |
getCenterX()
Returns the x-coordinate of the center of this converter. |
float |
getCenterY()
Returns the y-coordinate of the center of this converter. |
float |
getInnerRadius()
Returns the inner radius of this converter. |
int |
getOrientation()
Returns the orientation of this polar converter. |
double |
getSpokeAngle(int spokeIndex)
Returns the angle of a spoke. |
int |
getSpokeCount()
Returns the number of spokes of this converter. |
float |
getSpokeX(int spokeIndex,
float radialPosition)
Returns the x-coordinate of a spoke at a given position. |
float |
getSpokeY(int spokeIndex,
float radialPosition)
Returns the y-coordinate of a spoke at a given position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NET
ChartConstants.NET
public static final int RING
ChartConstants.RING
Constructor Detail |
public PolarConverter(ScaleModel tangentialScaleModel, int orientation, float innerRadius)
PolarConverter
that uses the given scale model as the tangential scale model.
tangentialScaleModel
- The scale that goes along the bow.orientation
- The orientation of the converter, either NET
or RING
.innerRadius
- The inner radius.Method Detail |
public int getSpokeCount()
public float getSpokeX(int spokeIndex, float radialPosition)
spokeIndex
- The index of the spoke, must be >= 0 and < getSpokeCount()
.radialPosition
- The position in the thickness, i.e. measured from the inner radius.
public float getSpokeY(int spokeIndex, float radialPosition)
spokeIndex
- The index of the spoke, must be >= 0 and < getSpokeCount()
.
public double getSpokeAngle(int spokeIndex)
spokeIndex
- The index of the spoke, must be >= 0 and < getSpokeCount()
.
public float convertX(float tangentialPosition, float radialPosition)
tangentialPosition
- The tangential position of the point.radialPosition
- The radial position of the point.
public float convertY(float tangentialPosition, float radialPosition)
tangentialPosition
- The tangential position of the point.radialPosition
- The radial position of the point.
public double getAngle(float tangentialPosition)
public int getOrientation()
NET
or RING
.public float getCenterX()
public float getCenterY()
public float getInnerRadius()
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |