public class

Perspective

extends Object
implements Projection
java.lang.Object
   ↳ casmi.graphics.object.Perspective

Class Overview

Perspective class. Works like glFrustum. Wrapper of perspective projection for JOGL

Summary

Public Constructors
Perspective(double fov, double aspect, double zNear, double zFar)
Creates a new Perspective object applying foreshortening, making distant objects appear smaller than closer ones.
Perspective()
Creates a Perspective object with default values.
Public Methods
void project(Graphics g)
void projectForSelection(Graphics g)
void set(double fov, double aspect, double zNear, double zFar)
Sets a perspective projection applying foreshortening, making distant objects appear smaller than closer ones.
[Expand]
Inherited Methods
From class java.lang.Object
From interface casmi.graphics.object.Projection

Public Constructors

public Perspective (double fov, double aspect, double zNear, double zFar)

Creates a new Perspective object applying foreshortening, making distant objects appear smaller than closer ones.

Parameters
fov The field-of-view angle (in radians) for vertical direction.
aspect The ratio of width to height.
zNear The z-position of nearest clipping plane.
zFar The z-position of nearest farthest plane.

public Perspective ()

Creates a Perspective object with default values. The default values are: Perspective(PI/3.0, width/height, cameraZ/10.0, cameraZ*10.0) where cameraZ is ((height/2.0) / tan(PI*60.0/360.0))

Public Methods

public void project (Graphics g)

public void projectForSelection (Graphics g)

public void set (double fov, double aspect, double zNear, double zFar)

Sets a perspective projection applying foreshortening, making distant objects appear smaller than closer ones.

Parameters
fov The field-of-view angle (in radians) for vertical direction.
aspect The ratio of width to height.
zNear The z-position of nearest clipping plane.
zFar The z-position of nearest farthest plane.