Class SurfaceMaterialDisplay
java.lang.Object
WildMagic.LibApplications.OpenGLApplication.Application
WildMagic.LibApplications.OpenGLApplication.JavaApplication
WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
gov.nih.mipav.view.renderer.WildMagic.Render.SurfaceMaterialDisplay
- All Implemented Interfaces:
com.jogamp.opengl.GLEventListener,KeyListener,MouseListener,MouseMotionListener,MouseWheelListener,Serializable,EventListener
public class SurfaceMaterialDisplay
extends WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
implements com.jogamp.opengl.GLEventListener, KeyListener
Display component in the dialog that displays the material parameters for the surface. Allows the user to
set the Material: ambient, diffuse, specular, emissive colors and shininess.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate WildMagic.LibGraphics.Rendering.Light[]private booleanprivate booleanprivate WildMagic.LibGraphics.SceneGraph.Cullerprivate MipavLightingEffectprivate WildMagic.LibGraphics.Rendering.MaterialStateprivate WildMagic.LibGraphics.SceneGraph.Nodeprivate WildMagic.LibGraphics.SceneGraph.TriMeshprivate static final longFields 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
ConstructorsConstructorDescriptionSurfaceMaterialDisplay(WildMagic.LibGraphics.Rendering.MaterialState kMaterial, WildMagic.LibGraphics.Rendering.Light[] akLights, boolean bMain) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidCreate the scene.voiddisplay(com.jogamp.opengl.GLAutoDrawable arg0) voiddispose(com.jogamp.opengl.GLAutoDrawable arg0) com.jogamp.opengl.awt.GLCanvasReturn the GLCanvas for display.voidinit(com.jogamp.opengl.GLAutoDrawable arg0) voidreshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight) voidsetMaterial(WildMagic.LibGraphics.Rendering.MaterialState kMaterial) Set the material.voidupdateLighting(WildMagic.LibGraphics.Rendering.Light[] akGLights) Called from JPanelLight.Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
dispose, DrawFrameRate, getCameraLocation, getCameraParameters, getObjectParameters, getObjectRotation, InitializeCameraMotion, InitializeCameraMotion, InitializeObjectMotion, keyPressed, keyReleased, keyTyped, LookDown, LookUp, MeasureTime, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, 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 java.awt.event.KeyListener
keyPressed, keyReleased, keyTyped
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
m_spkScene
private WildMagic.LibGraphics.SceneGraph.Node m_spkScene -
m_spkSphere
private WildMagic.LibGraphics.SceneGraph.TriMesh m_spkSphere -
m_kCuller
private WildMagic.LibGraphics.SceneGraph.Culler m_kCuller -
m_kLightShader
-
m_pkMaterial
private WildMagic.LibGraphics.Rendering.MaterialState m_pkMaterial -
m_bInit
private boolean m_bInit -
m_akLights
private WildMagic.LibGraphics.Rendering.Light[] m_akLights -
m_bMain
private boolean m_bMain
-
-
Constructor Details
-
SurfaceMaterialDisplay
public SurfaceMaterialDisplay(WildMagic.LibGraphics.Rendering.MaterialState kMaterial, WildMagic.LibGraphics.Rendering.Light[] akLights, boolean bMain) Constructor.- Parameters:
kMaterial- materialakLights- current lights in the scenebMain- indicates if this is a large (true) or small (false) display component.
-
-
Method Details
-
display
public void display(com.jogamp.opengl.GLAutoDrawable arg0) - Specified by:
displayin interfacecom.jogamp.opengl.GLEventListener
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable arg0) - Specified by:
disposein interfacecom.jogamp.opengl.GLEventListener
-
GetCanvas
public com.jogamp.opengl.awt.GLCanvas GetCanvas()Return the GLCanvas for display.- Returns:
- GLCanvas
-
init
public void init(com.jogamp.opengl.GLAutoDrawable arg0) - Specified by:
initin interfacecom.jogamp.opengl.GLEventListener
-
reshape
public void reshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight) - Specified by:
reshapein interfacecom.jogamp.opengl.GLEventListener
-
setMaterial
public void setMaterial(WildMagic.LibGraphics.Rendering.MaterialState kMaterial) Set the material.- Parameters:
kMaterial- new material values.
-
updateLighting
public void updateLighting(WildMagic.LibGraphics.Rendering.Light[] akGLights) Called from JPanelLight. Updates the lighting parameters.- Parameters:
akGLights- the set of GeneralLight objects.
-
CreateScene
private void CreateScene()Create the scene.
-