public class RotationComponent extends DoubleComponent implements CopyableComponent<RotationComponent>
| Type | Property and Description |
|---|---|
javafx.beans.property.DoubleProperty |
angle |
valueProperty| Constructor and Description |
|---|
RotationComponent()
Constructs rotation with angle = 0.
|
RotationComponent(double angle)
Constructs rotation with given angle.
|
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.DoubleProperty |
angleProperty() |
RotationComponent |
copy()
Copies this component.
|
void |
rotateBy(double byAngle)
Rotate entity view by given angle.
|
void |
rotateToVector(javafx.geometry.Point2D vector)
Set absolute rotation of the entity view to angle
between vector and positive X axis.
|
String |
toString() |
getValue, read, setValue, valueProperty, writepublic RotationComponent()
public RotationComponent(double angle)
angle - the anglepublic final void rotateBy(double byAngle)
PhysicsComponent.byAngle - rotation angle in degreespublic final void rotateToVector(javafx.geometry.Point2D vector)
vector - the rotation vector / velocity vectorpublic final javafx.beans.property.DoubleProperty angleProperty()
public String toString()
toString in class DoubleComponentpublic RotationComponent copy()
CopyableComponentObject.clone().
The 'depth' of the copy should be determined by the user.copy in interface CopyableComponent<RotationComponent>Copyright © 2018. All rights reserved.