public class RectangleRotate_F64 extends Object
A rectangle which can be rotated. Angle of rotation is relative to +x axis, which is along the rectangle's width. +y is along its height. Point of rotation is the rectangle's center.
Conversion from rectangle to parent frame:
x' = x*cos(theta) - y*sin(theta) + cx;
y' = x*sin(theta) + y*cos(theta) + cy;
where (x,y) are points in the rectangle's frame.
| Modifier and Type | Field and Description |
|---|---|
double |
cx
Center point of rectangle
|
double |
cy
Center point of rectangle
|
double |
height
height of rectangle
|
double |
theta
Angle of rotation about rectangle's center
|
double |
width
Width of rectangle
|
| Constructor and Description |
|---|
RectangleRotate_F64() |
RectangleRotate_F64(double cx,
double cy,
double width,
double height,
double theta) |
public double cx
public double cy
public double width
public double height
public double theta
public RectangleRotate_F64(double cx,
double cy,
double width,
double height,
double theta)
public RectangleRotate_F64()
public void set(RectangleRotate_F64 r)
Copyright © 2013. All Rights Reserved.