com.metaio.sdk.jni
Class Vector3d

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

public class Vector3d
extends Object

Structure that defines a 3D vector.


Constructor Summary
Vector3d()
           
Vector3d(float _n)
           
Vector3d(float _x, float _y, float _z)
           
Vector3d(long cPtr, boolean cMemoryOwn)
           
Vector3d(Vector3d other)
           
 
Method Summary
 Vector3d add(Vector3d rhs)
           
 void delete()
           
 Vector3d divide(float rhs)
           
 float dot(Vector3d rhs)
          scalar product, inner product)
static long getCPtr(Vector3d obj)
           
 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
 Vector3d multiply(float rhs)
           
 float norm()
          Result of the operation norm() == sqrt( squaredNorm())
 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
 Vector3d subtract()
           
 Vector3d subtract(Vector3d rhs)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vector3d

public Vector3d(long cPtr,
                boolean cMemoryOwn)

Vector3d

public Vector3d()

Vector3d

public Vector3d(float _n)
Parameters:
_n - x, y and z components of the vector

Vector3d

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

Vector3d

public Vector3d(Vector3d other)
Method Detail

getCPtr

public static long getCPtr(Vector3d 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


setZero

public void setZero()
norm() == 0


subtract

public Vector3d subtract()

add

public Vector3d add(Vector3d rhs)

subtract

public Vector3d subtract(Vector3d rhs)

multiply

public Vector3d multiply(float rhs)

divide

public Vector3d divide(float rhs)

dot

public float dot(Vector3d 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