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.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final byte[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    SbVec4b(byte[] components)
     
    SbVec4b(byte c0, byte c1, byte c2, byte c3)
     
    SbVec4b(SbVec4b copyFrom)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Component-wise vector addition operator.
    void
    divide(double d)
    Component-wise scalar division operator.
    void
    divide(int d)
    Component-wise scalar division operator.
    int
    Returns dot (inner) product of vector and another vector.
    boolean
     
    Returns vector components.
    byte[]
     
    byte
    getValueAt(int index)
     
    byte
     
    byte
     
    byte
     
    byte
     
    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
    Negates each component of vector in place.
    over(double d)
    Component-wise binary scalar division operator.
    over(int d)
    Component-wise binary scalar division operator.
    Component-wise binary vector addition operator.
    setValue(byte[] components)
     
    setValue(byte[] components, int startIndex)
     
    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
    Component-wise vector subtraction operator.
    times(double d)
    Component-wise binary scalar multiplication operator.
    times(int d)
    Component-wise binary scalar multiplication operator.
    static SbVec4b[]
    toArray(long nativeArray, long length)
     

    Methods inherited from class java.lang.Object

    getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • array

      public final byte[] array
  • Constructor Details

    • 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 Details

    • 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.
    • minus

      public SbVec4b minus(SbVec4b v2)
      Component-wise binary vector subtraction operator.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • plus

      public SbVec4b plus(SbVec4b v2)
      Component-wise binary vector addition operator.
    • negate

      public void negate()
      Negates each component of vector in place.
    • getString

      public 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.