Package com.openinventor.inventor
Class SbVec4b
- java.lang.Object
-
- com.openinventor.inventor.SbBasic
-
- com.openinventor.inventor.SbVec4b
-
public class SbVec4b 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 byte[]
array
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SbVec4b 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(SbVec4b v)
Returns dot (inner) product of vector and another vector.boolean
equals(java.lang.Object obj)
java.lang.String
getString()
Returns vector components.byte[]
getValue()
byte
getValueAt(int index)
byte
getW()
byte
getX()
byte
getY()
byte
getZ()
SbVec4b
minus(SbVec4b 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.SbVec4b
over(double d)
Component-wise binary scalar division operator.SbVec4b
over(int d)
Component-wise binary scalar division operator.SbVec4b
plus(SbVec4b v2)
Component-wise binary vector addition operator.SbVec4b
setValue(byte[] components)
SbVec4b
setValue(byte[] components, int startIndex)
SbVec4b
setValue(byte c0, byte c1, byte c2, byte c3)
void
setValue(SbVec4b copyFrom)
void
setValueAt(int index, byte value)
void
setW(byte value)
void
setX(byte value)
void
setY(byte value)
void
setZ(byte value)
void
substract(SbVec4b u)
Component-wise vector subtraction operator.SbVec4b
times(double d)
Component-wise binary scalar multiplication operator.SbVec4b
times(int d)
Component-wise binary scalar multiplication operator.static SbVec4b[]
toArray(long nativeArray, long length)
-
-
-
Constructor Detail
-
SbVec4b
public SbVec4b()
-
SbVec4b
public SbVec4b(byte[] components)
-
SbVec4b
public SbVec4b(SbVec4b copyFrom)
-
SbVec4b
public SbVec4b(byte c0, byte c1, byte c2, byte c3)
-
-
Method Detail
-
setValue
public SbVec4b setValue(byte[] components, int startIndex)
-
setValue
public SbVec4b setValue(byte c0, byte c1, byte c2, byte c3)
-
setX
public void setX(byte value)
-
setY
public void setY(byte value)
-
setValue
public void setValue(SbVec4b copyFrom)
-
getValueAt
public byte getValueAt(int index)
-
setValue
public SbVec4b setValue(byte[] components)
-
getValue
public byte[] getValue()
-
setValueAt
public void setValueAt(int index, byte value)
-
getZ
public byte getZ()
-
getY
public byte getY()
-
getX
public byte getX()
-
setZ
public void setZ(byte value)
-
getW
public byte getW()
-
setW
public void setW(byte value)
-
toArray
public static SbVec4b[] toArray(long nativeArray, long length)
-
over
public SbVec4b over(double d)
Component-wise binary scalar division operator.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
negate
public void negate()
Negates each component of vector in place.
-
getString
public java.lang.String getString()
Returns vector components.
-
dot
public int dot(SbVec4b v)
Returns dot (inner) product of vector and another vector.
-
times
public SbVec4b times(int d)
Component-wise binary scalar multiplication operator.
-
substract
public void substract(SbVec4b u)
Component-wise vector subtraction operator.
-
over
public SbVec4b over(int d)
Component-wise binary scalar division operator.
-
times
public SbVec4b times(double d)
Component-wise binary scalar multiplication operator.
-
add
public void add(SbVec4b u)
Component-wise vector addition operator.
-
multiply
public void multiply(double d)
Component-wise scalar multiplication operator.
-
multiply
public void multiply(int d)
Component-wise scalar multiplication operator.
-
divide
public void divide(double d)
Component-wise scalar division operator.
-
divide
public void divide(int d)
Component-wise scalar division operator.
-
-