IOrientationpublic class Orientation1D extends java.lang.Object implements IOrientation
| Constructor | Description |
|---|---|
Orientation1D() |
Construct with default orientation of +1.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
E(IOrientation o) |
Copies the given orientation to this one.
|
Vector |
getDirection() |
|
void |
randomRotation(IRandom random,
double theta) |
Sets orientation randomly to be +1 or -1.
|
void |
setDirection(Vector newDirection) |
Sets this orientation to point in the given direction.
|
public void E(IOrientation o)
IOrientationE in interface IOrientationo - the new orientationpublic Vector getDirection()
getDirection in interface IOrientationpublic void setDirection(Vector newDirection)
IOrientationsetDirection in interface IOrientationnewDirection - the new direction for this orientationpublic void randomRotation(IRandom random, double theta)
randomRotation in interface IOrientationrandom - used to generate random value to set orientationtheta - is ignored