|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.ihmc.utilities.math.geometry.FrameVector2d
public class FrameVector2d
One of the main goals of this class is to check, at runtime, that operations on vectors occur within the same Frame. This method checks for one Vector argument.
Constructor Summary | |
---|---|
FrameVector2d(FramePoint2d framePoint)
FrameVector Turns a FramePoint into a FrameVector. |
|
FrameVector2d(FramePoint2d startFramePoint,
FramePoint2d endFramePoint)
FrameVector2d Creates a new FrameVector as the difference between two FramePoints. |
|
FrameVector2d(FrameVector2d frameVector)
FrameVector A normal vector associated with a specific reference frame |
|
FrameVector2d(ReferenceFrame referenceFrame)
FrameVector A normal vector associated with a specific reference frame |
|
FrameVector2d(ReferenceFrame referenceFrame,
double[] vector)
|
|
FrameVector2d(ReferenceFrame referenceFrame,
double x,
double y)
FrameVector A normal vector associated with a specific reference frame. |
|
FrameVector2d(ReferenceFrame referenceFrame,
javax.vecmath.Tuple2d tuple)
FrameVector2d A normal vector associated with a specific reference frame |
Method Summary | |
---|---|
void |
add(FramePoint2d framePoint)
|
void |
add(FrameVector2d frameVector)
|
void |
add(FrameVector2d vector1,
FrameVector2d vector2)
|
double |
angle(FrameVector2d frameVector)
|
void |
applyTransform(javax.media.j3d.Transform3D transform)
|
FrameVector2d |
applyTransformCopy(javax.media.j3d.Transform3D transform3D)
|
void |
changeFrame(ReferenceFrame desiredFrame)
Changes frame of this FrameVector2d to the given ReferenceFrame. |
FrameVector2d |
changeFrameCopy(ReferenceFrame desiredFrame)
Changes frame of this FrameVector to the given ReferenceFrame and returns a copy. |
void |
checkForNaN()
|
void |
checkReferenceFrameMatch(ReferenceFrame frame)
|
void |
checkReferenceFrameMatch(ReferenceFrameHolder referenceFrameHolder)
Makes sure that the FrameVector argument has the same Frame as the current FrameVector. |
boolean |
containsNaN()
|
double |
cross(FrameVector2d frameVector)
|
double |
dot(FrameVector2d frameVector)
|
boolean |
epsilonEquals(FramePoint2d framePoint,
double threshold)
|
boolean |
epsilonEquals(FrameVector2d frameVector,
double threshold)
|
static FrameVector2d |
generateRandomFrameVector2d(java.util.Random random,
ReferenceFrame zUpFrame)
|
ReferenceFrame |
getReferenceFrame()
Returns this FrameVectors ReferenceFrame. |
javax.vecmath.Vector2d |
getVector()
Returns the vector inside this FrameVector. |
void |
getVector(javax.vecmath.Vector2d vectorToPack)
|
javax.vecmath.Vector2d |
getVectorCopy()
Returns a deep copy of the vector inside this FrameVector. |
double |
getX()
|
double |
getY()
|
double |
length()
|
double |
lengthSquared()
|
void |
negate()
|
void |
normalize()
|
void |
printOutFrameVector(java.lang.String variableName)
|
void |
rotate90()
|
void |
scale(double scaleFactor)
|
void |
scale(double scaleFactor,
FramePoint2d point1)
Sets the value of this tuple to the scalar multiplication of vertor1 (this = s * t1). |
void |
scale(double scaleFactor,
FrameVector2d vector1)
Sets the value of this tuple to the scalar multiplication of vertor1 (this = s * t1). |
void |
scaleAdd(double scaleFactor,
FramePoint2d point1)
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1). |
void |
scaleAdd(double scaleFactor,
FramePoint2d point1,
FramePoint2d point2)
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*v1 + t2). |
void |
scaleAdd(double scaleFactor,
FramePoint2d point1,
FrameVector2d vector2)
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*v1 + t2). |
void |
scaleAdd(double scaleFactor,
FrameVector2d vector1)
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1). |
void |
scaleAdd(double scaleFactor,
FrameVector2d vector1,
FramePoint2d point2)
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*v1 + t2). |
void |
scaleAdd(double scaleFactor,
FrameVector2d vector1,
FrameVector2d vector2)
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*v1 + t2) |
void |
set(double x,
double y)
|
void |
set(FramePoint2d framePoint)
|
void |
set(FrameVector2d frameVector)
|
void |
set(ReferenceFrame referenceFrame,
double x,
double y)
|
void |
set(javax.vecmath.Vector2d vector)
|
void |
setAndChangeFrame(FramePoint2d framePoint)
|
void |
setAndChangeFrame(FrameVector2d frameVector)
|
void |
setX(double x)
|
void |
setY(double y)
|
void |
sub(FramePoint2d framePoint)
|
void |
sub(FramePoint2d point1,
FramePoint2d point2)
|
void |
sub(FrameVector2d frameVector)
|
void |
sub(FrameVector2d vector1,
FrameVector2d vector2)
|
double[] |
toArray()
|
static double[] |
toArray(FrameVector2d[] frameVectors)
|
java.lang.String |
toString()
toString String representation of a FrameVector (x,y,z):reference frame name |
void |
weightedAverage(FrameVector2d vector1,
FrameVector2d vector2,
double weightedAverage)
Sets this vector to be the weighted average of the two input vectors. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FrameVector2d(ReferenceFrame referenceFrame, javax.vecmath.Tuple2d tuple)
referenceFrame
- Framevector
- Vector2dpublic FrameVector2d(ReferenceFrame referenceFrame, double[] vector)
public FrameVector2d(ReferenceFrame referenceFrame)
referenceFrame
- Framepublic FrameVector2d(FrameVector2d frameVector)
referenceFrame
- Framevector
- Vector2dpublic FrameVector2d(FramePoint2d framePoint)
referenceFrame
- Framevector
- Vector2dpublic FrameVector2d(FramePoint2d startFramePoint, FramePoint2d endFramePoint)
startFramePoint
- FramePoint2dendFramePoint
- FramePoint2dpublic FrameVector2d(ReferenceFrame referenceFrame, double x, double y)
referenceFrame
- Framex
- doubley
- doubleMethod Detail |
---|
public ReferenceFrame getReferenceFrame()
getReferenceFrame
in interface ReferenceFrameHolder
public javax.vecmath.Vector2d getVector()
public void getVector(javax.vecmath.Vector2d vectorToPack)
public javax.vecmath.Vector2d getVectorCopy()
public FrameVector2d changeFrameCopy(ReferenceFrame desiredFrame)
changeFrameCopy
in interface ReferenceFrameHolder
desiredFrame
- ReferenceFrame to change the FrameVector into.
public void changeFrame(ReferenceFrame desiredFrame)
desiredFrame
- ReferenceFrame to change the FrameVector2d into.public void applyTransform(javax.media.j3d.Transform3D transform)
public FrameVector2d applyTransformCopy(javax.media.j3d.Transform3D transform3D)
public static double[] toArray(FrameVector2d[] frameVectors)
public void negate()
public double getX()
public double getY()
public void set(double x, double y)
public void set(javax.vecmath.Vector2d vector)
public void setX(double x)
public void setY(double y)
public void rotate90()
public void set(ReferenceFrame referenceFrame, double x, double y)
public void scale(double scaleFactor)
public double[] toArray()
public void scale(double scaleFactor, FrameVector2d vector1)
scaleFactor
- doublevector1
- FrameVectorpublic void scale(double scaleFactor, FramePoint2d point1)
scaleFactor
- doublepoint1
- FramePointpublic void scaleAdd(double scaleFactor, FrameVector2d vector1, FrameVector2d vector2)
scaleFactor
- doublevector1
- FrameVectorvector2
- FrameVectorpublic void scaleAdd(double scaleFactor, FrameVector2d vector1, FramePoint2d point2)
scaleFactor
- doublevector1
- FrameVectorpoint2
- FramePointpublic void scaleAdd(double scaleFactor, FramePoint2d point1, FrameVector2d vector2)
scaleFactor
- doublepoint1
- FramePointvector2
- FrameVectorpublic void scaleAdd(double scaleFactor, FramePoint2d point1, FramePoint2d point2)
scaleFactor
- doublepoint1
- FramePointpoint2
- FramePointpublic void scaleAdd(double scaleFactor, FrameVector2d vector1)
scaleFactor
- doublevector1
- FrameVectorpublic void scaleAdd(double scaleFactor, FramePoint2d point1)
scaleFactor
- doublepoint1
- FramePointpublic void checkReferenceFrameMatch(ReferenceFrameHolder referenceFrameHolder)
checkReferenceFrameMatch
in interface ReferenceFrameHolder
frameVector
- FrameVector
ReferenceFrameMismatchException
public void checkReferenceFrameMatch(ReferenceFrame frame) throws ReferenceFrameMismatchException
checkReferenceFrameMatch
in interface ReferenceFrameHolder
ReferenceFrameMismatchException
public void checkForNaN()
public boolean containsNaN()
public void add(FrameVector2d frameVector)
public void add(FramePoint2d framePoint)
public void add(FrameVector2d vector1, FrameVector2d vector2)
public void sub(FrameVector2d frameVector)
public void sub(FramePoint2d framePoint)
public void sub(FramePoint2d point1, FramePoint2d point2)
public void sub(FrameVector2d vector1, FrameVector2d vector2)
public double dot(FrameVector2d frameVector)
public double cross(FrameVector2d frameVector)
public double angle(FrameVector2d frameVector)
public void set(FrameVector2d frameVector)
public void set(FramePoint2d framePoint)
public void setAndChangeFrame(FrameVector2d frameVector)
public void setAndChangeFrame(FramePoint2d framePoint)
public void normalize()
public double length()
public double lengthSquared()
public void weightedAverage(FrameVector2d vector1, FrameVector2d vector2, double weightedAverage)
vector1
- FramePointvector2
- FramePointweightedAverage
- double
ReferenceFrameMismatchException
public java.lang.String toString()
toString
in class java.lang.Object
public void printOutFrameVector(java.lang.String variableName)
public boolean epsilonEquals(FramePoint2d framePoint, double threshold)
public boolean epsilonEquals(FrameVector2d frameVector, double threshold)
public static FrameVector2d generateRandomFrameVector2d(java.util.Random random, ReferenceFrame zUpFrame)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |