Class SbVec4ub

java.lang.Object
com.openinventor.inventor.SbBasic
com.openinventor.inventor.SbVec4ub

public class SbVec4ub 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 Details

    • array

      public final byte[] array
  • Constructor Details

    • SbVec4ub

      public SbVec4ub(byte[] components)
    • SbVec4ub

      public SbVec4ub(SbVec4ub copyFrom)
    • SbVec4ub

      public SbVec4ub(byte c0, byte c1, byte c2, byte c3)
    • SbVec4ub

      public SbVec4ub()
  • Method Details

    • setValue

      public SbVec4ub 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(SbVec4ub copyFrom)
    • setValueAt

      public void setValueAt(int index, byte value)
    • getValue

      public byte[] getValue()
    • setValue

      public SbVec4ub setValue(byte[] components)
    • getValueAt

      public byte getValueAt(int index)
    • setValue

      public SbVec4ub setValue(byte[] components, int startIndex)
    • setZ

      public void setZ(byte value)
    • getX

      public byte getX()
    • getY

      public byte getY()
    • getZ

      public byte getZ()
    • getW

      public byte getW()
    • setW

      public void setW(byte value)
    • plus

      public SbVec4ub plus(SbVec4ub v2)
      Component-wise binary vector addition operator.
    • clamp

      public void clamp(byte a, byte b)
      Clamp each component between a and b.
    • toArray

      public static SbVec4ub[] toArray(long nativeArray, long length)
    • minus

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

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

      public void multiply(int d)
      Component-wise scalar multiplication operator.
    • negate

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

      public int dot(SbVec4ub v)
      Returns dot (inner) product of vector and another vector.
    • multiply

      public void multiply(double d)
      Component-wise scalar multiplication operator.
    • over

      public SbVec4ub over(double d)
      Component-wise binary scalar division operator.
    • over

      public SbVec4ub over(int d)
      Component-wise binary scalar division operator.
    • times

      public SbVec4ub times(double d)
      Component-wise binary scalar multiplication operator.
    • times

      public SbVec4ub times(int d)
      Component-wise binary scalar multiplication operator.
    • substract

      public void substract(SbVec4ub u)
      Component-wise vector subtraction operator.
    • add

      public void add(SbVec4ub u)
      Component-wise vector addition operator.
    • divide

      public void divide(double d)
      Component-wise scalar division operator.
    • divide

      public void divide(int d)
      Component-wise scalar division operator.