|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.util.Coordinates
public class Coordinates
This class is responsible for transforming points into exact coordinates
using the AffineTransform
class.
Constructor Summary | |
---|---|
Coordinates()
|
Method Summary | |
---|---|
static AffineTransform |
getAffineTransform(double heading,
double x,
double y)
Get the AffineTransform from the given values. |
static AffineTransform |
getAffineTransformShip(ITransformablePeer peer)
Get the AffineTransform
for the ShipPeer. |
static double |
getParallax(ITransformable peer,
IComponent component,
double x,
double y)
Get the parallax (angle) between the component and the other coordinates. |
static Point2D |
getPivot(ITransformable peer,
double y)
getPivot(ITransformable, double, double) |
static Point2D |
getPivot(ITransformable peer,
double x,
double y)
Get the transformed pivot point of an object on the ship. |
static AffineTransform |
getPivotTransform(double heading,
double x1,
double y1,
double x2,
double y2,
double rotation)
Get the AffineTransform for the
given values. |
static AffineTransform |
getPivotTransform(ITransformable peer,
double y,
double rotation)
getPivotTransform(ITransformable, double, double, double) |
static AffineTransform |
getPivotTransform(ITransformable peer,
double x,
double y,
double rotation)
Get the AffineTransform
for the specified coordinates on the peer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Coordinates()
Method Detail |
---|
public static final Point2D getPivot(ITransformable peer, double y)
getPivot(ITransformable, double, double)
public static final Point2D getPivot(ITransformable peer, double x, double y)
peer
- The peer for whom to calculate the pivot point.x
- The X-coordinate relative to that of the ship.y
- The Y-coordinate relative to that of the ship.
public static final AffineTransform getPivotTransform(ITransformable peer, double y, double rotation)
getPivotTransform(ITransformable, double, double, double)
public static final AffineTransform getPivotTransform(ITransformable peer, double x, double y, double rotation)
AffineTransform
for the specified coordinates on the peer.
peer
- The peer for whom to get the transformation.x
- The X-coordinate relative to that of the ship.y
- The Y-coordinate relative to that of the ship.rotation
- The amount the pivot has to rotate around its own axis.
AffineTransform
for the specified point.public static final AffineTransform getPivotTransform(double heading, double x1, double y1, double x2, double y2, double rotation)
AffineTransform
for the
given values.
heading
- The heading of the robot.x1
- The X-coordinate of the robot.y1
- The Y-coordinate of the robot.x2
- The relative X-coordinate of the component.y2
- The relative Y-coordinate of the component.rotation
- The angle of the component.
AffineTranform
representing the given values.public static final AffineTransform getAffineTransformShip(ITransformablePeer peer)
AffineTransform
for the ShipPeer.
peer
- The peer of whom the get the AffineTransform
.
AffineTransform
for the given Ship.public static final AffineTransform getAffineTransform(double heading, double x, double y)
AffineTransform
from the given values.
heading
- The heading of the robot.x
- The X-coordinate of the robot.y
- The Y-coordinate of the robot.
AffineTransform
matching the given values.public static double getParallax(ITransformable peer, IComponent component, double x, double y)
peer
- The robot to whom the component belongs to.component
- The component from whom to measure the parallax to the given coordinates.projectile
- The coordinates from whom to find the parallax.
component
and the other
; in radians.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |