Class Vector3

java.lang.Object
com.raylib.Vector3

public class Vector3 extends Object
Vector3, 3 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.
    Vector3(float x, float y, float z)
    Construct with auto memory allocator and fields initialized as specified
    Vector3(MemorySegment memorySegment)
    Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    Construct with your owm memory allocator and fields not initialized
    Vector3(SegmentAllocator arena, float x, float y, float z)
    Construct with your own memory allocator and fields initialized as specified
  • Method Summary

    Modifier and Type
    Method
    Description
    static Vector3
    allocateArray(long elementCount)
    Allocate an array of Vector3
    static Vector3
    allocateArray(long elementCount, SegmentAllocator allocator)
    Allocate an array of Vector3
    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 x component
    float
    Vector y component
    float
    Vector z component
    int
     
    void
    setX(float value)
    Vector x component
    void
    setY(float value)
    Vector y component
    void
    setZ(float value)
    Vector z 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

    • Vector3

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

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

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

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

      public Vector3(SegmentAllocator arena, float x, float y, float z)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      x - Vector x component
      y - Vector y component
      z - Vector z 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 Vector3 getArrayElement(int index)
    • allocateArray

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

      public static Vector3 allocateArray(long elementCount)
      Allocate an array of Vector3
    • 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 Vector3 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 Vector3 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 Vector3 z(float value)
      Vector z component