com.metaio.sdk.jni
Class Vector4d

java.lang.Object
  extended by com.metaio.sdk.jni.Vector4d

public class Vector4d
extends Object

Structure that defines a 4D vector.


Constructor Summary
Vector4d()
           
Vector4d(float _x, float _y, float _z, float _w)
           
Vector4d(long cPtr, boolean cMemoryOwn)
           
Vector4d(Vector4d other)
           
 
Method Summary
 Vector4d add(Vector4d rhs)
           
 void delete()
           
 Vector4d divide(float rhs)
           
 float dot(Vector4d rhs)
          scalar product, inner product)
static long getCPtr(Vector4d obj)
           
 float getW()
          w component of the vector
 float getX()
          x component of the vector
 float getY()
          y component of the vector
 float getZ()
          z component of the vector
 boolean isNull()
          true if null vector, else false
 Vector4d multiply(float rhs)
           
 float norm()
          Result of the operation norm() == sqrt( squaredNorm())
 void setW(float value)
          w component of the vector
 void setX(float value)
          x component of the vector
 void setY(float value)
          y component of the vector
 void setZ(float value)
          z component of the vector
 void setZero()
          norm() == 0
 float squaredNorm()
          Result of the operation
 Vector4d subtract()
           
 Vector4d subtract(Vector4d rhs)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vector4d

public Vector4d(long cPtr,
                boolean cMemoryOwn)

Vector4d

public Vector4d()

Vector4d

public Vector4d(float _x,
                float _y,
                float _z,
                float _w)
Parameters:
_x - x component of the vector
_y - y component of the vector
_z - z component of the vector
_w - w component of the vector

Vector4d

public Vector4d(Vector4d other)
Method Detail

getCPtr

public static long getCPtr(Vector4d obj)

delete

public void delete()

setX

public void setX(float value)
x component of the vector


getX

public float getX()
x component of the vector


setY

public void setY(float value)
y component of the vector


getY

public float getY()
y component of the vector


setZ

public void setZ(float value)
z component of the vector


getZ

public float getZ()
z component of the vector


setW

public void setW(float value)
w component of the vector


getW

public float getW()
w component of the vector


setZero

public void setZero()
norm() == 0


subtract

public Vector4d subtract()

add

public Vector4d add(Vector4d rhs)

subtract

public Vector4d subtract(Vector4d rhs)

multiply

public Vector4d multiply(float rhs)

divide

public Vector4d divide(float rhs)

dot

public float dot(Vector4d rhs)
scalar product, inner product)

Parameters:
rhs - Right hand side of the operation Result of the operation

squaredNorm

public float squaredNorm()
Result of the operation


norm

public float norm()
Result of the operation norm() == sqrt( squaredNorm())


isNull

public boolean isNull()
true if null vector, else false


toString

public String toString()
Overrides:
toString in class Object