Accel3D Class Reference
The basic unit FROG works on. More...
Inherits java::io::Serializable.
Public Member Functions | |
Accel3D (double x, double y, double z) | |
Creates a new Accel3D containing the given axis values. | |
void | add (Accel3D other) |
Performs vector addition on this object using another Accel3D object. | |
double | distanceFrom (Accel3D other) |
Finds the distance between this Accel3D and another. | |
double | getMagnitude () |
Gets the vector magnitude of this Accel3D. | |
double | getX () |
Gets acceleration (in G's) of the X axis. | |
double | getY () |
Gets acceleration (in G's) of the Y axis. | |
double | getZ () |
Gets acceleration (in G's) of the Z axis. | |
void | rescale (double scaleFactor) |
Scales the X, Y, and Z values to a given scale value. | |
double[] | toArray () |
Returns the Accel3D converted to an array (double[3]). | |
String | toString () |
Returns a String representation of this object. |
Detailed Description
The basic unit FROG works on.
Accel3D objects contain a single sampling of a device's accelerometers. They also contain helpful methods to manipulate that data.
Constructor & Destructor Documentation
Accel3D | ( | double | x, | |
double | y, | |||
double | z | |||
) |
Creates a new Accel3D containing the given axis values.
- Parameters:
-
x the acceleration in the x-direction (in G's) y the acceleration in the y-direction (in G's) z the acceleration in the z-direction (in G's)
Member Function Documentation
void add | ( | Accel3D | other | ) |
double distanceFrom | ( | Accel3D | other | ) |
double getMagnitude | ( | ) |
Gets the vector magnitude of this Accel3D.
- Returns:
- the magnitude of the acceleration vector
Here is the caller graph for this function:
double getX | ( | ) |
Gets acceleration (in G's) of the X axis.
- Returns:
- the acceleration in the x-direction
Here is the caller graph for this function:
double getY | ( | ) |
Gets acceleration (in G's) of the Y axis.
- Returns:
- the acceleration in the y-direction
Here is the caller graph for this function:
double getZ | ( | ) |
Gets acceleration (in G's) of the Z axis.
- Returns:
- the acceleration in the z-direction
Here is the caller graph for this function:
void rescale | ( | double | scaleFactor | ) |
Scales the X, Y, and Z values to a given scale value.
- Parameters:
-
scaleFactor amount to scale by; if 1.0, this vector remains unchanged
double [] toArray | ( | ) |
String toString | ( | ) |
Returns a String representation of this object.
- Returns:
- this Accel3D in the form of "(x, y, z)"
Here is the caller graph for this function:
The documentation for this class was generated from the following file:
- /Users/dev/Documents/SVN brazos.cs.tcu.edu/trunk/FROG/src/frog/Accel3D.java