|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.joglutils.msg.nodes.Node
net.java.joglutils.msg.nodes.Camera
net.java.joglutils.msg.nodes.PerspectiveCamera
public class PerspectiveCamera
Represents a camera utilizing a perspective projection.
The default height angle is Math.PI / 4 radians (45 degrees), meaning that the camera has a total vertical field of view of 90 degrees.
Field Summary |
---|
Fields inherited from class net.java.joglutils.msg.nodes.Camera |
---|
projDirty, projMatrix, viewDirty, viewMatrix |
Constructor Summary | |
---|---|
PerspectiveCamera()
|
Method Summary | |
---|---|
float |
getHeightAngle()
Returns the height angle, in radians, of this perspective camera. |
Mat4f |
getProjectionMatrix()
Returns the projection matrix associated with this camera's parameters. |
protected Vec3f |
getRayStartPoint(Vec2f point,
Vec3f unprojectedPoint)
Computes the start point of a ray for picking, given a point in normalized screen coordinates ((0, 0) to (1, 1)) and a 3D point which that point unprojects to. |
float |
getWidthAngle()
Returns the width angle, in radians, of this perspective camera, assuming the camera's currently-set aspect ratio. |
float |
getWidthAngle(float aspectRatio)
Returns the width angle, in radians, of this perspective camera, assuming the passed-in aspect ratio. |
void |
render(GLRenderAction action)
Support for the built-in GLRenderAction. |
void |
setHeightAngle(float heightAngle)
Sets the height angle, in radians, of this perspective camera. |
Methods inherited from class net.java.joglutils.msg.nodes.Camera |
---|
doAction, getAspectRatio, getFarDistance, getFocalDistance, getNearDistance, getOrientation, getPosition, getViewingMatrix, rayPick, setAspectRatio, setFarDistance, setFocalDistance, setNearDistance, setOrientation, setPosition, unproject, unproject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PerspectiveCamera()
Method Detail |
---|
public Mat4f getProjectionMatrix()
Camera
getProjectionMatrix
in class Camera
public void setHeightAngle(float heightAngle)
public float getHeightAngle()
public float getWidthAngle(float aspectRatio)
public float getWidthAngle()
protected Vec3f getRayStartPoint(Vec2f point, Vec3f unprojectedPoint)
Camera
getRayStartPoint
in class Camera
public void render(GLRenderAction action)
Node
render
in class Node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |