IOrientation
public 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)
IOrientation
E
in interface IOrientation
o
- the new orientationpublic Vector getDirection()
getDirection
in interface IOrientation
public void setDirection(Vector newDirection)
IOrientation
setDirection
in interface IOrientation
newDirection
- the new direction for this orientationpublic void randomRotation(IRandom random, double theta)
randomRotation
in interface IOrientation
random
- used to generate random value to set orientationtheta
- is ignored