com.metaio.sdk.jni
Class Vector2d

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

public class Vector2d
extends Object

Structure that defines a 2D vector.


Constructor Summary
Vector2d()
           
Vector2d(float _n)
           
Vector2d(float _x, float _y)
           
Vector2d(long cPtr, boolean cMemoryOwn)
           
Vector2d(Vector2d other)
           
 
Method Summary
 Vector2d add(Vector2d rhs)
           
 Vector2d cwiseProduct(Vector2d rhs)
           
 Vector2d cwiseQuotient(Vector2d rhs)
           
 void delete()
           
 float dot(Vector2d rhs)
           
static long getCPtr(Vector2d obj)
           
 float getX()
          x component of the vector
 float getY()
          y component of the vector
 boolean isNull()
          true if null vector, else false
 Vector2d multiply(float rhs)
           
 float norm()
          Result of the operation
 void setX(float value)
          x component of the vector
 void setY(float value)
          y component of the vector
 float squaredNorm()
          Result of the operation
 Vector2d subtract(Vector2d rhs)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vector2d

public Vector2d(long cPtr,
                boolean cMemoryOwn)

Vector2d

public Vector2d()

Vector2d

public Vector2d(float _n)
Parameters:
_n - x and y components of the vector

Vector2d

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

Vector2d

public Vector2d(Vector2d other)
Method Detail

getCPtr

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


add

public Vector2d add(Vector2d rhs)

subtract

public Vector2d subtract(Vector2d rhs)

cwiseProduct

public Vector2d cwiseProduct(Vector2d rhs)
Parameters:
rhs - Right-hand-side of the operation Result of the operation

cwiseQuotient

public Vector2d cwiseQuotient(Vector2d rhs)
Parameters:
rhs - Right-hand-side of the operation Result of the operation

multiply

public Vector2d multiply(float rhs)

dot

public float dot(Vector2d rhs)
Parameters:
rhs - Right-hand-side of the operation Result of the operation

norm

public float norm()
Result of the operation


squaredNorm

public float squaredNorm()
Result of the operation


isNull

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


toString

public String toString()
Overrides:
toString in class Object