Class Camera3D

java.lang.Object
com.raylib.Camera3D

public class Camera3D extends Object
Camera, defines position/orientation in 3d space
  • 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.
    Camera3D(Vector3 position, Vector3 target, Vector3 up, float fovy, int projection)
    Construct with auto memory allocator and fields initialized as specified
    Camera3D(MemorySegment memorySegment)
    Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    Construct with your owm memory allocator and fields not initialized
    Camera3D(SegmentAllocator arena, Vector3 position, Vector3 target, Vector3 up, float fovy, int projection)
    Construct with your own memory allocator and fields initialized as specified
  • Method Summary

    Modifier and Type
    Method
    Description
    static Camera3D
    allocateArray(long elementCount)
    Allocate an array of Camera3D
    static Camera3D
    allocateArray(long elementCount, SegmentAllocator allocator)
    Allocate an array of Camera3D
    boolean
    Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
    float
    Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
    fovy(float value)
    Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
    getArrayElement(int index)
     
    float
    Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
    Camera position
    int
    Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
    Camera target it looks-at
    Camera up vector (rotation over its axis)
    int
     
    Camera position
    Camera position
    int
    Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
    projection(int value)
    Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
    void
    setFovy(float value)
    Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
    void
    Camera position
    void
    setProjection(int value)
    Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
    void
    Camera target it looks-at
    void
    setUp(Vector3 value)
    Camera up vector (rotation over its axis)
    Camera target it looks-at
    target(Vector3 value)
    Camera target it looks-at
    up()
    Camera up vector (rotation over its axis)
    up(Vector3 value)
    Camera up vector (rotation over its axis)

    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

    • Camera3D

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

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

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

      public Camera3D(Vector3 position, Vector3 target, Vector3 up, float fovy, int projection)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      position - Camera position
      target - Camera target it looks-at
      up - Camera up vector (rotation over its axis)
      fovy - Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
      projection - Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
    • Camera3D

      public Camera3D(SegmentAllocator arena, Vector3 position, Vector3 target, Vector3 up, float fovy, int projection)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      position - Camera position
      target - Camera target it looks-at
      up - Camera up vector (rotation over its axis)
      fovy - Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
      projection - Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
  • 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 Camera3D getArrayElement(int index)
    • allocateArray

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

      public static Camera3D allocateArray(long elementCount)
      Allocate an array of Camera3D
    • getPosition

      public Vector3 getPosition()
      Camera position
    • setPosition

      public void setPosition(Vector3 value)
      Camera position
    • position

      public Vector3 position()
      Camera position
    • position

      public Camera3D position(Vector3 value)
      Camera position
    • getTarget

      public Vector3 getTarget()
      Camera target it looks-at
    • setTarget

      public void setTarget(Vector3 value)
      Camera target it looks-at
    • target

      public Vector3 target()
      Camera target it looks-at
    • target

      public Camera3D target(Vector3 value)
      Camera target it looks-at
    • getUp

      public Vector3 getUp()
      Camera up vector (rotation over its axis)
    • setUp

      public void setUp(Vector3 value)
      Camera up vector (rotation over its axis)
    • up

      public Vector3 up()
      Camera up vector (rotation over its axis)
    • up

      public Camera3D up(Vector3 value)
      Camera up vector (rotation over its axis)
    • getFovy

      public float getFovy()
      Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
    • setFovy

      public void setFovy(float value)
      Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
    • fovy

      public float fovy()
      Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
    • fovy

      public Camera3D fovy(float value)
      Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
    • getProjection

      public int getProjection()
      Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
    • setProjection

      public void setProjection(int value)
      Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
    • projection

      public int projection()
      Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
    • projection

      public Camera3D projection(int value)
      Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC