|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.CanvasViewCache
class CanvasViewCache
The CanvasViewCache class is used to cache all data, both API data and derived data, that is dependent on the Canvas3D or Screen3D. The final view and projection matrices are stored here.
Constructor Summary | |
---|---|
CanvasViewCache(Canvas3D canvas,
ScreenViewCache screenViewCache,
ViewCache viewCache)
Constructs and initializes a CanvasViewCache object. |
Method Summary | |
---|---|
private void |
analyzeProjection(Transform3D p,
double xMax)
Debugging routine to analyze the projection matrix. |
private void |
buildProjView(Point3d ep,
Transform3D coe2Plate,
Transform3D vpc2Plate,
double F,
double B,
Transform3D ecToCc,
Transform3D vpcToEc,
boolean doInfinite)
buildProjView creates a projection and viewing matrix. |
private void |
cacheEyePosCoexistenceRelative(Point3d leftManualEyeInCoexistence,
Point3d rightManualEyeInCoexistence)
|
private void |
cacheEyePosFixedField()
|
private void |
cacheEyePosition()
Routine to cache the current eye position in image plate coordinates. |
private void |
cacheEyePosScreenRelative(Point3d leftEye,
Point3d rightEye)
Common routine used when head tracking and when using manual relative_to_screen eyepoint policy. |
private void |
cacheEyePosWindowRelative()
Case of view eye position contrainted to center of window, but with z distance from plate eye pos. |
private void |
computeCanvasInfo()
|
private void |
computeCoexistenceCenter()
|
private void |
computeCoexistenceToPlate()
|
(package private) void |
computeDerivedData(boolean currentFlag,
CanvasViewCache cvc,
BoundingBox frustumBBox,
boolean doInfinite)
Compute derived data using the snapshot of the per-canvas, per-screen and per-view data. |
(package private) void |
computefrustumBBox(BoundingBox frustumBBox)
|
private void |
computeFrustumPlanes(Transform3D ecToCc,
Transform3D vpcToEc,
Vector4d[] frustumPlanes,
Point4d[] frustumPoints,
Transform3D ccToVworld)
Compute the plane equations for the frustum in ViewPlatform coordinates, plus its viewing frustum points. |
private void |
computeHeadToVworld()
|
private void |
computePlaneEq(Point4d p1,
Point4d p2,
Point4d p3,
Point4d p4,
Vector4d planeEq)
|
private void |
computePlateToVworld()
|
private void |
computeTrackedEyePosition()
Compute the head-tracked eye position for the right and left eyes. |
private void |
computeView(boolean doInfinite)
Computes the viewing matrices. |
private void |
computeViewPlatformScale()
|
private void |
computeVpcToCoexistence()
|
(package private) void |
copyComputedCanvasViewCache(CanvasViewCache cvc,
boolean doInfinite)
|
private void |
doComputeDerivedData(boolean currentFlag,
CanvasViewCache cvc,
BoundingBox frustumBBox,
boolean doInfinite)
Compute derived data using the snapshot of the per-canvas, per-screen and per-view data. |
(package private) int |
getCanvasHeight()
|
(package private) void |
getCanvasPositionAndSize()
|
(package private) int |
getCanvasWidth()
|
(package private) int |
getCanvasX()
|
(package private) int |
getCanvasY()
|
(package private) Point3d |
getCenterEyeInImagePlate()
|
(package private) Transform3D |
getHeadToVworld()
|
(package private) Transform3D |
getImagePlateToVworld()
|
(package private) Transform3D |
getInfgRightEcToVpc()
|
(package private) Transform3D |
getInfLeftEcToVpc()
|
(package private) Transform3D |
getInfLeftProjection()
|
(package private) Transform3D |
getInfLeftVpcToEc()
|
(package private) Transform3D |
getInfRightProjection()
|
(package private) Transform3D |
getInfRightVpcToEc()
|
(package private) double |
getInfVworldToCoexistenceScale()
|
(package private) Transform3D |
getInfVworldToVpc()
|
(package private) Transform3D |
getLastVworldToImagePlate()
|
(package private) Transform3D |
getLeftCcToVworld()
|
(package private) Transform3D |
getLeftEcToVpc()
|
(package private) Point3d |
getLeftEyeInImagePlate()
|
(package private) Vector4d[] |
getLeftFrustumPlanesInVworld()
|
(package private) Transform3D |
getLeftProjection()
|
(package private) Transform3D |
getLeftVpcToEc()
|
(package private) double |
getPhysicalWindowHeight()
|
(package private) double |
getPhysicalWindowWidth()
|
(package private) void |
getPixelLocationFromImagePlate(Point3d imagePlatePoint,
Point2d pixelLocation)
Projects the specified point from image plate coordinates into AWT pixel coordinates. |
(package private) void |
getPixelLocationInImagePlate(double x,
double y,
double z,
Point3d imagePlatePoint)
|
(package private) Transform3D |
getRightCcToVworld()
|
(package private) Transform3D |
getRightEcToVpc()
|
(package private) Point3d |
getRightEyeInImagePlate()
|
(package private) Vector4d[] |
getRightFrustumPlanesInVworld()
|
(package private) Transform3D |
getRightProjection()
|
(package private) Transform3D |
getRightVpcToEc()
|
(package private) boolean |
getUseStereo()
|
(package private) Transform3D |
getVpcToVworld()
|
(package private) double |
getVworldToCoexistenceScale()
|
(package private) Transform3D |
getVworldToImagePlate()
|
(package private) Transform3D |
getVworldToTrackerBase()
|
(package private) Transform3D |
getVworldToVpc()
|
(package private) double |
getWindowXInImagePlate(double x)
|
(package private) double |
getWindowYInImagePlate(double y)
|
(package private) void |
setCanvas(Canvas3D c)
|
(package private) void |
setScreenViewCache(ScreenViewCache svc)
|
(package private) void |
setViewCache(ViewCache vc)
|
(package private) void |
snapshot(boolean computeFrustum)
Take snapshot of all per-canvas API parameters and input values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.lang.Object debugLock
private Canvas3D canvas
int cvcDirtyMask
private ScreenViewCache screenViewCache
private ViewCache viewCache
private int awtCanvasX
private int awtCanvasY
private int awtCanvasWidth
private int awtCanvasHeight
private RenderBin renderBin
private boolean useStereo
private int monoscopicViewPolicy
private Point3d leftManualEyeInImagePlate
private Point3d rightManualEyeInImagePlate
double physicalScreenWidth
double physicalScreenHeight
int screenWidth
int screenHeight
double metersPerPixelX
double metersPerPixelY
private int canvasX
private int canvasY
private int canvasWidth
private int canvasHeight
private int effectiveMonoscopicViewPolicy
private Transform3D leftProjection
private Transform3D rightProjection
private Transform3D infLeftProjection
private Transform3D infRightProjection
private Transform3D leftVpcToEc
private Transform3D rightVpcToEc
private Transform3D infLeftVpcToEc
private Transform3D infRightVpcToEc
private Transform3D leftEcToVpc
private Transform3D rightEcToVpc
private Transform3D infLeftEcToVpc
private Transform3D infRightEcToVpc
private Vector4d[] leftFrustumPlanes
private Vector4d[] rightFrustumPlanes
private Point4d[] leftFrustumPoints
private Point4d[] rightFrustumPoints
private Transform3D headTrackerToLeftImagePlate
private Transform3D headTrackerToRightImagePlate
private Point3d leftTrackedEyeInImagePlate
private Point3d rightTrackedEyeInImagePlate
private Point3d leftEyeInImagePlate
private Point3d rightEyeInImagePlate
private Point3d centerEyeInImagePlate
private double nominalEyeOffset
private double physicalWindowXLeft
private double physicalWindowYBottom
private double physicalWindowXRight
private double physicalWindowYTop
private double physicalWindowWidth
private double physicalWindowHeight
private Point3d physicalWindowCenter
private double screenScale
private double windowScale
private double viewPlatformScale
private Transform3D leftCcToVworld
private Transform3D rightCcToVworld
private Transform3D coexistenceToLeftPlate
private Transform3D coexistenceToRightPlate
private Transform3D vpcToCoexistence
private Transform3D vpcToLeftPlate
private Transform3D vpcToRightPlate
private Transform3D leftPlateToVpc
private Transform3D rightPlateToVpc
private Transform3D vworldToLeftPlate
private Transform3D lastVworldToLeftPlate
private Transform3D vworldToRightPlate
private Transform3D leftPlateToVworld
private Transform3D rightPlateToVworld
private Transform3D headToLeftImagePlate
private Transform3D headToRightImagePlate
private Transform3D vworldToTrackerBase
private Transform3D tempTrans
private Transform3D headToVworld
private Vector3d coexistenceCenter
private double vworldToCoexistenceScale
private double infVworldToCoexistenceScale
private Transform3D tMat1
private Transform3D tMat2
private Vector3d tVec1
private Vector3d tVec2
private Vector3d tVec3
private Point3d tPnt1
private Point3d tPnt2
private Matrix4d tMatrix
private Transform3D vworldToVpc
private Transform3D vpcToVworld
private Transform3D infVworldToVpc
private boolean lastDoInfinite
private boolean updateLastTime
Constructor Detail |
---|
CanvasViewCache(Canvas3D canvas, ScreenViewCache screenViewCache, ViewCache viewCache)
Method Detail |
---|
void getCanvasPositionAndSize()
void computefrustumBBox(BoundingBox frustumBBox)
void copyComputedCanvasViewCache(CanvasViewCache cvc, boolean doInfinite)
void snapshot(boolean computeFrustum)
void computeDerivedData(boolean currentFlag, CanvasViewCache cvc, BoundingBox frustumBBox, boolean doInfinite)
private void doComputeDerivedData(boolean currentFlag, CanvasViewCache cvc, BoundingBox frustumBBox, boolean doInfinite)
private void computeCanvasInfo()
private void computeViewPlatformScale()
private void cacheEyePosFixedField()
private void cacheEyePosWindowRelative()
private void cacheEyePosScreenRelative(Point3d leftEye, Point3d rightEye)
private void cacheEyePosCoexistenceRelative(Point3d leftManualEyeInCoexistence, Point3d rightManualEyeInCoexistence)
private void computeTrackedEyePosition()
private void cacheEyePosition()
private void computePlateToVworld()
private void computeHeadToVworld()
private void computeVpcToCoexistence()
private void computeCoexistenceCenter()
private void computeCoexistenceToPlate()
private void computeView(boolean doInfinite)
private void analyzeProjection(Transform3D p, double xMax)
private void buildProjView(Point3d ep, Transform3D coe2Plate, Transform3D vpc2Plate, double F, double B, Transform3D ecToCc, Transform3D vpcToEc, boolean doInfinite)
private void computeFrustumPlanes(Transform3D ecToCc, Transform3D vpcToEc, Vector4d[] frustumPlanes, Point4d[] frustumPoints, Transform3D ccToVworld)
private void computePlaneEq(Point4d p1, Point4d p2, Point4d p3, Point4d p4, Vector4d planeEq)
int getCanvasX()
int getCanvasY()
int getCanvasWidth()
int getCanvasHeight()
double getPhysicalWindowWidth()
double getPhysicalWindowHeight()
boolean getUseStereo()
Transform3D getLeftProjection()
Transform3D getRightProjection()
Transform3D getLeftVpcToEc()
Transform3D getRightVpcToEc()
Transform3D getLeftEcToVpc()
Transform3D getRightEcToVpc()
Transform3D getInfLeftProjection()
Transform3D getInfRightProjection()
Transform3D getInfLeftVpcToEc()
Transform3D getInfRightVpcToEc()
Transform3D getInfLeftEcToVpc()
Transform3D getInfgRightEcToVpc()
Transform3D getInfVworldToVpc()
Transform3D getLeftCcToVworld()
Transform3D getRightCcToVworld()
Transform3D getImagePlateToVworld()
Transform3D getLastVworldToImagePlate()
Transform3D getVworldToImagePlate()
Transform3D getVworldToTrackerBase()
double getVworldToCoexistenceScale()
double getInfVworldToCoexistenceScale()
Point3d getLeftEyeInImagePlate()
Point3d getRightEyeInImagePlate()
Point3d getCenterEyeInImagePlate()
Transform3D getHeadToVworld()
Transform3D getVpcToVworld()
Transform3D getVworldToVpc()
double getWindowXInImagePlate(double x)
double getWindowYInImagePlate(double y)
Vector4d[] getLeftFrustumPlanesInVworld()
Vector4d[] getRightFrustumPlanesInVworld()
void getPixelLocationInImagePlate(double x, double y, double z, Point3d imagePlatePoint)
void getPixelLocationFromImagePlate(Point3d imagePlatePoint, Point2d pixelLocation)
void setCanvas(Canvas3D c)
void setScreenViewCache(ScreenViewCache svc)
void setViewCache(ViewCache vc)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |