Package com.jogamp.graph.ui
Interface Scene.PMVMatrixSetup
-
- Enclosing class:
- Scene
public static interface Scene.PMVMatrixSetup
Interface providinga method
to setupPMVMatrix
'sGLMatrixFunc.GL_PROJECTION
andGLMatrixFunc.GL_MODELVIEW
.At the end of operations, the
GLMatrixFunc.GL_MODELVIEW
matrix has to be selected.Implementation is being called by
Scene#setupMatrix(PMVMatrix, int, int, int, int)
and henceScene.reshape(GLAutoDrawable, int, int, int, int)
.Custom implementations can be set via
Scene.setPMVMatrixSetup(PMVMatrixSetup)
.The default implementation is described below:
GLMatrixFunc.GL_PROJECTION
Matrix- Identity
- Perspective
Scene.DEFAULT_ANGLE
withScene.DEFAULT_ZNEAR
andScene.DEFAULT_ZFAR
- Translated to given
Scene.DEFAULT_SCENE_DIST
- Scale (back) to have normalized
plane dimensions
, 1 for the greater of width and height.
GLMatrixFunc.GL_MODELVIEW
Matrix- identity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
set(PMVMatrix pmv, Recti viewport)
void
setPlaneBox(AABBox planeBox, PMVMatrix pmv, Recti viewport)
-
-
-
Method Detail
-
set
void set(PMVMatrix pmv, Recti viewport)
SetupPMVMatrix
'sGLMatrixFunc.GL_PROJECTION
andGLMatrixFunc.GL_MODELVIEW
.See
Scene.PMVMatrixSetup
for details.At the end of operations, the
GLMatrixFunc.GL_MODELVIEW
matrix is selected.- Parameters:
pmv
- thePMVMatrix
to setupviewport
- Rect4i viewport
-
setPlaneBox
void setPlaneBox(AABBox planeBox, PMVMatrix pmv, Recti viewport)
Optional method to set theScene.getBounds()
AABBox
, maybe anop
if not desired.Will be called by
Scene.reshape(GLAutoDrawable, int, int, int, int)
afterset(PMVMatrix, Recti)
.- Parameters:
planeBox
- theAABBox
to definepmv
- thePMVMatrix
, already setup viaset(PMVMatrix, Recti)
.viewport
- Rect4i viewport
-
-