VeaR/JEllipse

pl.krakow.cmuj.bioinformatics.jellipse
Class StructureRenderer

java.lang.Object
  extended by pl.krakow.cmuj.bioinformatics.jellipse.StructureRenderer
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, net.java.games.jogl.GLEventListener, Screenshottable

 class StructureRenderer
extends java.lang.Object
implements Screenshottable, net.java.games.jogl.GLEventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener


Nested Class Summary
(package private)  class StructureRenderer.wl
           
 
Field Summary
(package private)  float AdjustHeight
           
(package private)  float AdjustWidth
           
private  boolean BACKBONE_COMPLETE
           
private  boolean BACKBONE_VIRTUAL
           
(package private)  Peptide chain
           
(package private)  java.awt.image.DataBufferInt dbInt
           
private  int DLIST_PEPTIDE
           
private  Vector3 EnVec
           
private  float fogshift
           
private  float[] gray
           
private  float[] green
           
private  float[] lightAmbient
           
private  float[] lightDiffuse
           
private  float[] lightPosition
           
private  float[] lightSpecular
           
private  float modelMaxSize
           
private  float modelXcenter
           
private  float modelXmax
           
private  float modelXmin
           
private  float modelXsize
           
private  float modelYcenter
           
private  float modelYmax
           
private  float modelYmin
           
private  float modelYsize
           
private  float modelZcenter
           
private  float modelZmax
           
private  float modelZmin
           
private  float modelZsize
           
private  float offsetX
           
private  float offsetY
           
private  float offsetZ
           
private  float[] orange
           
(package private)  jEllipse owner
           
(package private)  int pbufferHeight
           
(package private)  int pbufferWidth
           
private  net.java.games.jogl.GL peptidegl
           
private  net.java.games.jogl.GLU peptideglu
           
private  float perspective_angle
           
private  int prevMouseX
           
private  int prevMouseY
           
private  float[] red
           
(package private)  float[] Rot3Current
           
(package private)  float[] Rot3Last
           
(package private)  float[] Rot4
           
private  float scalingfactor
           
private  boolean SCREENSHOTTING
           
private  Vector3 StVec
           
private  boolean UPDATING
           
private  float[] white
           
 
Constructor Summary
StructureRenderer(jEllipse owner, Peptide chain)
           
