de.grogra.imp3d.glsl.utility
Class Drawable

java.lang.Object
  extended by de.grogra.imp3d.glsl.utility.Drawable
All Implemented Interfaces:
java.lang.Comparable<Drawable>

public class Drawable
extends java.lang.Object
implements java.lang.Comparable<Drawable>


Field Summary
protected  boolean asNode
           
protected  Matrix4d cachedWorldTransform
           
protected  int layer
           
protected  Shader s
           
protected  GLSLMaterial sh
           
protected  GLSLRenderable shape
           
protected  int type
           
protected  Matrix4d worldTransform
           
 
Constructor Summary
Drawable(GLSLRenderable shape, Shader s, GLSLMaterial sh, boolean asNode, int layer, Matrix34d worldTransform, Matrix34d cachedWorldTransform)
           
Drawable(GLSLRenderable shape, Shader s, GLSLMaterial sh, boolean asNode, int layer, Matrix4d worldTransform, Matrix4d cachedWorldTransform)
           
 
Method Summary
 void activateGLSLShader(OpenGLState glState, GLSLDisplay disp)
           
 void activateGLSLShader(OpenGLState glState, GLSLDisplay disp, boolean depthonly)
           
 void activateGLSLShader(OpenGLState glState, GLSLDisplay disp, boolean depthonly, boolean discard)
           
 int compareTo(Drawable o)
           
 void draw(GLSLDisplay disp, GLSLUpdateCache visit, Matrix4d worldToView, boolean normal)
           
protected  void draw(GLSLDisplay disp, OpenGLState glState)
           
 void drawAndUpdate(GLSLDisplay disp, GLSLUpdateCache visit, Matrix4d worldToView)
           
 GLSLMaterial getGLSLShader()
           
 Shader getShader()
           
 GLSLRenderable getShape()
           
 int getType()
           
 Matrix4d getWorldTransform()
           
 void init(GLSLRenderable shape, Shader s, GLSLMaterial sh, boolean asNode, int layer)
           
 void init(GLSLRenderable shape, Shader s, GLSLMaterial sh, boolean asNode, int layer, Matrix34d worldTransform, Matrix34d cachedWorldTransform)
           
 void init(GLSLRenderable shape, Shader s, GLSLMaterial sh, boolean asNode, int layer, Matrix4d worldTransform, Matrix4d cachedWorldTransform)
           
 void rebuildVolumeData(OpenGLState glState)
           
 void setGLSLShader(GLSLMaterial sh)
           
 void setShader(Shader s)
           
 void setType(int type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

asNode

protected boolean asNode

cachedWorldTransform

protected Matrix4d cachedWorldTransform

layer

protected int layer

s

protected Shader s

sh

protected GLSLMaterial sh

shape

protected GLSLRenderable shape

type

protected int type

worldTransform

protected Matrix4d worldTransform
Constructor Detail

Drawable

public Drawable(GLSLRenderable shape,
                Shader s,
                GLSLMaterial sh,
                boolean asNode,
                int layer,
                Matrix34d worldTransform,
                Matrix34d cachedWorldTransform)

Drawable

public Drawable(GLSLRenderable shape,
                Shader s,
                GLSLMaterial sh,
                boolean asNode,
                int layer,
                Matrix4d worldTransform,
                Matrix4d cachedWorldTransform)
Method Detail

activateGLSLShader

public void activateGLSLShader(OpenGLState glState,
                               GLSLDisplay disp)

activateGLSLShader

public void activateGLSLShader(OpenGLState glState,
                               GLSLDisplay disp,
                               boolean depthonly)

activateGLSLShader

public void activateGLSLShader(OpenGLState glState,
                               GLSLDisplay disp,
                               boolean depthonly,
                               boolean discard)

compareTo

public int compareTo(Drawable o)
Specified by:
compareTo in interface java.lang.Comparable<Drawable>

draw

public void draw(GLSLDisplay disp,
                 GLSLUpdateCache visit,
                 Matrix4d worldToView,
                 boolean normal)

draw

protected void draw(GLSLDisplay disp,
                    OpenGLState glState)

drawAndUpdate

public void drawAndUpdate(GLSLDisplay disp,
                          GLSLUpdateCache visit,
                          Matrix4d worldToView)

getGLSLShader

public GLSLMaterial getGLSLShader()

getShader

public Shader getShader()

getShape

public GLSLRenderable getShape()

getType

public int getType()

getWorldTransform

public Matrix4d getWorldTransform()

init

public void init(GLSLRenderable shape,
                 Shader s,
                 GLSLMaterial sh,
                 boolean asNode,
                 int layer)

init

public void init(GLSLRenderable shape,
                 Shader s,
                 GLSLMaterial sh,
                 boolean asNode,
                 int layer,
                 Matrix34d worldTransform,
                 Matrix34d cachedWorldTransform)

init

public void init(GLSLRenderable shape,
                 Shader s,
                 GLSLMaterial sh,
                 boolean asNode,
                 int layer,
                 Matrix4d worldTransform,
                 Matrix4d cachedWorldTransform)

rebuildVolumeData

public void rebuildVolumeData(OpenGLState glState)

setGLSLShader

public void setGLSLShader(GLSLMaterial sh)

setShader

public void setShader(Shader s)

setType

public void setType(int type)