Class GPURenderBase
java.lang.Object
WildMagic.LibApplications.OpenGLApplication.Application
WildMagic.LibApplications.OpenGLApplication.JavaApplication
WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
gov.nih.mipav.view.renderer.WildMagic.GPURenderBase
- All Implemented Interfaces:
com.jogamp.opengl.GLEventListener,SpaceNavigatorListener,KeyListener,MouseListener,MouseMotionListener,MouseWheelListener,Serializable,EventListener
- Direct Known Subclasses:
CorticalAnalysisRender,FlyThroughRender,PlaneRender_WM,PlaneRenderProstate,VolumeTriPlanarRenderBase
public abstract class GPURenderBase
extends WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
implements com.jogamp.opengl.GLEventListener, KeyListener, MouseMotionListener, MouseListener, SpaceNavigatorListener
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) WildMagic.LibFoundation.Mathematics.Vector3f(package private) double(package private) double3D MOUSE MOTION CONSTANTSprotected doubleprotected VolumeImage[]protected WildMagic.LibGraphics.Rendering.Textureprivate static intused to invert the settings of the mouseprivate static intused to invert the settings of the mouseprivate static intused to invert the settings of the mouseprivate static intused to invert the settings of the mouseprivate static intused to invert the settings of the mouseprivate static intused to invert the settings of the mouseprotected booleanprotected WildMagic.LibGraphics.Rendering.Light[]Lights from JPanelLightprotected booleanprotected booleanprotected booleanprotected booleanChange the mouse cursor with the first mouseDrag eventprotected booleanSet to true when init() is called:protected booleanMinimizes rendering, only render when modified is true.protected booleankeeps track if the user is currently dragging with the mouseprotected booleanSet to true when there is a pending pick operationprotected booleanprotected booleanSet to true when recording.protected booleanSet to true when the surface mask should be recalculated.protected booleanSet to true when the surface has been added or modified.protected booleanFor testing the frame rate:protected booleanFlag for indicating the that Java Container is visible or not:protected floatNormalized volume extents:protected floatNormalized volume extents:protected floatNormalized volume extents:protected floatNormalized volume extents:protected intprivate intprotected intScreen capture counter.protected intPicking support:protected intPicking support:protected com.jogamp.opengl.util.AnimatorAnimator object, displays scene in rendering loop (similar to GLUTMainLoop()protected WildMagic.LibGraphics.SceneGraph.CullerCulling out-of-view objects:protected Vector<VolumeObject> protected Vector<VolumeObject> List of objects displayed in the scene.protected WildMagic.LibGraphics.Collision.PickerFor processing picking:protected WildMagic.LibFoundation.Mathematics.Matrix4fprotected WildMagic.LibFoundation.Mathematics.Vector3fScene translation, centers the scene:protected VolumeImageVolumeImage for ModelImageA, contains data and textures.protected VolumeImageprotected VolumeImageprotected VolumeImageVolumeImage for ModelImageB, contains data and textures.protected VolumeImageprotected VolumeImageprotected WindowLevelWindow-level interface.protected WildMagic.LibFoundation.Mathematics.Matrix3fBasic rotations for fixed input use:protected WildMagic.LibFoundation.Mathematics.Matrix3fBasic rotations for fixed input use:protected WildMagic.LibFoundation.Mathematics.Matrix3fBasic rotations for fixed input use:protected WildMagic.LibGraphics.Rendering.CullStateCulling: turns backface/frontface culling on/off:protected WildMagic.LibGraphics.SceneGraph.NodeScene-graph root node:private static intlogical min and max mouse values for calculations, this is the range of the normalized input valuesprivate static intlogical min and max mouse values for calculations, this is the range of the normalized input values(package private) doubleprivate static doubleused to change the speed that the 3D mouse moves the cameraprotected floatprivate static intused as cutoffs for making space navigator mouse less sensitive to the low range values that may not be intentional user inputprivate static floatused for slowing down the rate that the 3D mouse moves the image(package private) double(package private) doubleprivate static doubleholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenienceprivate static doubleholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenienceprivate static doubleholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenienceprivate static final longprivate static floatactual min and max values for the 3D mouse (the space navigator)private static floatactual min and max values for the 3D mouse (the space navigator)private static intused as cutoffs for making space navigator mouse less sensitive to the low range values that may not be intentional user inputprivate static int(package private) double(package private) doubleprivate static doubleholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenienceprivate static doubleholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenienceprivate static doubleholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenienceprotected booleanprivate booleanprivate booleanprivate static intused for fine movement checkbox in 3D mouse options(package private) WildMagic.LibFoundation.Mathematics.Vector3f(package private) float(package private) float(package private) floatFields inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
cameraParams, m_akWorldAxis, m_bCameraMoveable, m_bDArrowPressed, m_bEndPressed, m_bHomePressed, m_bLArrowPressed, m_bLInsertPressed, m_bObjectZoomed, m_bPgDnPressed, m_bPgUpPressed, m_bRArrowPressed, m_bRDeletePressed, m_bTrackBallDown, m_bUArrowPressed, m_bUseTrackBall, m_dAccumulatedTime, m_dFrameRate, m_dLastTime, m_fRotSpeed, m_fRotSpeedFactor, m_fTrnSpeed, m_fTrnSpeedFactor, m_fXDrag0, m_fXTrack0, m_fXTrack1, m_fYDrag0, m_fYTrack0, m_fYTrack1, m_fZoomSpeed, m_iAccumulatedFrameCount, m_iDoPitch, m_iDoRoll, m_iDoYaw, m_iFrameCount, m_iMaxTimer, m_iMouseButton, m_iTimer, m_kSaveRotate, m_mouseRotSpeed, m_spkCamera, m_spkMotionObject, pitchRotationAngle, rollRotationAngle, xCameraMove, xCameraTurn, yawRotationAngle, yCameraMove, yCameraTurn, zCameraMoveFields inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication
m_acWindowTitle, m_eBuffering, m_eDepth, m_eFormat, m_eMultisampling, m_eStencil, m_iHeight, m_iWidth, m_iXPosition, m_iYPosition, m_kBackgroundColor, m_pkRenderer -
Constructor Summary
ConstructorsConstructorDescriptionDefault GPURenderBase constructor.GPURenderBase(VolumeTriPlanarInterface kParent, com.jogamp.opengl.util.Animator kAnimator, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB) -
Method Summary
Modifier and TypeMethodDescriptionAddNode(WildMagic.LibGraphics.SceneGraph.Node kNode) Add a new scene-graph node to the display list.protected static voidvoiddispose()voiddispose(com.jogamp.opengl.GLAutoDrawable kDrawable) memory cleanup.voidstatic voidcom.jogamp.opengl.awt.GLCanvasReturns the GLCanvas in the m_pkRenderer object.intCalled by the doPick() method in Navigation behavior.getImage()WildMagic.LibGraphics.Rendering.Light[]floatGet the near planeSets blending between imageA and imageB.floatCalled by the NavigationBehavior to get normalized bounding box, x dimfloatCalled by the NavigationBehavior to get normalized bounding box, y dimfloatCalled by the NavigationBehavior to get normalized bounding box, z dimstatic intstatic floatWildMagic.LibFoundation.Mathematics.Matrix3fWildMagic.LibFoundation.Mathematics.Matrix4fGet the world matrix.private voidHelper method sets the values tX, tY, tZ, rX, rY, and rZ to the current space navigator values normalized on a -100 to 100 scale.WildMagic.LibFoundation.Mathematics.Vector3fstatic intstatic intstatic voidinvertRX()static voidinvertRY()static voidinvertRZ()static voidinvertTX()static voidinvertTY()static voidinvertTZ()booleanbooleanbooleanvoidPart of the KeyListener interface.voidprotected voidMove()Updates the camera and displayed objects for rendering.private floatnormalizeSpaceNavValue(float value) takes a value from the spaceNavigotorController and normalizes the value between -1 to 1 got formula from http://www.mathworks.com/matlabcentral/newsreader/view_thread/256540private doublenormalizeValue(double value, double minValue, double maxValue, double minRange, double maxRange) got this formula from the video at http://www.youtube.com/watch?static voidvoidpauseAnimator(boolean pause) private voidvoidProcesses a polled event from the space navigatorvoidvoidrecord(boolean bOn) voidreInitialize(VolumeImage kImageA, VolumeImage kImageB) RemoveNode(String kNodeName) protected voidRenderFrameRate(com.jogamp.opengl.GLAutoDrawable kDraw) Renders the frame rate to the screen.voidReset the z-axis.voidReset x-axis.voidvoidReset y-axis.voidreshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight) Part of the GLEventListener interface.private voidprivate voidprivate voidvoidSave quick time movie.voidSave AVI movie.voidsetCameraNearPlane(float distance) voidprivate voidvoidChanges the projection to Orthographic Projection.voidChanges the projection to Perspective Projection.static voidsetRotationCutoffValue(int value) static voidsetRotationScaleFactor(float rotationScaleFactor) the rotationScaleFactor is used to change how fast the camera moves around the object ranging from 1%, the slowest, to 100%, the fastestvoidSetSceneRotation(WildMagic.LibFoundation.Mathematics.Matrix3f kRotation) static voidsetTranslationCutoffValue(int value) static voidsetTranslationScaleFactor(int i) the translationScaleFactor is used to change how fast the camera moves around the object ranging from 1, the fastest, to 10, the slowestvoidsetUseMouseRotationCutoffs(boolean useMouseRotationCutoffs) voidsetUseMouseTranslationCutoffs(boolean useMouseTranslationCutoffs) voidsetVisible(boolean bVisible) Sets the currently visible flag.voidstartAnimator(boolean bRunFast) voidBuild a image with the current rotational transformation matrix.voidupdateLighting(WildMagic.LibGraphics.Rendering.Light[] akGLights) Called from JPanelLight.private voidupdateScene(WildMagic.LibFoundation.Mathematics.Matrix3f rotateMatrix) protected voidUpdates the displayed objects based on any user mouse rotation.booleanWrites a the frame buffer as a .jpg image to disk.Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
DrawFrameRate, getCameraLocation, getCameraParameters, getObjectParameters, getObjectRotation, InitializeCameraMotion, InitializeCameraMotion, InitializeObjectMotion, keyReleased, keyTyped, LookDown, LookUp, MeasureTime, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, mouseWheelMoved, MoveBackward, MoveCamera, MoveDown, MoveForward, MoveLeft, MoveObject, MoveRight, MoveUp, OnDisplay, OnInitialize, OnTerminate, ResetTime, RotateTrackBall, setCameraLocation, setCameraParameters, setObjectParameters, setObjectRotation, TurnLeft, TurnRight, UpdateCameraRotationSpeed, UpdateCameraTranslationSpeed, UpdateCameraZoomSpeed, UpdateFrameCount, UpdateMouseRotationSpeedMethods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication
GetAspectRatio, GetHeight, GetRenderer, GetWidth, GetWindowTitle, GetXPosition, GetYPosition, OnIdle, OnMove, OnPrecreate, OnResize, SetRendererMethods inherited from class WildMagic.LibApplications.OpenGLApplication.Application
reloadShaders, TestStreamingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jogamp.opengl.GLEventListener
display, initMethods inherited from interface java.awt.event.KeyListener
keyReleased, keyTypedMethods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited, mouseReleasedMethods inherited from interface java.awt.event.MouseMotionListener
mouseDragged, mouseMoved
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
m_kVolumeImageA
VolumeImage for ModelImageA, contains data and textures. -
m_kVolumeImageB
VolumeImage for ModelImageB, contains data and textures. -
hyperstack
-
hyperstackColormap
protected WildMagic.LibGraphics.Rendering.Texture hyperstackColormap -
m_kVolumeImageA_Old
-
m_kVolumeImageB_Old
-
m_kVolumeImageA_New
-
m_kVolumeImageB_New
-
m_spkScene
protected WildMagic.LibGraphics.SceneGraph.Node m_spkSceneScene-graph root node: -
m_spkCull
protected WildMagic.LibGraphics.Rendering.CullState m_spkCullCulling: turns backface/frontface culling on/off: -
m_kCuller
protected WildMagic.LibGraphics.SceneGraph.Culler m_kCullerCulling out-of-view objects: -
m_kAnimator
protected com.jogamp.opengl.util.Animator m_kAnimatorAnimator object, displays scene in rendering loop (similar to GLUTMainLoop() -
m_bInit
protected boolean m_bInitSet to true when init() is called: -
m_kTranslate
protected WildMagic.LibFoundation.Mathematics.Vector3f m_kTranslateScene translation, centers the scene: -
m_kSceneToWorld
protected WildMagic.LibFoundation.Mathematics.Matrix4f m_kSceneToWorld -
m_fX
protected float m_fXNormalized volume extents: -
m_fY
protected float m_fYNormalized volume extents: -
m_fZ
protected float m_fZNormalized volume extents: -
m_fMax
protected float m_fMaxNormalized volume extents: -
m_bVisible
protected boolean m_bVisibleFlag for indicating the that Java Container is visible or not: -
m_akLights
protected WildMagic.LibGraphics.Rendering.Light[] m_akLightsLights from JPanelLight -
m_bTestFrameRate
protected boolean m_bTestFrameRateFor testing the frame rate: -
m_kZRotate
protected WildMagic.LibFoundation.Mathematics.Matrix3f m_kZRotateBasic rotations for fixed input use: -
m_kYRotate
protected WildMagic.LibFoundation.Mathematics.Matrix3f m_kYRotateBasic rotations for fixed input use: -
m_kXRotate
protected WildMagic.LibFoundation.Mathematics.Matrix3f m_kXRotateBasic rotations for fixed input use: -
m_kDisplayList
List of objects displayed in the scene. -
m_bSurfaceUpdate
protected boolean m_bSurfaceUpdateSet to true when the surface has been added or modified. -
m_bSurfaceMaskUpdate
protected boolean m_bSurfaceMaskUpdateSet to true when the surface mask should be recalculated. -
m_bExtract
protected boolean m_bExtract -
m_bDoClip
protected boolean m_bDoClip -
m_iXPick
protected int m_iXPickPicking support: -
m_iYPick
protected int m_iYPickPicking support: -
m_bPickPending
protected boolean m_bPickPendingSet to true when there is a pending pick operation -
m_kPicker
protected WildMagic.LibGraphics.Collision.Picker m_kPickerFor processing picking: -
m_bModified
protected boolean m_bModifiedMinimizes rendering, only render when modified is true. -
m_iScreenCaptureCounter
protected int m_iScreenCaptureCounterScreen capture counter. -
m_iMovieCounter
private int m_iMovieCounter -
m_bMouseDrag
protected boolean m_bMouseDragkeeps track if the user is currently dragging with the mouse -
m_bSnapshot
protected boolean m_bSnapshotSet to true when recording. -
m_iCaptureFPS
protected int m_iCaptureFPS -
m_kDeleteList
-
updateBoundingCube
protected boolean updateBoundingCube -
nearPlane
protected float nearPlane -
mouseMax
private static int mouseMaxlogical min and max mouse values for calculations, this is the range of the normalized input values -
mouseMin
private static int mouseMinlogical min and max mouse values for calculations, this is the range of the normalized input values -
rotationScaleFactor
private static float rotationScaleFactorused for slowing down the rate that the 3D mouse moves the image -
translationScaleFactor
private static int translationScaleFactor -
translationCutoff
private static int translationCutoffused as cutoffs for making space navigator mouse less sensitive to the low range values that may not be intentional user input -
rotationCutoff
private static int rotationCutoffused as cutoffs for making space navigator mouse less sensitive to the low range values that may not be intentional user input -
mouseSpeedScaler
private static double mouseSpeedScalerused to change the speed that the 3D mouse moves the camera -
invertTX
private static int invertTXused to invert the settings of the mouse -
invertTY
private static int invertTYused to invert the settings of the mouse -
invertTZ
private static int invertTZused to invert the settings of the mouse -
invertRX
private static int invertRXused to invert the settings of the mouse -
invertRY
private static int invertRYused to invert the settings of the mouse -
invertRZ
private static int invertRZused to invert the settings of the mouse -
zD
private static int zDused for fine movement checkbox in 3D mouse options -
tX
private static double tXholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenience -
tY
private static double tYholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenience -
tZ
private static double tZholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenience -
rX
private static double rXholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenience -
rY
private static double rYholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenience -
rZ
private static double rZholds the current value of the space navigator. normalized on a -100 to 100 scale for cross platform/calculating convenience -
m_kWinLevel
Window-level interface. -
m_bFirstDrag
protected boolean m_bFirstDragChange the mouse cursor with the first mouseDrag event -
useMouseTranslationCutoffs
private boolean useMouseTranslationCutoffs -
useMouseRotationCutoffs
private boolean useMouseRotationCutoffs -
dpiScale
protected double dpiScale -
m_bDispose
protected boolean m_bDispose -
defaultVelocityTranslational
double defaultVelocityTranslational3D MOUSE MOTION CONSTANTS -
transScalar
double transScalar -
transPower
double transPower -
ZXDistanceStep
float ZXDistanceStep -
ZYDistanceStep
float ZYDistanceStep -
ZZDistanceStep
float ZZDistanceStep -
defaultVelocityRotational
double defaultVelocityRotational -
rotScalar
double rotScalar -
rotPower
double rotPower -
zVector
WildMagic.LibFoundation.Mathematics.Vector3f zVector -
currentLocation
WildMagic.LibFoundation.Mathematics.Vector3f currentLocation -
mouseRot
double mouseRot
-
-
Constructor Details
-
GPURenderBase
public GPURenderBase()Default GPURenderBase constructor. -
GPURenderBase
public GPURenderBase(VolumeTriPlanarInterface kParent, com.jogamp.opengl.util.Animator kAnimator, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB) - Parameters:
kParent-kAnimator-kVolumeImageA-kVolumeImageB-
-
-
Method Details
-
AddNode
Add a new scene-graph node to the display list.- Parameters:
kNode-
-
dispose
public void dispose()- Overrides:
disposein classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable kDrawable) memory cleanup.- Specified by:
disposein interfacecom.jogamp.opengl.GLEventListener
-
drawText
-
GetCanvas
public com.jogamp.opengl.awt.GLCanvas GetCanvas()Returns the GLCanvas in the m_pkRenderer object.- Returns:
- OpenGLRenderer.GLCanvas
-
getCounter
public int getCounter()- Returns:
- current screen capture number.
-
getImage
- Returns:
- ModelImage A.
-
getVolumeImage
- Returns:
- ModelImage A.
-
getVolumeImageB
-
GetLights
public WildMagic.LibGraphics.Rendering.Light[] GetLights()- Returns:
- the current light configuration.
-
GetNode
Sets blending between imageA and imageB.- Parameters:
fValue- the blend value (0-1)
-
getTranslate
public WildMagic.LibFoundation.Mathematics.Vector3f getTranslate()- Returns:
- translation vector center of the volume rendered scene.
-
keyPressed
Part of the KeyListener interface.- Specified by:
keyPressedin interfaceKeyListener- Overrides:
keyPressedin classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D- Parameters:
e- the key event.
-
updateScene
private void updateScene(WildMagic.LibFoundation.Mathematics.Matrix3f rotateMatrix) -
record
public void record(boolean bOn) -
reInitialize
-
RemoveNode
-
resetAxis
public void resetAxis()Reset the z-axis. -
resetAxisX
public void resetAxisX()Reset x-axis. -
resetAxisXInv
public void resetAxisXInv() -
resetAxisY
public void resetAxisY()Reset y-axis. -
reshape
public void reshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight) Part of the GLEventListener interface. Called when the GLCanvas is resized.- Specified by:
reshapein interfacecom.jogamp.opengl.GLEventListener- Parameters:
arg0- the GLCanvasiX- the new x-position in screen coordinates.iY- the new y-position in screen coordinates.iWidth- the new widthiHeight- the new height
-
saveAVIMovie
public void saveAVIMovie()Save quick time movie. -
saveQuickTimeMovie
public void saveQuickTimeMovie()Save AVI movie. -
setCameraNearPlane
public void setCameraNearPlane(float distance) -
getNearPlane
public float getNearPlane()Get the near plane -
setOrthographicProjection
public void setOrthographicProjection()Changes the projection to Orthographic Projection. -
setPerspectiveProjection
public void setPerspectiveProjection()Changes the projection to Perspective Projection. -
setVisible
public void setVisible(boolean bVisible) Sets the currently visible flag. Used when the GLCanvas is removed from the display panel or frame.- Parameters:
bVisible- set to false when the GLCanvas container is not displayed.
-
isVisible
public boolean isVisible() -
startAnimator
public void startAnimator(boolean bRunFast) -
pauseAnimator
public void pauseAnimator(boolean pause) -
updateImageFromRotation
public void updateImageFromRotation()Build a image with the current rotational transformation matrix. Step.1 convert the java3D transform matrix into a quaternion component. Step.2 convert the quaternion into image( our world ) coordinate system. Step.3 convert the quaternion into a rotatin matrix. Quaternion q ( w, x, y, z ): rotation of w around the vector ( x, y, z ); Convert the quaternion into a rotation matrix. / \ | 1-2*y^2-2*z^2 2*x*y-2*w*z 2*x*z+2*w*y | | 2*xy+2*w*z 1-2*x^2-2*z^2 2*y*z-2*w*x | | 2*x*z-2*w*y 2*y*z+2*w*x 1-2*x^2-2*y^2 | \ / Step.4 Calling the transform algorithm to extract the image. -
setDefaultLighting
public void setDefaultLighting() -
updateLighting
public void updateLighting(WildMagic.LibGraphics.Rendering.Light[] akGLights) Called from JPanelLight. Updates the lighting parameters.- Parameters:
akGLights- the set of GeneralLight objects.
-
writeImage
public boolean writeImage()Writes a the frame buffer as a .jpg image to disk. The file name is captureImage + the image number.- Returns:
- true on successful write.
-
GetSceneRotation
public WildMagic.LibFoundation.Mathematics.Matrix3f GetSceneRotation() -
Move
protected void Move()Updates the camera and displayed objects for rendering. -
RenderFrameRate
protected void RenderFrameRate(com.jogamp.opengl.GLAutoDrawable kDraw) Renders the frame rate to the screen. -
SetSceneRotation
public void SetSceneRotation(WildMagic.LibFoundation.Mathematics.Matrix3f kRotation) -
UpdateSceneRotation
protected void UpdateSceneRotation()Updates the displayed objects based on any user mouse rotation. -
getDisplayList
Called by the doPick() method in Navigation behavior.- Returns:
- the display list
-
getNormalizedXDim
public float getNormalizedXDim()Called by the NavigationBehavior to get normalized bounding box, x dim- Returns:
- normalized bounding box x component.
-
getNormalizedYDim
public float getNormalizedYDim()Called by the NavigationBehavior to get normalized bounding box, y dim- Returns:
- normalized bounding box y component.
-
getNormalizedZDim
public float getNormalizedZDim()Called by the NavigationBehavior to get normalized bounding box, z dim- Returns:
- normalized bounding box z component.
-
getSceneToWorldMatrix
public WildMagic.LibFoundation.Mathematics.Matrix4f getSceneToWorldMatrix()Get the world matrix.- Returns:
- world matrix
-
rotateAboutXAxis
private void rotateAboutXAxis() -
rotateAboutYAxis
private void rotateAboutYAxis() -
rotateAboutZAxis
private void rotateAboutZAxis() -
setMouseSpeedModifier
private void setMouseSpeedModifier() -
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
normalizeValue
private double normalizeValue(double value, double minValue, double maxValue, double minRange, double maxRange) got this formula from the video at http://www.youtube.com/watch?v=7DQMAXaiXmk- Parameters:
value-minValue-maxValue-minRange-maxRange-- Returns:
-
invertRX
public static void invertRX() -
invertRY
public static void invertRY() -
invertRZ
public static void invertRZ() -
invertTX
public static void invertTX() -
invertTY
public static void invertTY() -
invertTZ
public static void invertTZ() -
fineMovement
public static void fineMovement() -
normalMovement
public static void normalMovement() -
setTranslationCutoffValue
public static void setTranslationCutoffValue(int value) -
getTranslationCutoffValue
public static int getTranslationCutoffValue() -
setRotationCutoffValue
public static void setRotationCutoffValue(int value) -
getRotationCutoffValue
public static int getRotationCutoffValue() -
getTranslationScaleFactor
public static int getTranslationScaleFactor() -
setTranslationScaleFactor
public static void setTranslationScaleFactor(int i) the translationScaleFactor is used to change how fast the camera moves around the object ranging from 1, the fastest, to 10, the slowest -
isUseMouseTranslationCutoffs
public boolean isUseMouseTranslationCutoffs() -
setUseMouseTranslationCutoffs
public void setUseMouseTranslationCutoffs(boolean useMouseTranslationCutoffs) -
isUseMouseRotationCutoffs
public boolean isUseMouseRotationCutoffs() -
setUseMouseRotationCutoffs
public void setUseMouseRotationCutoffs(boolean useMouseRotationCutoffs) -
getRotationScaleFactor
public static float getRotationScaleFactor() -
setRotationScaleFactor
public static void setRotationScaleFactor(float rotationScaleFactor) the rotationScaleFactor is used to change how fast the camera moves around the object ranging from 1%, the slowest, to 100%, the fastest- Parameters:
rotationScaleFactor- - value must be between 0.0f and 1.0f representing the percentage to scale the raw input speed
-