PerspectiveCamera

open class PerspectiveCamera(virtualWidth: Float = 0.0f, virtualHeight: Float = 0.0f) : Camera

Constructors

Link copied to clipboard
fun PerspectiveCamera(virtualWidth: Int, virtualHeight: Int)
Link copied to clipboard
fun PerspectiveCamera(virtualWidth: Float = 0.0f, virtualHeight: Float = 0.0f)

Functions

Link copied to clipboard
fun boundsInFrustum(point: Vec3f, size: Vec3f): Boolean
fun boundsInFrustum(px: Float, py: Float, width: Float, height: Float): Boolean
open override fun boundsInFrustum(px: Float, py: Float, pz: Float, width: Float, height: Float, length: Float): Boolean
Link copied to clipboard
fun computePickRay(context: Context, pickRay: Ray, screenX: Float, screenY: Float, viewportX: Float, viewportY: Float, viewportWidth: Float, viewportHeight: Float): Boolean
Link copied to clipboard
fun lookAt(target: Vec3f)
fun lookAt(x: Float, y: Float, z: Float)
Link copied to clipboard
Link copied to clipboard
fun project(world: Vec2f, result: MutableVec2f): Boolean
fun project(world: Vec3f, result: MutableVec3f): Boolean
fun project(world: Vec3f, result: MutableVec4f): MutableVec4f
Link copied to clipboard
fun rotate(quaternion: Vec4f)
fun rotate(angle: Angle, axis: Vec3f)
fun rotate(angle: Angle, axisX: Float, axisY: Float, axisZ: Float)
Link copied to clipboard
fun rotateAround(point: Vec3f, axis: Vec3f, angle: Angle)
Link copied to clipboard
fun screenToWorld(context: Context, screen: MutableVec2f, viewport: Viewport): MutableVec2f
fun screenToWorld(context: Context, screen: Vec3f, viewport: Viewport): MutableVec3f
fun screenToWorld(context: Context, screen: MutableVec2f, viewport: Viewport, result: MutableVec2f): Boolean
fun screenToWorld(context: Context, screen: Vec3f, viewport: Viewport, result: MutableVec3f): Boolean
fun screenToWorld(context: Context, x: Float, y: Float, viewport: Viewport, result: MutableVec2f): Boolean
fun screenToWorld(context: Context, screen: Vec2f, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat()): MutableVec2f
fun screenToWorld(context: Context, screen: Vec3f, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat()): MutableVec3f
fun screenToWorld(context: Context, screen: Vec2f, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat(), result: MutableVec2f): Boolean
fun screenToWorld(context: Context, screen: Vec3f, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat(), result: MutableVec3f): Boolean
fun screenToWorld(context: Context, x: Float, y: Float, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat()): MutableVec2f
fun screenToWorld(context: Context, x: Float, y: Float, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat(), result: MutableVec2f): Boolean
fun screenToWorld(context: Context, x: Float, y: Float, z: Float, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat()): MutableVec3f
fun screenToWorld(context: Context, x: Float, y: Float, z: Float, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat(), result: MutableVec3f): Boolean
Link copied to clipboard
fun sphereInFrustum(center: Vec3f, radius: Float): Boolean
fun sphereInFrustum(cx: Float, cy: Float, radius: Float): Boolean
open override fun sphereInFrustum(cx: Float, cy: Float, cz: Float, radius: Float): Boolean
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun translate(offset: Vec3f)
fun translate(x: Float, y: Float, z: Float)
Link copied to clipboard
open fun update()
Link copied to clipboard
fun worldToScreen(context: Context, screen: MutableVec2f, viewport: Viewport): MutableVec2f
fun worldToScreen(context: Context, world: Vec2f, viewport: Viewport, result: MutableVec2f): Boolean
fun worldToScreen(context: Context, world: Vec3f, viewport: Viewport, result: MutableVec3f): Boolean
fun worldToScreen(context: Context, x: Float, y: Float, viewport: Viewport, result: MutableVec2f): Boolean
fun worldToScreen(context: Context, world: Vec2f, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat()): MutableVec2f
fun worldToScreen(context: Context, world: Vec3f, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat()): MutableVec3f
fun worldToScreen(context: Context, world: Vec2f, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat(), result: MutableVec2f): Boolean
fun worldToScreen(context: Context, world: Vec3f, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat(), result: MutableVec3f): Boolean
fun worldToScreen(context: Context, x: Float, y: Float, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat()): MutableVec2f
fun worldToScreen(context: Context, x: Float, y: Float, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat(), result: MutableVec2f): Boolean
fun worldToScreen(context: Context, x: Float, y: Float, z: Float, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat()): MutableVec3f
fun worldToScreen(context: Context, x: Float, y: Float, z: Float, viewportX: Float = 0.0f, viewportY: Float = 0.0f, viewportWidth: Float = context.graphics.width.toFloat(), viewportHeight: Float = context.graphics.height.toFloat(), result: MutableVec3f): Boolean

Properties

Link copied to clipboard
Link copied to clipboard
open override val direction: MutableVec3f
Link copied to clipboard
var far: Float = 100.0f

The far clipping plane distance

Link copied to clipboard
var fov: Float = 67.0f
Link copied to clipboard
var fovX: Float = 0.0f
Link copied to clipboard
val id: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var near: Float = 1.0f

The near clipping plane distance

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val up: MutableVec3f
Link copied to clipboard
val view: Mat4
Link copied to clipboard
Link copied to clipboard
var virtualHeight: Float = 0.0f
Link copied to clipboard
var virtualWidth: Float = 0.0f
Link copied to clipboard
var zoom: Float = 1.0f

The current zoom value.