PerspectiveCamera
classin packageklyn.graphics3d
public class PerspectiveCamera
PerspectiveCamera

Perspective camera looking toward a target, independent of the GUI. Example: camera = PerspectiveCamera(); camera.fit(scene.root.bounds())

Properties
Modifier and Type Member Description
public property far
far as Double = 1000.0
Far clipping plane, larger than near.
public property near
near as Double = 0.01
Near clipping plane, positive.
public property position
position as Vector3d<Double> = Vector3d<Double>(0.0, 0.0, 5.0)
World eye position.
public property target
target as Vector3d<Double> = Vector3d<Double>(0.0, 0.0, 0.0)
World target.
public property up
up as Vector3d<Double> = Vector3d<Double>(0.0, 1.0, 0.0)
World up axis.
public property verticalAngle
verticalAngle as Double = Math.PI / 4.0
Vertical field of view in radians.
Methods
Modifier and Type Member Description
public fit
fit(bounds as Bounds3d, aspect as Double = 1.0) as Void
Frames a bounding sphere; aspect accounts for narrow viewports.
public viewProjection
viewProjection(aspect as Double) as Matrix4
Projection/view matrix; rejects invalid frustum or parallel up axis.