Package renderer.models_L
Class ViewFrustumModel
- java.lang.Object
-
- renderer.scene.Model
-
- renderer.models_L.ViewFrustumModel
-
public class ViewFrustumModel extends Model
Create a wireframe model of a camera's perspective view frustum. That is, create a frustum of a pyramid along the negative z-axis with its apex at the origin.This class has two constructors that mimic the projPerspective() methods from the
Camera
class.
-
-
Field Summary
-
Fields inherited from class renderer.scene.Model
colorList, name, primitiveList, vertexList, visible
-
-
Constructor Summary
Constructors Constructor Description ViewFrustumModel()
Create a frustum of a pyramid along the negative z-axis with a front face atz = -0.25
, a back face atz = -1
, and the front face bounded by-0.25 <= x <= 0.25
and-0.25 <= y <= 0.25
.ViewFrustumModel(double fovy, double aspect, double near, double far)
Here, the frustum is determined by a vertical "field of view" angle and an aspect ratio for the front face.ViewFrustumModel(double left, double right, double bottom, double top, double near, double far)
Create a frustum of a pyramid along the negative z-axis that mimics aCamera
's perspective view volume.
-
-
-
Constructor Detail
-
ViewFrustumModel
public ViewFrustumModel()
Create a frustum of a pyramid along the negative z-axis with a front face atz = -0.25
, a back face atz = -1
, and the front face bounded by-0.25 <= x <= 0.25
and-0.25 <= y <= 0.25
.
-
ViewFrustumModel
public ViewFrustumModel(double left, double right, double bottom, double top, double near, double far)
Create a frustum of a pyramid along the negative z-axis that mimics aCamera
's perspective view volume.- Parameters:
left
- left edge of the front face in the plane z = -nearright
- right edge of the front face in the plane z = -nearbottom
- bottom edge of the front face in the plane z = -neartop
- top edge of the front face in the plane z = -nearnear
- distance from the origin to the front facefar
- distance from the origin to the back face
-
ViewFrustumModel
public ViewFrustumModel(double fovy, double aspect, double near, double far)
Here, the frustum is determined by a vertical "field of view" angle and an aspect ratio for the front face.- Parameters:
fovy
- angle in the y-direction subtended by the front faceaspect
- aspect ratio of the front facenear
- distance from the origin to the front facefar
- distance from the origin to the back face
-
-