Class Camera2D
java.lang.Object
com.raylib.Camera2D
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionCamera2D()
Construct with auto memory allocator and fields initialized to zero.Construct with auto memory allocator and fields initialized as specifiedCamera2D
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectCamera2D
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedCamera2D
(SegmentAllocator arena, Vector2 offset, Vector2 target, float rotation, float zoom) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Camera2D
allocateArray
(long elementCount) Allocate an array of Camera2Dstatic Camera2D
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Camera2Dboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) Camera offset (displacement from target)float
Camera rotation in degreesCamera target (rotation and zoom origin)float
getZoom()
Camera zoom (scaling), should be 1.0f by defaultint
hashCode()
offset()
Camera offset (displacement from target)Camera offset (displacement from target)float
rotation()
Camera rotation in degreesrotation
(float value) Camera rotation in degreesvoid
Camera offset (displacement from target)void
setRotation
(float value) Camera rotation in degreesvoid
Camera target (rotation and zoom origin)void
setZoom
(float value) Camera zoom (scaling), should be 1.0f by defaulttarget()
Camera target (rotation and zoom origin)Camera target (rotation and zoom origin)float
zoom()
Camera zoom (scaling), should be 1.0f by defaultzoom
(float value) Camera zoom (scaling), should be 1.0f by default
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Camera2D
public Camera2D()Construct with auto memory allocator and fields initialized to zero. -
Camera2D
Construct with your owm memory allocator and fields not initialized -
Camera2D
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Camera2D
Construct with auto memory allocator and fields initialized as specified- Parameters:
offset
- Camera offset (displacement from target)target
- Camera target (rotation and zoom origin)rotation
- Camera rotation in degreeszoom
- Camera zoom (scaling), should be 1.0f by default
-
Camera2D
Construct with your own memory allocator and fields initialized as specified- Parameters:
offset
- Camera offset (displacement from target)target
- Camera target (rotation and zoom origin)rotation
- Camera rotation in degreeszoom
- Camera zoom (scaling), should be 1.0f by default
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Camera2D -
allocateArray
Allocate an array of Camera2D -
getOffset
Camera offset (displacement from target) -
setOffset
Camera offset (displacement from target) -
offset
Camera offset (displacement from target) -
offset
-
getTarget
Camera target (rotation and zoom origin) -
setTarget
Camera target (rotation and zoom origin) -
target
Camera target (rotation and zoom origin) -
target
-
getRotation
public float getRotation()Camera rotation in degrees -
setRotation
public void setRotation(float value) Camera rotation in degrees -
rotation
public float rotation()Camera rotation in degrees -
rotation
Camera rotation in degrees -
getZoom
public float getZoom()Camera zoom (scaling), should be 1.0f by default -
setZoom
public void setZoom(float value) Camera zoom (scaling), should be 1.0f by default -
zoom
public float zoom()Camera zoom (scaling), should be 1.0f by default -
zoom
Camera zoom (scaling), should be 1.0f by default
-