|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.ViewEnvironment
Abstract representation of the physical environment setup used to connect a virtual Viewpoint object to the real one that is rendered on a drawable surface.
Field Summary | |
static int |
ORTHOGRAPHIC_PROJECTION
The projection type is perspective mode |
static int |
PERSPECTIVE_PROJECTION
The projection type is perspective mode |
Constructor Summary | |
ViewEnvironment()
Create a default instance of this class with stereo false, perspective projection and field of view set to 45 degrees. |
Method Summary | |
void |
generateViewFrustum(double[] viewFrustum)
From the current view setup of FoV, near and far clipping distances and the aspectRatio ratio, generate the 6 parameters that describe a view frustum. |
double |
getAspectRatio()
Get the currently set aspect ratio. |
double |
getFarClipDistance()
Get the current setting of the far clip plane. |
double |
getFieldOfView()
Get the currently set field of view. |
double |
getNearClipDistance()
Get the current setting of the far clip plane. |
int |
getProjectionType()
Check to see if stereo has been enabled for this environment. |
boolean |
getStereoEnabled()
Check to see if stereo has been enabled for this environment. |
java.awt.Rectangle |
getViewport()
Get the currently set dimensions of the viewport. |
void |
setAspectRatio(double aspect)
Set aspect ratio, which is the ratio of window Width / Height. |
void |
setFarClipDistance(double d)
Set the far clipping distance to be used by the application. |
void |
setFieldOfView(double angle)
Set the field of view to be used. |
void |
setNearClipDistance(double d)
Set the near clipping distance to be used by the application. |
void |
setProjectionType(int type)
Set the perspective projection flag used for this environment. |
void |
setStereoEnabled(boolean stereo)
Set the stereo flag used for this environment. |
void |
setViewport(java.awt.Rectangle size)
Set an explicit viewport dimensions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PERSPECTIVE_PROJECTION
public static final int ORTHOGRAPHIC_PROJECTION
Constructor Detail |
public ViewEnvironment()
Method Detail |
public void setStereoEnabled(boolean stereo)
stereo
- True if stereo should be renderedpublic boolean getStereoEnabled()
public void setProjectionType(int type) throws java.lang.IllegalArgumentException
type
- One of ORTHOGRAPHIC_PROJECTION or PERSPECTIVE_PROJECTION
java.lang.IllegalArgumentException
- The type is not validpublic int getProjectionType()
public void setFieldOfView(double angle) throws java.lang.IllegalArgumentException
angle
- The angle in degress
java.lang.IllegalArgumentException
- The angle is less than or equal to zeropublic double getFieldOfView()
public void setAspectRatio(double aspect)
aspect
- The new aspectRatio ratio.public double getAspectRatio()
public void setViewport(java.awt.Rectangle size)
Note that if explicit coordinates are provided, the end user application should also add window listener events to the surface and adjust the values accordingly.
size
- The new dimensions to use or null to clearpublic java.awt.Rectangle getViewport()
public void setNearClipDistance(double d)
d
- The distance to set the near clip plane topublic double getNearClipDistance()
public void setFarClipDistance(double d)
d
- The distance to set the near clip plane topublic double getFarClipDistance()
public void generateViewFrustum(double[] viewFrustum)
viewFrustum
- An array at least 6 in length for the values generated
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |