|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base3d.worldview.object.Rotation
public class Rotation
Rotation within the world. Rotation is represented as yaw, roll and pitch. FIXME[js]: Add working methods and consider imports from Tuple3d.
| Nested Class Summary | |
|---|---|
static class |
Rotation.Order
Used for conversions in from Location into Rotation and vice versa |
static class |
Rotation.PropertyEditor
Property editor for Rotation. |
| Field Summary | |
|---|---|
static Rotation |
NONE
Rotation representing NONE. |
double |
pitch
Rotation pitch. |
double |
roll
Rotation roll. |
static Pattern |
rotationPattern
Pattern used to parse toString() in
Rotation(String). |
double |
yaw
Rotation yaw. |
static Rotation |
ZERO
Rotation(0,0,0); |
| Constructor Summary | |
|---|---|
Rotation(double pitch,
double yaw,
double roll)
Creates rotation with specified values. |
|
Rotation(Rotation rotation)
Copy constructor. |
|
Rotation(String string)
Parses the location from the "string" generated by toString(). |
|
| Method Summary | |
|---|---|
Rotation |
clone()
|
static javax.vecmath.Matrix3d |
constructXYRot(double angle)
Useful methods from Rotation->Location conversions. |
static javax.vecmath.Matrix3d |
constructXZRot(double angle)
Useful methods from Rotation->Location conversions. |
static javax.vecmath.Matrix3d |
constructYZRot(double angle)
Useful methods from Rotation->Location conversions. |
static boolean |
equal(Rotation r1,
Rotation r2)
Tells, whether two given rotations equal. |
boolean |
equals(Object obj)
Tells, whether this objects equals to given rotation. |
static double |
ExpInterp(double a,
double b,
double alpha)
Exponentially interpolates between 2 doubles with alpha as strength. |
double |
getPitch()
Rotation pitch. |
javax.vecmath.Point3d |
getPoint3d()
Retreives javax.vecmath.Point3d representation of the rotation. |
double |
getRoll()
Rotation roll. |
Rotation |
getRotation()
Retreives the rotation itself to implement IRotable. |
double |
getYaw()
Rotation yaw. |
int |
hashCode()
Generates a hashcode for this Rotation. |
static double |
LinearInterp(double a,
double b,
double alpha)
Linearly interpolates between 2 doubles with alpha as strength. |
static double |
LogInterp(double a,
double b,
double alpha)
Logarithmically interpolates between 2 doubles with alpha as strength. |
Rotation |
RotationExpInterp(Rotation b,
double alpha)
Exponentially interpolates between 2 rotations with alpha as strength. |
static Rotation |
RotationExpInterp(Rotation a,
Rotation b,
double alpha)
Exponentially interpolates between 2 rotations with alpha as strength. |
Rotation |
RotationLinearInterp(Rotation b,
double alpha)
Linearly interpolates between 2 rotations with alpha as strength. |
static Rotation |
RotationLinearInterp(Rotation a,
Rotation b,
double alpha)
Linearly interpolates between 2 rotations with alpha as strength. |
Rotation |
RotationLogInterp(Rotation b,
double alpha)
Logarithmically interpolates between 2 rotations with alpha as strength. |
static Rotation |
RotationLogInterp(Rotation a,
Rotation b,
double alpha)
Logarithmically interpolates between 2 rotations with alpha as strength. |
Rotation |
setPitch(double pitch)
Sets the pitch. |
Rotation |
setRoll(double roll)
Sets the roll. |
Rotation |
setYaw(double yaw)
Sets the yaw. |
Location |
toLocation()
Converts this Rotation into Location. |
Location |
toLocation(Rotation.Order order)
Converts this Rotation into Location. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Rotation NONE
public static final Rotation ZERO
public final double yaw
public final double roll
public final double pitch
public static final Pattern rotationPattern
toString() in
Rotation(String).
| Constructor Detail |
|---|
public Rotation(double pitch,
double yaw,
double roll)
yaw - Rotation yaw. Yaw is rotation to the left or right.roll - Rotation roll. Roll is twist of head. E.g. Tilt the head to
shoulder.pitch - Rotation pitch. Pitch is rotation up and down.public Rotation(Rotation rotation)
rotation - Rotation.public Rotation(String string)
toString(). If it fails, it throws RuntimeException.
string - | Method Detail |
|---|
public Rotation clone()
clone in class Objectpublic double getYaw()
public double getPitch()
public double getRoll()
public Rotation getRotation()
IRotable.
getRotation in interface IRotablepublic javax.vecmath.Point3d getPoint3d()
public static final double LinearInterp(double a,
double b,
double alpha)
a - startb - targetalpha - strength
public static final double LogInterp(double a,
double b,
double alpha)
a - startb - targetalpha - strength
public static final double ExpInterp(double a,
double b,
double alpha)
a - startb - targetalpha - strength
public static final Rotation RotationLinearInterp(Rotation a,
Rotation b,
double alpha)
a - startb - targetalpha - strength
public final Rotation RotationLinearInterp(Rotation b,
double alpha)
a - startb - targetalpha - strength
public static final Rotation RotationLogInterp(Rotation a,
Rotation b,
double alpha)
a - startb - targetalpha - strength
public final Rotation RotationLogInterp(Rotation b,
double alpha)
a - startb - targetalpha - strength
public static final Rotation RotationExpInterp(Rotation a,
Rotation b,
double alpha)
a - startb - targetalpha - strength
public final Rotation RotationExpInterp(Rotation b,
double alpha)
a - startb - targetalpha - strength
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectobj - Object to be compared with.
public static boolean equal(Rotation r1,
Rotation r2)
r1 - First rotation to comapre.r2 - Second rotation to comapre.
public String toString()
toString in class Objectpublic Location toLocation()
public Location toLocation(Rotation.Order order)
order - order of rotations should the method use
public static javax.vecmath.Matrix3d constructYZRot(double angle)
angle -
public static javax.vecmath.Matrix3d constructXZRot(double angle)
angle -
public static javax.vecmath.Matrix3d constructXYRot(double angle)
angle -
public Rotation setYaw(double yaw)
public Rotation setPitch(double pitch)
public Rotation setRoll(double roll)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||