Package com.openinventor.inventor
Class SbVec3s
- java.lang.Object
-
- com.openinventor.inventor.SbBasic
-
- com.openinventor.inventor.SbVec3s
-
public class SbVec3s extends SbBasic
3D vector class. 3D vector class used to store 3D integer vectors and points. This class is used throughout Open Inventor for arguments and return values.
-
-
Field Summary
Fields Modifier and Type Field Description short[]
array
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SbVec3s u)
Component-wise vector addition operator.void
divide(double d)
Component-wise scalar division operator.void
divide(int d)
Component-wise scalar division operator.int
dot(SbVec3s v)
Returns dot (inner) product of vector and another vector.boolean
equals(java.lang.Object obj)
short[]
getValue()
short
getValueAt(int index)
short
getX()
short
getY()
short
getZ()
SbVec3s
minus(SbVec3s v2)
Component-wise binary vector subtraction operator.void
multiply(double d)
Component-wise scalar multiplication operator.void
multiply(int d)
Component-wise scalar multiplication operator.void
negate()
Negates each component of vector in place.SbVec3s
over(double d)
Component-wise binary scalar division operator.SbVec3s
over(int d)
Component-wise binary scalar division operator.SbVec3s
plus(SbVec3s v2)
Component-wise binary vector addition operator.SbVec3s
setValue(short[] components)
SbVec3s
setValue(short[] components, int startIndex)
SbVec3s
setValue(short c0, short c1, short c2)
void
setValue(SbVec3s copyFrom)
void
setValueAt(int index, short value)
void
setX(short value)
void
setY(short value)
void
setZ(short value)
void
substract(SbVec3s u)
Component-wise vector subtraction operator.SbVec3s
times(double d)
Component-wise binary scalar multiplication operator.SbVec3s
times(int d)
Component-wise binary scalar multiplication operator.static SbVec3s[]
toArray(long nativeArray, long length)
-
-
-
Method Detail
-
setValue
public SbVec3s setValue(short[] components, int startIndex)
-
setValueAt
public void setValueAt(int index, short value)
-
setX
public void setX(short value)
-
setZ
public void setZ(short value)
-
setY
public void setY(short value)
-
setValue
public SbVec3s setValue(short c0, short c1, short c2)
-
setValue
public void setValue(SbVec3s copyFrom)
-
getValue
public short[] getValue()
-
getValueAt
public short getValueAt(int index)
-
setValue
public SbVec3s setValue(short[] components)
-
getZ
public short getZ()
-
getX
public short getX()
-
getY
public short getY()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
over
public SbVec3s over(double d)
Component-wise binary scalar division operator.
-
toArray
public static SbVec3s[] toArray(long nativeArray, long length)
-
negate
public void negate()
Negates each component of vector in place.
-
multiply
public void multiply(int d)
Component-wise scalar multiplication operator.
-
dot
public int dot(SbVec3s v)
Returns dot (inner) product of vector and another vector.
-
times
public SbVec3s times(int d)
Component-wise binary scalar multiplication operator.
-
over
public SbVec3s over(int d)
Component-wise binary scalar division operator.
-
times
public SbVec3s times(double d)
Component-wise binary scalar multiplication operator.
-
substract
public void substract(SbVec3s u)
Component-wise vector subtraction operator.
-
divide
public void divide(int d)
Component-wise scalar division operator.
-
multiply
public void multiply(double d)
Component-wise scalar multiplication operator.
-
add
public void add(SbVec3s u)
Component-wise vector addition operator.
-
divide
public void divide(double d)
Component-wise scalar division operator.
-
-