org.ode4j.math
Interface DVector3C

All Known Implementing Classes:
DVector3

public interface DVector3C

Constant (unmodifiable) interface for dVector3. This returns an unmodifiable view of an (most likely) modifiable object. WARNING: This is only unmodifiable for the user. The class that returned this object may continue to modify it, these changes will also reflect in the 'unmodifiable view' that the user has. If the user requires a lasting immutable object, then the object needs to be cloned. This interface should only be implemented by DVector3. This allows efficient optimisation by the JVM, which is not possible with 2 (still somewhat efficient) or more (slow) sub-classes.

Author:
Tilmann Zaeschke

Method Summary
 DVector3 clone()
           
 double distance(DVector3C a)
           
 double dot(DVector3C b)
           
 double dot(DVector3View b)
           
 double dotCol(DMatrix3C m, int col)
           
 double get(int i)
           
 double get0()
           
 double get1()
           
 double get2()
           
 double length()
           
 double lengthSquared()
           
 DVector3 reScale(double s)
           
 DVector3 reSub(DVector3C pos)
           
 float[] toFloatArray()
           
 float[] toFloatArray4()
           
 

Method Detail

get

double get(int i)
Parameters:
i - The row to return [0, 1, 2].

get0

double get0()

get1

double get1()

get2

double get2()

toFloatArray

float[] toFloatArray()

clone

DVector3 clone()

lengthSquared

double lengthSquared()

length

double length()

distance

double distance(DVector3C a)
Returns:
Distance between this vector and b).
See Also:
DVector3.distance(DVector3C)

dot

double dot(DVector3C b)
See Also:
DVector3.dot(DVector3C)

dot

double dot(DVector3View b)
See Also:
DVector3.dot(DVector3C)

reSub

DVector3 reSub(DVector3C pos)
See Also:
DVector3.reSub(DVector3C)

reScale

DVector3 reScale(double s)

toFloatArray4

float[] toFloatArray4()

dotCol

double dotCol(DMatrix3C m,
              int col)