Package com.jogamp.graph.ui
Class Scene.DefaultPMVMatrixSetup
- java.lang.Object
-
- com.jogamp.graph.ui.Scene.DefaultPMVMatrixSetup
-
- All Implemented Interfaces:
Scene.PMVMatrixSetup
- Enclosing class:
- Scene
public static class Scene.DefaultPMVMatrixSetup extends Object implements Scene.PMVMatrixSetup
Default implementation ofScene.PMVMatrixSetup
, implementingScene.PMVMatrixSetup.set(PMVMatrix4f, Recti)
as follows:GLMatrixFunc.GL_PROJECTION
Matrix- Identity
- Perspective
getAngle()
withgetZNear()
andgetZFar()
- Translated to given
getSceneDist()
GLMatrixFunc.GL_MODELVIEW
Matrix- identity
-
-
Constructor Summary
Constructors Constructor Description DefaultPMVMatrixSetup()
DefaultScene.DefaultPMVMatrixSetup
instance usingScene.DEFAULT_SCENE_DIST
,Scene.DEFAULT_ZNEAR
,Scene.DEFAULT_ZFAR
,Scene.DEFAULT_ANGLE
.DefaultPMVMatrixSetup(float scene_dist)
CustomScene.DefaultPMVMatrixSetup
instance using givenscene_dist
andScene.DEFAULT_ZNEAR
,Scene.DEFAULT_ZFAR
,Scene.DEFAULT_ANGLE
.DefaultPMVMatrixSetup(float scene_dist, float zNear, float zFar)
CustomScene.DefaultPMVMatrixSetup
instance using givenscene_dist
,zNear
,zFar
andScene.DEFAULT_ANGLE
.DefaultPMVMatrixSetup(float scene_dist, float zNear, float zFar, float angle)
CustomScene.DefaultPMVMatrixSetup
instance
-
Method Summary
All Methods Instance Methods Concrete 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)
-
-
-
Constructor Detail
-
DefaultPMVMatrixSetup
public DefaultPMVMatrixSetup(float scene_dist, float zNear, float zFar, float angle)
CustomScene.DefaultPMVMatrixSetup
instance- Parameters:
scene_dist
- scene distance on z-axixzNear
- projection z-near valuezFar
- projection z-far valueangle
- projection angle in radians- See Also:
Scene.DefaultPMVMatrixSetup
,Scene.setPMVMatrixSetup(PMVMatrixSetup)
,Scene.PMVMatrixSetup
-
DefaultPMVMatrixSetup
public DefaultPMVMatrixSetup(float scene_dist, float zNear, float zFar)
CustomScene.DefaultPMVMatrixSetup
instance using givenscene_dist
,zNear
,zFar
andScene.DEFAULT_ANGLE
.- Parameters:
scene_dist
- scene distance on z-axixzNear
- projection z-near valuezFar
- projection z-far value- See Also:
Scene.DefaultPMVMatrixSetup
,Scene.setPMVMatrixSetup(PMVMatrixSetup)
,Scene.PMVMatrixSetup
-
DefaultPMVMatrixSetup
public DefaultPMVMatrixSetup(float scene_dist)
CustomScene.DefaultPMVMatrixSetup
instance using givenscene_dist
andScene.DEFAULT_ZNEAR
,Scene.DEFAULT_ZFAR
,Scene.DEFAULT_ANGLE
.- Parameters:
scene_dist
- scene distance on z-axix- See Also:
Scene.DefaultPMVMatrixSetup
,Scene.setPMVMatrixSetup(PMVMatrixSetup)
,Scene.PMVMatrixSetup
-
DefaultPMVMatrixSetup
public DefaultPMVMatrixSetup()
DefaultScene.DefaultPMVMatrixSetup
instance usingScene.DEFAULT_SCENE_DIST
,Scene.DEFAULT_ZNEAR
,Scene.DEFAULT_ZFAR
,Scene.DEFAULT_ANGLE
.
-
-
Method Detail
-
set
public void set(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport)
Description copied from interface:Scene.PMVMatrixSetup
SetupPMVMatrix4f
'sGLMatrixFunc.GL_PROJECTION
andGLMatrixFunc.GL_MODELVIEW
.See
Scene.PMVMatrixSetup
for details.At the end of operations, the
GLMatrixFunc.GL_MODELVIEW
matrix is selected.- Specified by:
set
in interfaceScene.PMVMatrixSetup
- Parameters:
pmv
- thePMVMatrix4f
to setupviewport
- Rect4i viewport
-
setPlaneBox
public void setPlaneBox(com.jogamp.math.geom.AABBox planeBox, com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport)
Description copied from interface:Scene.PMVMatrixSetup
Optional method to set theScene.getBounds()
AABBox
, maybe anop
if not desired.Will be called by
Scene.reshape(GLAutoDrawable, int, int, int, int)
afterScene.PMVMatrixSetup.set(PMVMatrix4f, Recti)
.- Specified by:
setPlaneBox
in interfaceScene.PMVMatrixSetup
- Parameters:
planeBox
- theAABBox
to definepmv
- thePMVMatrix4f
, already setup viaScene.PMVMatrixSetup.set(PMVMatrix4f, Recti)
.viewport
- Rect4i viewport
-
getSceneDist
public float getSceneDist()
Description copied from interface:Scene.PMVMatrixSetup
Returns scene distance on z-axis to projection.- Specified by:
getSceneDist
in interfaceScene.PMVMatrixSetup
-
getAngle
public float getAngle()
Description copied from interface:Scene.PMVMatrixSetup
Returns fov projection angle in radians, shall be0
for orthogonal projection.- Specified by:
getAngle
in interfaceScene.PMVMatrixSetup
-
getZNear
public float getZNear()
Description copied from interface:Scene.PMVMatrixSetup
Returns projection z-near value.- Specified by:
getZNear
in interfaceScene.PMVMatrixSetup
-
getZFar
public float getZFar()
Description copied from interface:Scene.PMVMatrixSetup
Returns projection z-far value.- Specified by:
getZFar
in interfaceScene.PMVMatrixSetup
-
-