|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uwcse.location.core.State
This class is and point estimate of an objet's location (translation and quaternion rotation) and its forward velocity in meters per seconds. A right-handed coordinate frame is assumed.
| Constructor Summary | |
State()
Constructs and initializes a State to the origin with no rotation. |
|
State(Point3d position)
Constructs and initializes a State with the given position and no rotation. |
|
State(Point3d position,
Quat4d quaternion)
Constructs and initializes a State with the given position and quaternion with 0 velocity. |
|
State(Point3d position,
Quat4d quaternion,
double velocity)
Constructs and initializes a State with the given position, quaternion, and velocity. |
|
State(Point3d position,
Vector3d eulerAngles)
Constructs and initializes a State with the given position and Euler angles with 0 velocity. |
|
State(State s)
Constructs and initializes a State from the given State object. |
|
| Method Summary | |
void |
addGaussianNoise(Random rand,
Vector3d posSD,
Vector3d rotSD)
Add gaussian white noise to this state where the current position is used as the mean. |
Object |
clone()
Overridden to perform a deep copy on the State. |
static State |
computeMean(Collection states)
Compute the mean State of the given collection of states. |
static State |
computeWeightedMean(Collection samples)
Compute the weighted mean State of the given collection of samples. |
static State |
computeWeightedSD(State mean,
Collection samples)
Compute the weighted standard deviation State of the given collection of samples. |
static double |
distanceBetween(State s1,
State s2)
Returns the linear distance between the position of the State sm1 and that of the sm2 State. |
boolean |
equals(Object o)
Test for semantic equality to another State. |
Vector3d |
getHeading()
Get the heading vector represented by this state given the "forward" vector of the object is the default unit vector along the x-axis. |
Point3d |
getPosition()
Get the position of this state. |
Quat4d |
getQuaternion()
Get the quaternion rotation of this State. |
double |
getVelocity()
Get the linear velocity of this State. |
void |
move(double distance)
Translate the position of this state the given distance along the current heading. |
void |
move(Vector3d motionVector)
Translate the position of this state according to the given vector's direction and magnitude. |
void |
rotate(Quat4d quaternion)
Rotate a state by the given quaterion. |
void |
rotate(Vector3d eulerAngles)
Rotate this state by the given Euler angles. |
void |
set(State s)
Set the this State using the given one. |
void |
setPosition(Point3d pos)
Set the position of this state. |
void |
setQuaternion(Quat4d quaternion)
Set the quaternion rotation of this State. |
void |
setQuaternionFromEuler(Vector3d eulerAngles)
Set the quaternion rotation of this State using the given Euler angles. |
void |
setRandom(Random rand,
Point3d min,
Point3d max)
Using the given source of randomness, set the position of this state according to a uniform distribution constrained by the upper and lower corners of the specified box and set the rotation randomly around all 3 axes. |
void |
setVelocity(double velocity)
Set the linear velocity of this State. |
String |
toString()
Overridden method to print the State in a human readable format. |
Point3d |
transform(Point3d p)
Return a new point that is the given point transformed using the translation and rotation parameters of this state. |
Vector3d |
transform(Vector3d v)
Return a new vector that is the given vector transformed using the translation and rotation parameters of this state. |
State |
transform(State s)
Return a new State that is the given argument State transformed using the translation and rotation parameters of this state. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public State()
public State(Point3d position)
public State(Point3d position,
Vector3d eulerAngles)
public State(Point3d position,
Quat4d quaternion)
public State(Point3d position,
Quat4d quaternion,
double velocity)
public State(State s)
| Method Detail |
public Object clone()
clone in class Objectpublic Point3d getPosition()
public void setPosition(Point3d pos)
public Quat4d getQuaternion()
public void setQuaternion(Quat4d quaternion)
public double getVelocity()
public void setVelocity(double velocity)
public void setQuaternionFromEuler(Vector3d eulerAngles)
public void set(State s)
public boolean equals(Object o)
equals in class Object
public void setRandom(Random rand,
Point3d min,
Point3d max)
rand - A source of randomness.min - Lower corner of the box in which to set the state randomly.max - Upper corner of the box in which to set the state randomly.public Vector3d getHeading()
public Point3d transform(Point3d p)
public Vector3d transform(Vector3d v)
public State transform(State s)
public void move(double distance)
public void move(Vector3d motionVector)
public void rotate(Vector3d eulerAngles)
public void rotate(Quat4d quaternion)
public void addGaussianNoise(Random rand,
Vector3d posSD,
Vector3d rotSD)
rand - a source of randomnessposSD - standard deviation of the positional noiserotSD - standard deviation in radians of the Euler angle rotational
noise
public static double distanceBetween(State s1,
State s2)
public static State computeMean(Collection states)
public static State computeWeightedMean(Collection samples)
public static State computeWeightedSD(State mean,
Collection samples)
public String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||