MaxstAR Native Android
Public Member Functions | Protected Attributes | List of all members
com.maxst.ar.Vector4f Class Reference
Inheritance diagram for com.maxst.ar.Vector4f:
com.maxst.ar.Quaternion

Public Member Functions

 Vector4f (float x, float y, float z, float w)
 
 Vector4f ()
 
 Vector4f (Vector3f vector3f, float w)
 
float[] array ()
 
void copyVec4 (Vector4f vec)
 
void add (Vector4f vector)
 
void add (Vector3f vector, float w)
 
void subtract (Vector4f vector)
 
void subtract (Vector4f vector, Vector4f output)
 
void subdivide (Vector4f vector)
 
void multiplyByScalar (float scalar)
 
float dotProduct (Vector4f input)
 
void lerp (Vector4f input, Vector4f output, float t)
 
void normalize ()
 
float getX ()
 
float getY ()
 
float getZ ()
 
float getW ()
 
void setX (float x)
 
void setY (float y)
 
void setZ (float z)
 
void setW (float w)
 
float x ()
 
float y ()
 
float z ()
 
float w ()
 
void x (float x)
 
void y (float y)
 
void z (float z)
 
void w (float w)
 
void setXYZW (float x, float y, float z, float w)
 
boolean compareTo (Vector4f rhs)
 
void copyFromV3f (Vector3f input, float w)
 
String toString ()
 

Protected Attributes

float points [] = { 0, 0, 0, 0 }
 

Detailed Description

Representation of a four-dimensional float-vector

Constructor & Destructor Documentation

◆ Vector4f() [1/2]

com.maxst.ar.Vector4f.Vector4f ( float  x,
float  y,
float  z,
float  w 
)

Instantiates a new vector4f.

Parameters
xthe x
ythe y
zthe z
wthe w

◆ Vector4f() [2/2]

com.maxst.ar.Vector4f.Vector4f ( )

Instantiates a new vector4f.

Member Function Documentation

◆ add()

void com.maxst.ar.Vector4f.add ( Vector4f  vector)

Adds the.

Parameters
vectorthe vector

◆ array()

float [] com.maxst.ar.Vector4f.array ( )

To array.

Returns
the float[]

◆ compareTo()

boolean com.maxst.ar.Vector4f.compareTo ( Vector4f  rhs)

Compare this vector4f to the supplied one

Parameters
rhsTrue if they match, false other wise.
Returns

◆ copyFromV3f()

void com.maxst.ar.Vector4f.copyFromV3f ( Vector3f  input,
float  w 
)

Copies the data from the supplied vec3 into this vec4 plus the supplied w.

Parameters
inputThe x y z values to copy in.
wThe extra w element to copy in

◆ getW()

float com.maxst.ar.Vector4f.getW ( )

Gets the w.

Returns
the w

◆ getX()

float com.maxst.ar.Vector4f.getX ( )

Gets the x.

Returns
the x

◆ getY()

float com.maxst.ar.Vector4f.getY ( )

Gets the y.

Returns
the y

◆ getZ()

float com.maxst.ar.Vector4f.getZ ( )

Gets the z.

Returns
the z

◆ lerp()

void com.maxst.ar.Vector4f.lerp ( Vector4f  input,
Vector4f  output,
float  t 
)

Linear interpolation between two vectors storing the result in the output variable.

Parameters
input
output
t

◆ multiplyByScalar()

void com.maxst.ar.Vector4f.multiplyByScalar ( float  scalar)

Multiply by scalar.

Parameters
scalarthe scalar

Reimplemented in com.maxst.ar.Quaternion.

◆ normalize()

void com.maxst.ar.Vector4f.normalize ( )

Normalize.

Reimplemented in com.maxst.ar.Quaternion.

◆ setW()

void com.maxst.ar.Vector4f.setW ( float  w)

Sets the w.

Parameters
wthe new w

◆ setX()

void com.maxst.ar.Vector4f.setX ( float  x)

Sets the x.

Parameters
xthe new x

◆ setY()

void com.maxst.ar.Vector4f.setY ( float  y)

Sets the y.

Parameters
ythe new y

◆ setZ()

void com.maxst.ar.Vector4f.setZ ( float  z)

Sets the z.

Parameters
zthe new z

Member Data Documentation

◆ points

float com.maxst.ar.Vector4f.points[] = { 0, 0, 0, 0 }
protected

The points.


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