public class Math3D
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static float |
EPSILON
Minimum precision for floating point values.
|
Constructor and Description |
---|
Math3D() |
Modifier and Type | Method and Description |
---|---|
static double |
degToRad(double degrees)
Converts Degrees to Radians with double precision accuracy
|
static float |
degToRad(float degrees)
Converts Degrees to Radians with floating point accuracy.
|
static void |
directionToPitchAndYaw(Vector3 direction,
android.graphics.PointF pitchAndYaw)
Computation of Pitch and Yaw angles from forward vector
|
static void |
pitchAndYawToDirection(float pitch,
float yaw,
Vector3 direction)
Computation of normalized direction vector from Pitch and Yaw
|
static double |
radToDeg(double radians)
Converts Radians to Degrees with double precision accuracy.
|
static float |
radToDeg(float radians)
Converts Radians to Degrees with floating point accuracy.
|
public static final float EPSILON
public static float degToRad(float degrees)
public static float radToDeg(float radians)
public static double degToRad(double degrees)
public static double radToDeg(double radians)
public static void directionToPitchAndYaw(Vector3 direction, android.graphics.PointF pitchAndYaw)
direction
- The forward vectorpitchAndYaw
- The point where pitch and yaw should be stored ( x - pitch values, y - yaw value )public static void pitchAndYawToDirection(float pitch, float yaw, Vector3 direction)
pitch
- The pitch in Degreesyaw
- The yaw in Degreesdirection
- The vector where computed direction should be stored