StructureRenderer(jEllipse owner, Peptide chain, float[] RotationMx)
           
 
Method Summary
 void display(net.java.games.jogl.GLDrawable drawable)
          Main rederning function.
 void displayChanged(net.java.games.jogl.GLDrawable drawable, boolean modeChanged, boolean deviceChanged)
          Rumour has it that in JoGL 1.0 not implemeted...
 float[] getRotationMatrix()
           
 java.awt.image.DataBufferInt getScreenshotBuffer()
           
 java.awt.Dimension getScreenshotDims()
           
 void init(net.java.games.jogl.GLDrawable drawable)
          Initialize OpenGL scene.
 void mouseClicked(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void mouseDragged(java.awt.event.MouseEvent e)
          Navigation with mouse.
 void mouseEntered(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void mouseExited(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void mouseMoved(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void mousePressed(java.awt.event.MouseEvent e)
          Save when clicked for dragging (=> rotating) purposes.
 void mouseReleased(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void reshape(net.java.games.jogl.GLDrawable drawable, int x, int y, int width, int height)
          Reshape and establish rendering context.
(package private)  void setBackboneComplete()
           
(package private)  void setBackboneVirtual()
           
 void setScreenshotting(java.awt.image.DataBufferInt dbInt)
           
 void updateDisplayLists()
           
(package private)  void updateProperty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

jEllipse owner

chain

Peptide chain

dbInt

java.awt.image.DataBufferInt dbInt

peptidegl

private net.java.games.jogl.GL peptidegl

peptideglu

private net.java.games.jogl.GLU peptideglu

modelXmin

private final float modelXmin

modelXmax

private final float modelXmax

modelYmin

private final float modelYmin

modelYmax

private final float modelYmax

modelZmin

private final float modelZmin

modelZmax

private final float modelZmax

modelXsize

private final float modelXsize

modelYsize

private final float modelYsize

modelZsize

private final float modelZsize

modelMaxSize

private final float modelMaxSize

modelXcenter

private final float modelXcenter

modelYcenter

private final float modelYcenter

modelZcenter

private final float modelZcenter

perspective_angle

private float perspective_angle

offsetX

private float offsetX

offsetY

private float offsetY

offsetZ

private float offsetZ

StVec

private Vector3 StVec

EnVec

private Vector3 EnVec

Rot3Last

float[] Rot3Last

Rot3Current

float[] Rot3Current

Rot4

float[] Rot4

AdjustWidth

float AdjustWidth

AdjustHeight

float AdjustHeight

prevMouseX

private int prevMouseX

prevMouseY

private int prevMouseY

scalingfactor

private float scalingfactor

fogshift

private float fogshift

lightPosition

private float[] lightPosition

white

private final float[] white

gray

private final float[] gray

green

private final float[] green

orange

private final float[] orange

red

private final float[] red

lightAmbient

private final float[] lightAmbient

lightDiffuse

private final float[] lightDiffuse

lightSpecular

private final float[] lightSpecular

DLIST_PEPTIDE

private int DLIST_PEPTIDE

SCREENSHOTTING

private boolean SCREENSHOTTING

UPDATING

private boolean UPDATING

BACKBONE_COMPLETE

private boolean BACKBONE_COMPLETE

BACKBONE_VIRTUAL

private boolean BACKBONE_VIRTUAL

pbufferWidth

int pbufferWidth

pbufferHeight

int pbufferHeight
Constructor Detail

StructureRenderer

StructureRenderer(jEllipse owner,
                  Peptide chain)

StructureRenderer

StructureRenderer(jEllipse owner,
                  Peptide chain,
                  float[] RotationMx)
Method Detail

init

public void init(net.java.games.jogl.GLDrawable drawable)
Initialize OpenGL scene.

Specified by:
init in interface net.java.games.jogl.GLEventListener
Parameters:
drawable - OpenGL area (obtained via AWT Canvas)

reshape

public void reshape(net.java.games.jogl.GLDrawable drawable,
                    int x,
                    int y,
                    int width,
                    int height)
Reshape and establish rendering context.

Specified by:
reshape in interface net.java.games.jogl.GLEventListener
Parameters:
drawable - OpenGL rendering area
x - horizontal location
y - vertical location
width - new viewport width
height - new viewport height
See Also:
display(net.java.games.jogl.GLDrawable)

display

public void display(net.java.games.jogl.GLDrawable drawable)
Main rederning function.

Specified by:
display in interface net.java.games.jogl.GLEventListener
Parameters:
drawable - OpenGL area with established rendering context

displayChanged

public void displayChanged(net.java.games.jogl.GLDrawable drawable,
                           boolean modeChanged,
                           boolean deviceChanged)
Rumour has it that in JoGL 1.0 not implemeted...

Specified by:
displayChanged in interface net.java.games.jogl.GLEventListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Save when clicked for dragging (=> rotating) purposes.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Navigation with mouse.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseExited in interface java.awt.event.MouseListener

updateDisplayLists

public void updateDisplayLists()

updateProperty

void updateProperty()

setBackboneComplete

void setBackboneComplete()

setBackboneVirtual

void setBackboneVirtual()

getScreenshotDims

public java.awt.Dimension getScreenshotDims()
Specified by:
getScreenshotDims in interface Screenshottable

getScreenshotBuffer

public java.awt.image.DataBufferInt getScreenshotBuffer()
Specified by:
getScreenshotBuffer in interface Screenshottable

setScreenshotting

public void setScreenshotting(java.awt.image.DataBufferInt dbInt)
Specified by:
setScreenshotting in interface Screenshottable

getRotationMatrix

public float[] getRotationMatrix()

VeaR/JEllipse