de.grogra.imp3d.gl20
Class GL20ResourceShape

java.lang.Object
  extended by de.grogra.imp3d.gl20.GL20Resource
      extended by de.grogra.imp3d.gl20.GL20ResourceShape
Direct Known Subclasses:
GL20ResourceShapeBox, GL20ResourceShapeFrustum, GL20ResourceShapeLine, GL20ResourceShapeLineStrip, GL20ResourceShapeParallelogram, GL20ResourceShapePlane, GL20ResourceShapePolygons, GL20ResourceShapeSphere

public abstract class GL20ResourceShape
extends GL20Resource


Field Summary
 
Fields inherited from class de.grogra.imp3d.gl20.GL20Resource
GL20RESOURCE_CLASS_LIGHT, GL20RESOURCE_CLASS_MASK, GL20RESOURCE_CLASS_MESH, GL20RESOURCE_CLASS_SHADER, GL20RESOURCE_CLASS_SHADERFRAGMENT, GL20RESOURCE_CLASS_SHAPE, GL20RESOURCE_CLASS_TEXTURE, GL20RESOURCE_LIGHT_DIRECTIONAL, GL20RESOURCE_LIGHT_POINT, GL20RESOURCE_LIGHT_SPOT, GL20RESOURCE_MESH_MULTI_USER, GL20RESOURCE_MESH_SINGLE_USER, GL20RESOURCE_SHADER_PHONG, GL20RESOURCE_SHADER_RGBA, GL20RESOURCE_SHADERFRAGMENT_BLEND, GL20RESOURCE_SHADERFRAGMENT_GRAYTONE, GL20RESOURCE_SHADERFRAGMENT_RGB, GL20RESOURCE_SHAPE_BOX, GL20RESOURCE_SHAPE_FRUSTUM, GL20RESOURCE_SHAPE_LINE, GL20RESOURCE_SHAPE_LINE_STRIP, GL20RESOURCE_SHAPE_PARALLELOGRAM, GL20RESOURCE_SHAPE_PLANE, GL20RESOURCE_SHAPE_POLYGONS, GL20RESOURCE_SHAPE_SPHERE, GL20RESOURCE_TEXTURE, GL20RESOURCE_TEXTURE_CUBEMAP, GL20RESOURCE_TYPE_MASK
 
Constructor Summary
protected GL20ResourceShape(int resourceClassType)
           
 
Method Summary
 void applyGeometry()
          tell this GL20ResourceShape that it should apply the geometry to the GL20GfxServer
 void destroy()
          destroy the resource
 de.grogra.imp3d.gl20.GL20ResourceShader getShader()
          get the shader of this GL20ResourceShape
 Matrix4d getShapeTransformationMatrix()
          get the shape transformation matrix of this GL20ResourceShape
 Matrix4d getWorldTransformationMatrix()
          get the transformation matrix of this GL20ResourceShape
 boolean isUpToDate()
          check if this GL20ResourceShape is up to date.
 void setShader(de.grogra.imp3d.gl20.GL20ResourceShader shader)
          set the shader of this GL20ResourceShape
 void setShapeTransformationMatrix(Matrix4d matrix)
          set the shape transformation matrix of this GL20ResourceShape
 void setWorldTransformationMatrix(Matrix4d matrix)
          set the transformation matrix of this GL20ResourceShape
 void update()
          update the state of this GL20ResourceShape
 
Methods inherited from class de.grogra.imp3d.gl20.GL20Resource
getResourceClass, getResourceClassType, getResourceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GL20ResourceShape

protected GL20ResourceShape(int resourceClassType)
Method Detail

applyGeometry

public void applyGeometry()
tell this GL20ResourceShape that it should apply the geometry to the GL20GfxServer


destroy

public void destroy()
destroy the resource

Overrides:
destroy in class GL20Resource
See Also:
GL20Resource

getShader

public final de.grogra.imp3d.gl20.GL20ResourceShader getShader()
get the shader of this GL20ResourceShape

Returns:
the shader of this GL20ResourceShape

getShapeTransformationMatrix

public final Matrix4d getShapeTransformationMatrix()
get the shape transformation matrix of this GL20ResourceShape

Returns:
the shape transformation matrix

getWorldTransformationMatrix

public final Matrix4d getWorldTransformationMatrix()
get the transformation matrix of this GL20ResourceShape

Returns:
the transformation matrix

isUpToDate

public boolean isUpToDate()
check if this GL20ResourceShape is up to date.

Overrides:
isUpToDate in class GL20Resource
Returns:
true - this GL20ResourceShape is up to date
See Also:
GL20Resource

setShader

public final void setShader(de.grogra.imp3d.gl20.GL20ResourceShader shader)
set the shader of this GL20ResourceShape

Parameters:
shader - the shader

setShapeTransformationMatrix

public final void setShapeTransformationMatrix(Matrix4d matrix)
set the shape transformation matrix of this GL20ResourceShape

Parameters:
matrix - the shape transformation matrix

setWorldTransformationMatrix

public final void setWorldTransformationMatrix(Matrix4d matrix)
set the transformation matrix of this GL20ResourceShape

Parameters:
matrix - the transformation matrix

update

public void update()
update the state of this GL20ResourceShape

Overrides:
update in class GL20Resource
See Also:
GL20Resource