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_PROJECTIONMatrix- Identity
- Perspective
getAngle()withgetZNear()andgetZFar() - Translated to given
getSceneDist()
GLMatrixFunc.GL_MODELVIEWMatrix- identity
-
-
Constructor Summary
Constructors Constructor Description DefaultPMVMatrixSetup()DefaultScene.DefaultPMVMatrixSetupinstance usingScene.DEFAULT_SCENE_DIST,Scene.DEFAULT_ZNEAR,Scene.DEFAULT_ZFAR,Scene.DEFAULT_ANGLE.DefaultPMVMatrixSetup(float scene_dist)CustomScene.DefaultPMVMatrixSetupinstance using givenscene_distandScene.DEFAULT_ZNEAR,Scene.DEFAULT_ZFAR,Scene.DEFAULT_ANGLE.DefaultPMVMatrixSetup(float scene_dist, float zNear, float zFar)CustomScene.DefaultPMVMatrixSetupinstance using givenscene_dist,zNear,zFarandScene.DEFAULT_ANGLE.DefaultPMVMatrixSetup(float scene_dist, float zNear, float zFar, float angle)CustomScene.DefaultPMVMatrixSetupinstance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetAngle()Returns fov projection angle in radians, shall be0for orthogonal projection.floatgetSceneDist()Returns scene distance on z-axis to projection.floatgetZFar()Returns projection z-far value.floatgetZNear()Returns projection z-near value.voidset(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport)voidsetPlaneBox(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.DefaultPMVMatrixSetupinstance- 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.DefaultPMVMatrixSetupinstance using givenscene_dist,zNear,zFarandScene.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.DefaultPMVMatrixSetupinstance using givenscene_distandScene.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.DefaultPMVMatrixSetupinstance 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.PMVMatrixSetupSetupPMVMatrix4f'sGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEW.See
Scene.PMVMatrixSetupfor details.At the end of operations, the
GLMatrixFunc.GL_MODELVIEWmatrix is selected.- Specified by:
setin interfaceScene.PMVMatrixSetup- Parameters:
pmv- thePMVMatrix4fto 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.PMVMatrixSetupOptional method to set theScene.getBounds()AABBox, maybe anopif not desired.Will be called by
Scene.reshape(GLAutoDrawable, int, int, int, int)afterScene.PMVMatrixSetup.set(PMVMatrix4f, Recti).- Specified by:
setPlaneBoxin interfaceScene.PMVMatrixSetup- Parameters:
planeBox- theAABBoxto definepmv- thePMVMatrix4f, already setup viaScene.PMVMatrixSetup.set(PMVMatrix4f, Recti).viewport- Rect4i viewport
-
getSceneDist
public float getSceneDist()
Description copied from interface:Scene.PMVMatrixSetupReturns scene distance on z-axis to projection.- Specified by:
getSceneDistin interfaceScene.PMVMatrixSetup
-
getAngle
public float getAngle()
Description copied from interface:Scene.PMVMatrixSetupReturns fov projection angle in radians, shall be0for orthogonal projection.- Specified by:
getAnglein interfaceScene.PMVMatrixSetup
-
getZNear
public float getZNear()
Description copied from interface:Scene.PMVMatrixSetupReturns projection z-near value.- Specified by:
getZNearin interfaceScene.PMVMatrixSetup
-
getZFar
public float getZFar()
Description copied from interface:Scene.PMVMatrixSetupReturns projection z-far value.- Specified by:
getZFarin interfaceScene.PMVMatrixSetup
-
-