Class Vector4

java.lang.Object
com.raylib.Vector4

public class Vector4 extends Object
Vector4, 4 components
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct with auto memory allocator and fields initialized to zero.
    Vector4(float x, float y, float z, float w)
    Construct with auto memory allocator and fields initialized as specified
    Vector4(MemorySegment memorySegment)
    Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    Construct with your owm memory allocator and fields not initialized
    Vector4(SegmentAllocator arena, float x, float y, float z, float w)
    Construct with your own memory allocator and fields initialized as specified
  • Method Summary

    Modifier and Type
    Method
    Description
    static Vector4
    allocateArray(long elementCount)
    Allocate an array of Vector4
    static Vector4
    allocateArray(long elementCount, SegmentAllocator allocator)
    Allocate an array of Vector4
    boolean
    Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
    getArrayElement(int index)
     
    float
    Vector w component
    float
    Vector x component
    float
    Vector y component
    float
    Vector z component
    int
     
    void
    setW(float value)
    Vector w component
    void
    setX(float value)
    Vector x component
    void
    setY(float value)
    Vector y component
    void
    setZ(float value)
    Vector z component
    float
    w()
    Vector w component
    w(float value)
    Vector w component
    float
    x()
    Vector x component
    x(float value)
    Vector x component
    float
    y()
    Vector y component
    y(float value)
    Vector y component
    float
    z()
    Vector z component
    z(float value)
    Vector z component

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • memorySegment

      public final MemorySegment memorySegment
      The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Details

    • Vector4

      public Vector4()
      Construct with auto memory allocator and fields initialized to zero.
    • Vector4

      public Vector4(SegmentAllocator arena)
      Construct with your owm memory allocator and fields not initialized
    • Vector4

      public Vector4(MemorySegment memorySegment)
      Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    • Vector4

      public Vector4(float x, float y, float z, float w)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      x - Vector x component
      y - Vector y component
      z - Vector z component
      w - Vector w component
    • Vector4

      public Vector4(SegmentAllocator arena, float x, float y, float z, float w)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      x - Vector x component
      y - Vector y component
      z - Vector z component
      w - Vector w component
  • Method Details

    • equals

      public boolean equals(Object o)
      Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getArrayElement

      public Vector4 getArrayElement(int index)
    • allocateArray

      public static Vector4 allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of Vector4
    • allocateArray

      public static Vector4 allocateArray(long elementCount)
      Allocate an array of Vector4
    • getX

      public float getX()
      Vector x component
    • setX

      public void setX(float value)
      Vector x component
    • x

      public float x()
      Vector x component
    • x

      public Vector4 x(float value)
      Vector x component
    • getY

      public float getY()
      Vector y component
    • setY

      public void setY(float value)
      Vector y component
    • y

      public float y()
      Vector y component
    • y

      public Vector4 y(float value)
      Vector y component
    • getZ

      public float getZ()
      Vector z component
    • setZ

      public void setZ(float value)
      Vector z component
    • z

      public float z()
      Vector z component
    • z

      public Vector4 z(float value)
      Vector z component
    • getW

      public float getW()
      Vector w component
    • setW

      public void setW(float value)
      Vector w component
    • w

      public float w()
      Vector w component
    • w

      public Vector4 w(float value)
      Vector w component