Constructor and Description |
---|
Rot() |
Rot(float a) |
Rot(Point center,
Point prev,
Point curr) |
Rot(Vec from,
Vec to) |
Modifier and Type | Method and Description |
---|---|
float |
angle() |
void |
compose(Rotation r)
Compose the rotation
|
static Rotation |
compose(Rotation r1,
Rotation r2) |
boolean |
equals(Object obj) |
void |
fromMatrix(Mat glMatrix)
Sets the rotation from the given Mat representation.
|
void |
fromRotatedBasis(Vec X,
Vec Y,
Vec Z)
Sets the rotation from the three rotated vectors of an orthogonal basis.
|
void |
fromTo(Vec from,
Vec to)
Define orientation from the two vectors.
|
Rot |
get()
Returns a deep copy of the object.
|
int |
hashCode() |
Rotation |
inverse()
Returns the inverse rotation
|
Mat |
inverseMatrix()
Returns the associated inverse rotation Mat.
|
Vec |
inverseRotate(Vec v)
Returns the image of
v by the Rotation.inverse() rotation. |
Mat |
matrix()
Returns the Mat which represents the rotation matrix associated with the Quat.
|
void |
negate()
Negates all object components
|
float |
normalize()
Normalizes the rotation
|
float |
normalize(boolean onlypos) |
void |
print()
Prints orientation data.
|
Vec |
rotate(Vec v)
Returns the image of
v by the rotation. |
public Rot get()
Copyable
Typical implementation should simple look like: return new Object(this)
.
public void negate()
Rotation
public Rotation inverse()
Rotation
public Vec rotate(Vec v)
Rotation
v
by the rotation.public Vec inverseRotate(Vec v)
Rotation
v
by the Rotation.inverse()
rotation.inverseRotate
in interface Rotation
public Mat matrix()
Rotation
public Mat inverseMatrix()
Rotation
Rotation.matrix()
of the
Rotation.inverse()
.inverseMatrix
in interface Rotation
public void fromMatrix(Mat glMatrix)
Rotation
fromMatrix
in interface Rotation
public void fromRotatedBasis(Vec X, Vec Y, Vec Z)
Rotation
The three vectors do not have to be normalized but must be orthogonal and direct
(i,e., X^Y=k*Z, with k>0
).
fromRotatedBasis
in interface Rotation
public final void compose(Rotation r)
Rotation
public float normalize(boolean onlypos)
public float normalize()
Rotation
public void fromTo(Vec from, Vec to)
Rotation
Processing Library proscene by Jean Pierre Charalambos. (c) 2014-2017 National University of Colombia