|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.components.gauger.PolarPoint
public class PolarPoint
Class representing polar point defined by radius and angle.
Constructor Summary | |
---|---|
PolarPoint()
Creates a new PolarPoint object. |
|
PolarPoint(double r,
double phi)
Creates a new PolarPoint object. |
Method Summary | |
---|---|
static double |
degToRad(double angle)
Converts degrees to radians. |
static java.awt.geom.Point2D |
polarToCartesian(double r,
double phi)
Converts polar point to cartesian coordinates. |
static java.awt.geom.Point2D |
polarToCartesian(java.awt.geom.Point2D p,
double r,
double phi)
Converts polar point to cartesian coordinates. |
static void |
polarToCartesian(PolarPoint pp,
java.awt.geom.Point2D p)
Converts polar point to cartesian coordinates. |
static double |
radToDeg(double angle)
Converts radians to degrees. |
java.awt.geom.Point2D |
toPoint()
Converts this point to cartesian coordinate representation. |
java.awt.geom.Point2D |
toPoint(java.awt.Point p)
Converts this point to cartesian coordinates and puts result in provided instance of point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolarPoint()
public PolarPoint(double r, double phi)
r
- Radius parameter.phi
- Angle parameter in radians.Method Detail |
---|
public static final double degToRad(double angle)
angle
- angle in degrees.
public static final double radToDeg(double angle)
angle
- in radians.
public static final java.awt.geom.Point2D polarToCartesian(double r, double phi)
r
- Radius parameter.phi
- Angle parameter.
public static final java.awt.geom.Point2D polarToCartesian(java.awt.geom.Point2D p, double r, double phi)
p
- Point which will hold the result.r
- Radius parameter.phi
- Angle parameter.
public static final void polarToCartesian(PolarPoint pp, java.awt.geom.Point2D p)
pp
- Point in polar coordinates.p
- Point in cartesian coordinates.public java.awt.geom.Point2D toPoint()
public java.awt.geom.Point2D toPoint(java.awt.Point p)
p
- Object that will hold the result.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |