Class Math3D
Helper class to expose certain 3D math functions
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class Math3D
Constructors
Math3D()
Declaration
public Math3D()
Fields
EPSILON
Minimum precision for floating point values.
Declaration
public static final float EPSILON
Field Value
| Type | Description |
|---|---|
| float |
Methods
degToRad(double degrees)
Converts Degrees to Radians with double precision accuracy
Declaration
public static double degToRad(double degrees)
Parameters
| Type | Name | Description |
|---|---|---|
| double | degrees |
Returns
| Type | Description |
|---|---|
| double |
degToRad(float degrees)
Converts Degrees to Radians with floating point accuracy.
Declaration
public static float degToRad(float degrees)
Parameters
| Type | Name | Description |
|---|---|---|
| float | degrees |
Returns
| Type | Description |
|---|---|
| float |
directionToPitchAndYaw(Vector3 direction, PointF pitchAndYaw)
Computation of Pitch and Yaw angles from forward vector
Declaration
public static void directionToPitchAndYaw(Vector3 direction, PointF pitchAndYaw)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | direction | The forward vector |
| android.graphics.PointF | pitchAndYaw | The point where pitch and yaw should be stored ( x - pitch values, y - yaw value ) |
pitchAndYawToDirection(float pitch, float yaw, Vector3 direction)
Computation of normalized direction vector from Pitch and Yaw
Declaration
public static void pitchAndYawToDirection(float pitch, float yaw, Vector3 direction)
Parameters
| Type | Name | Description |
|---|---|---|
| float | pitch | The pitch in Degrees |
| float | yaw | The yaw in Degrees |
| Vector3 | direction | The vector where computed direction should be stored |
radToDeg(double radians)
Converts Radians to Degrees with double precision accuracy.
Declaration
public static double radToDeg(double radians)
Parameters
| Type | Name | Description |
|---|---|---|
| double | radians |
Returns
| Type | Description |
|---|---|
| double |
radToDeg(float radians)
Converts Radians to Degrees with floating point accuracy.
Declaration
public static float radToDeg(float radians)
Parameters
| Type | Name | Description |
|---|---|---|
| float | radians |
Returns
| Type | Description |
|---|---|
| float |