endrov.typeMesh3d
Class Mesh3dModelExtension

java.lang.Object
  extended by endrov.typeMesh3d.Mesh3dModelExtension
All Implemented Interfaces:
Viewer3DMouseListener, Viewer3DWindowHook

public class Mesh3dModelExtension
extends java.lang.Object
implements Viewer3DWindowHook, Viewer3DMouseListener

Extension to Model Window: shows meshs


Constructor Summary
Mesh3dModelExtension()
           
 
Method Summary
 java.util.Collection<BoundingBox3D> adjustScale()
          Adjust the scale
 java.util.Collection<javax.vecmath.Vector3d> autoCenterMid()
          Give suitable center of all objects
 double autoCenterRadius(javax.vecmath.Vector3d mid)
          Given a middle position, figure out radius required to fit objects
 boolean canRender(EvObject ob)
           
 void createHook(Viewer3DWindow w)
           
 void datachangedEvent()
           
 void displayFinal(javax.media.opengl.GL glin, java.util.List<TransparentRenderer3D> transparentRenderers)
          Render graphics
 void displayInit(javax.media.opengl.GL gl)
          Prepare for rendering
static void displayMesh(Viewer3DView view, javax.media.opengl.GL glin, Mesh3D mesh, EvGLMaterial overrideMaterial, EvGLMeshVBO.MeshRenderSettings renderSettings)
           
 void displaySelect(javax.media.opengl.GL glin)
          Render for selection
 void fillMenus()
           
 EvDecimal getFirstFrame()
           
static SelMesh3D getHoveredMesh()
           
 EvDecimal getLastFrame()
           
 java.util.Collection<Mesh3D> getVisibleObjects()
           
 void initOpenGL(javax.media.opengl.GL gl)
           
static void initPlugin()
          Plugin declaration
 boolean mouseClicked(java.awt.event.MouseEvent e, javax.swing.JPopupMenu menu)
          Handle mouse click.
 boolean mouseDragged(java.awt.event.MouseEvent e, int dx, int dy)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void readPersonalConfig(org.jdom.Element e)
           
 void savePersonalConfig(org.jdom.Element e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mesh3dModelExtension

public Mesh3dModelExtension()
Method Detail

fillMenus

public void fillMenus()
Specified by:
fillMenus in interface Viewer3DWindowHook

createHook

public void createHook(Viewer3DWindow w)
Specified by:
createHook in interface Viewer3DWindowHook

readPersonalConfig

public void readPersonalConfig(org.jdom.Element e)
Specified by:
readPersonalConfig in interface Viewer3DWindowHook

savePersonalConfig

public void savePersonalConfig(org.jdom.Element e)
Specified by:
savePersonalConfig in interface Viewer3DWindowHook

datachangedEvent

public void datachangedEvent()
Specified by:
datachangedEvent in interface Viewer3DWindowHook

canRender

public boolean canRender(EvObject ob)
Specified by:
canRender in interface Viewer3DWindowHook

getVisibleObjects

public java.util.Collection<Mesh3D> getVisibleObjects()

initOpenGL

public void initOpenGL(javax.media.opengl.GL gl)
Specified by:
initOpenGL in interface Viewer3DWindowHook

displayInit

public void displayInit(javax.media.opengl.GL gl)
Prepare for rendering

Specified by:
displayInit in interface Viewer3DWindowHook

displaySelect

public void displaySelect(javax.media.opengl.GL glin)
Render for selection

Specified by:
displaySelect in interface Viewer3DWindowHook

displayFinal

public void displayFinal(javax.media.opengl.GL glin,
                         java.util.List<TransparentRenderer3D> transparentRenderers)
Render graphics

Specified by:
displayFinal in interface Viewer3DWindowHook

adjustScale

public java.util.Collection<BoundingBox3D> adjustScale()
Adjust the scale

Specified by:
adjustScale in interface Viewer3DWindowHook

autoCenterMid

public java.util.Collection<javax.vecmath.Vector3d> autoCenterMid()
Give suitable center of all objects

Specified by:
autoCenterMid in interface Viewer3DWindowHook

autoCenterRadius

public double autoCenterRadius(javax.vecmath.Vector3d mid)
Given a middle position, figure out radius required to fit objects

Specified by:
autoCenterRadius in interface Viewer3DWindowHook

getFirstFrame

public EvDecimal getFirstFrame()
Specified by:
getFirstFrame in interface Viewer3DWindowHook

getLastFrame

public EvDecimal getLastFrame()
Specified by:
getLastFrame in interface Viewer3DWindowHook

getHoveredMesh

public static SelMesh3D getHoveredMesh()

mouseClicked

public boolean mouseClicked(java.awt.event.MouseEvent e,
                            javax.swing.JPopupMenu menu)
Description copied from interface: Viewer3DMouseListener
Handle mouse click. Return true if the event is swallowed (thus the caller will not try to handle the event). A menu is provided that can be filled in with additional right-click entries

Specified by:
mouseClicked in interface Viewer3DMouseListener

mouseDragged

public boolean mouseDragged(java.awt.event.MouseEvent e,
                            int dx,
                            int dy)
Specified by:
mouseDragged in interface Viewer3DMouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface Viewer3DMouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface Viewer3DMouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface Viewer3DMouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface Viewer3DMouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface Viewer3DMouseListener

displayMesh

public static void displayMesh(Viewer3DView view,
                               javax.media.opengl.GL glin,
                               Mesh3D mesh,
                               EvGLMaterial overrideMaterial,
                               EvGLMeshVBO.MeshRenderSettings renderSettings)

initPlugin

public static void initPlugin()
Plugin declaration