|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object camera3d.VcObject camera3d.VcView
Represents a camera in the virtual world. This class encapsulates the javax.media.j3d.View
and the javax.media.j3d.ViewPlatform objects.
The userData field of the ViewPlatform is set to point to this object, making it possible
to retrieve an reference to the VcView object from the javax.media.j3d.View object it
encapsulates, through this call sequence:
View.getViewPlatform.getUserData()
Field Summary | |
static int |
PARALLEL_PROJECTION
Specifies that Java3D should generate a parallel projectioin matrix for this view. |
static int |
PERSPECTIVE_PROJECTION
Specifies that Java3D should generate a perspective projectioin matrix for this view. |
static int |
PHYSICAL_WORLD
Policy for resizing and moving windows. |
static int |
VIRTUAL_WORLD
Policy for resizing and moving windows. |
Fields inherited from class camera3d.VcObject |
transformationMode |
Constructor Summary | |
VcView()
Constructs a VcView with default parameters |
|
VcView(javax.media.j3d.PhysicalBody body,
javax.media.j3d.PhysicalEnvironment environment)
Constructs a VcView with given parameters. |
Method Summary | |
void |
addCanvas3D(javax.media.j3d.Canvas3D canvas)
Adds a given Canvas3D to the list of Canvas3D objects to which this VcView is rendered. |
void |
frameObjectInView(VcObject vcObject)
Translates the camera so a given VcObject is made completely visible. |
double |
getBackClipDistance()
|
double |
getFieldOfView()
Returns the field of view used to compute the projection transform. |
double |
getFrontClipDistance()
|
javax.swing.Icon |
getIcon()
Returns the Icon associated with cameras. |
static int |
getInstanceCounter()
Returns the number of VcView objects created so far. |
boolean |
getNavigateEnable()
|
int |
getProjectionPolicy()
|
int |
getWindowMovementPolicy()
|
int |
getWindowResizePolicy()
|
void |
removeAllCanvas3Ds()
Remove all Canvas3Ds to which this view is attached. |
void |
removeCanvas3D(javax.media.j3d.Canvas3D canvas)
Removes a Canvas3D. |
void |
setBackClipDistance(double dist)
|
void |
setFieldOfView(double fov)
Sets the field of view used to compute the projection transform. |
void |
setFrontClipDistance(double dist)
|
void |
setIcon(javax.swing.Icon cameraIcon)
Sets the Icon associated with cameras. |
void |
setNavigateEnable(boolean navigating)
|
void |
setProjectionPolicy(int policy)
Sets projection policy; notifyChangeListeners is called after execution. |
void |
setTransform(javax.vecmath.Quat4d rotQ4d,
javax.vecmath.Vector3d transVec,
double scale)
Method to be called from inside VcKeyNavigator. |
void |
setWindowMovementPolicy(int policy)
|
void |
setWindowResizePolicy(int i)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PARALLEL_PROJECTION
public static final int PERSPECTIVE_PROJECTION
public static final int VIRTUAL_WORLD
public static final int PHYSICAL_WORLD
Constructor Detail |
public VcView(javax.media.j3d.PhysicalBody body, javax.media.j3d.PhysicalEnvironment environment)
body
- PhysicalBody to be used by this VcViewenvironment
- PhysicalEnvironment to be used by this VcViewpublic VcView()
Method Detail |
public void addCanvas3D(javax.media.j3d.Canvas3D canvas)
canvas
- public void removeAllCanvas3Ds()
public void removeCanvas3D(javax.media.j3d.Canvas3D canvas)
canvas
- Canvas3D to be removed.public void setTransform(javax.vecmath.Quat4d rotQ4d, javax.vecmath.Vector3d transVec, double scale)
rotQ4d
- quaternion holding new rotationtransVec
- Vector3d holding new translationscale
- new scalepublic java.lang.String toString()
public int getProjectionPolicy()
public void setProjectionPolicy(int policy)
policy
- the new projection policypublic int getWindowMovementPolicy()
public void setWindowMovementPolicy(int policy)
public int getWindowResizePolicy()
public void setWindowResizePolicy(int i)
public void setNavigateEnable(boolean navigating)
public boolean getNavigateEnable()
public void setFieldOfView(double fov)
fov
- value of field of view in degrees.public double getFieldOfView()
public double getFrontClipDistance()
public void setFrontClipDistance(double dist)
public double getBackClipDistance()
public void setBackClipDistance(double dist)
public void frameObjectInView(VcObject vcObject)
public static int getInstanceCounter()
public javax.swing.Icon getIcon()
getIcon
in class VcObject
public void setIcon(javax.swing.Icon cameraIcon)
setIcon
in class VcObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |