Fork me
BeyondAR
Augmented Reality Framework for Android
 All Classes Functions Variables
com.beyondar.android.util.math.MathUtils Class Reference

Util class for math operations. More...

Static Public Member Functions

static void calcAngleFaceToCamera (Point3 p1, Point3 p2, Point3 out)
 
static float metersToGlUnits (float meters)
 Convert the meter units to the equivalent distance in the GL world. More...
 
static float GLUnitsToMeters (float glUnits)
 
static void linearInterpolate (float x_start, float y_start, float z_start, float x_end, float y_end, float z_end, float newDistance, float totalDistanceToMove, Point3 dstPoint)
 Calculate the point between two points according to a given distance. More...
 
static void linearInterpolate (double x_start, double y_start, double z_start, double x_end, double y_end, double z_end, double newDistance, double totalDistanceToMove, double[] dstPoint)
 Calculate the point between two points according to a given distance. More...
 
static boolean isPowerOfTwo (int n)
 Check a number if it is a power of two. More...
 

Detailed Description

Util class for math operations.

Member Function Documentation

static boolean com.beyondar.android.util.math.MathUtils.isPowerOfTwo ( int  n)
static

Check a number if it is a power of two.

Parameters
nThe number to check
Returns

Here is the caller graph for this function:

static void com.beyondar.android.util.math.MathUtils.linearInterpolate ( float  x_start,
float  y_start,
float  z_start,
float  x_end,
float  y_end,
float  z_end,
float  newDistance,
float  totalDistanceToMove,
Point3  dstPoint 
)
static

Calculate the point between two points according to a given distance.


Source: http://tech-algorithm.com/articles/linear-interpolation/

Parameters
x_start
y_start
z_start
x_end
y_end
z_end
newDistance
totalDistanceToMove
dstPoint
static void com.beyondar.android.util.math.MathUtils.linearInterpolate ( double  x_start,
double  y_start,
double  z_start,
double  x_end,
double  y_end,
double  z_end,
double  newDistance,
double  totalDistanceToMove,
double[]  dstPoint 
)
static

Calculate the point between two points according to a given distance.


Source: http://tech-algorithm.com/articles/linear-interpolation/

Parameters
x_start
y_start
z_start
x_end
y_end
z_end
newDistance
totalDistanceToMove
dstPointArray that will store the result of the calculus. [x, y, z]
static float com.beyondar.android.util.math.MathUtils.metersToGlUnits ( float  meters)
static

Convert the meter units to the equivalent distance in the GL world.

Parameters
meters
Returns

The documentation for this class was generated from the following file: