Package com.jogamp.graph.ui
Interface Scene.PMVMatrixSetup
-
- All Known Implementing Classes:
Scene.DefaultPMVMatrixSetup
- Enclosing class:
- Scene
public static interface Scene.PMVMatrixSetup
Interface providinga method
to setupPMVMatrix4f
'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(PMVMatrix4f, 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
Scene.DefaultPMVMatrixSetup
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description float
getAngle()
Returns fov projection angle in radians, shall be0
for orthogonal projection.float
getSceneDist()
Returns scene distance on z-axis to projection.float
getZFar()
Returns projection z-far value.float
getZNear()
Returns projection z-near value.void
set(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport)
void
setPlaneBox(com.jogamp.math.geom.AABBox planeBox, com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport)
-
-
-
Method Detail
-
getSceneDist
float getSceneDist()
Returns scene distance on z-axis to projection.
-
getAngle
float getAngle()
Returns fov projection angle in radians, shall be0
for orthogonal projection.
-
getZNear
float getZNear()
Returns projection z-near value.
-
getZFar
float getZFar()
Returns projection z-far value.
-
set
void set(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport)
SetupPMVMatrix4f
'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
- thePMVMatrix4f
to setupviewport
- Rect4i viewport
-
setPlaneBox
void setPlaneBox(com.jogamp.math.geom.AABBox planeBox, com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.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(PMVMatrix4f, Recti)
.- Parameters:
planeBox
- theAABBox
to definepmv
- thePMVMatrix4f
, already setup viaset(PMVMatrix4f, Recti)
.viewport
- Rect4i viewport
-
-