Package com.openinventor.inventor
Class SbVec4us
- java.lang.Object
-
- com.openinventor.inventor.SbBasic
-
- com.openinventor.inventor.SbVec4us
-
public class SbVec4us extends SbBasic
4D vector class. 4D vector class used to store 4D 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(SbVec4us 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(SbVec4us v)
Returns dot (inner) product of vector and another vector.boolean
equals(java.lang.Object obj)
short[]
getValue()
short
getValueAt(int index)
short
getW()
short
getX()
short
getY()
short
getZ()
SbVec4us
minus(SbVec4us 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.SbVec4us
over(double d)
Component-wise binary scalar division operator.SbVec4us
over(int d)
Component-wise binary scalar division operator.SbVec4us
plus(SbVec4us v2)
Component-wise binary vector addition operator.SbVec4us
setValue(short[] components)
SbVec4us
setValue(short[] components, int startIndex)
SbVec4us
setValue(short c0, short c1, short c2, short c3)
void
setValue(SbVec4us copyFrom)
void
setValueAt(int index, short value)
void
setW(short value)
void
setX(short value)
void
setY(short value)
void
setZ(short value)
void
substract(SbVec4us u)
Component-wise vector subtraction operator.SbVec4us
times(double d)
Component-wise binary scalar multiplication operator.SbVec4us
times(int d)
Component-wise binary scalar multiplication operator.static SbVec4us[]
toArray(long nativeArray, long length)
-
-
-
Constructor Detail
-
SbVec4us
public SbVec4us()
-
SbVec4us
public SbVec4us(short c0, short c1, short c2, short c3)
-
SbVec4us
public SbVec4us(SbVec4us copyFrom)
-
SbVec4us
public SbVec4us(short[] components)
-
-
Method Detail
-
setX
public void setX(short value)
-
setValue
public SbVec4us setValue(short c0, short c1, short c2, short c3)
-
setZ
public void setZ(short value)
-
setY
public void setY(short value)
-
setValue
public SbVec4us setValue(short[] components, int startIndex)
-
setValue
public void setValue(SbVec4us copyFrom)
-
getValue
public short[] getValue()
-
setValueAt
public void setValueAt(int index, short value)
-
setValue
public SbVec4us setValue(short[] components)
-
getValueAt
public short getValueAt(int index)
-
getW
public short getW()
-
getZ
public short getZ()
-
setW
public void setW(short value)
-
getX
public short getX()
-
getY
public short getY()
-
over
public SbVec4us over(double d)
Component-wise binary scalar division operator.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toArray
public static SbVec4us[] 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(SbVec4us v)
Returns dot (inner) product of vector and another vector.
-
times
public SbVec4us times(int d)
Component-wise binary scalar multiplication operator.
-
over
public SbVec4us over(int d)
Component-wise binary scalar division operator.
-
times
public SbVec4us times(double d)
Component-wise binary scalar multiplication operator.
-
substract
public void substract(SbVec4us 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(SbVec4us u)
Component-wise vector addition operator.
-
divide
public void divide(double d)
Component-wise scalar division operator.
-
-