de.grogra.imp3d.gl20
Class GL20ResourceMesh

java.lang.Object
  extended by de.grogra.imp3d.gl20.GL20Resource
      extended by de.grogra.imp3d.gl20.GL20ResourceMesh
Direct Known Subclasses:
GL20ResourceMeshMultiUser, GL20ResourceMeshSingleUser

public class GL20ResourceMesh
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 GL20ResourceMesh(int resourceClassType)
           
 
Method Summary
 void destroy()
          destroy this GL20ResourceMesh
 void draw()
          draw the mesh
 boolean isUpToDate()
          check if this GL20ResourceMesh is up to date
 void setPolygonArray(PolygonArray polygonArray)
          set the PolygonArray that contain the mesh information
 boolean setUsedPolygonArea(int firstPolygonIndex, int polygonCount)
          set the polygon index area that should used from the given PolygonArray
 void update()
          update the state of this GL20ResourceMesh
 
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

GL20ResourceMesh

protected GL20ResourceMesh(int resourceClassType)
Method Detail

destroy

public void destroy()
destroy this GL20ResourceMesh

Overrides:
destroy in class GL20Resource
See Also:
GL20Resource

draw

public void draw()
draw the mesh


isUpToDate

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

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

setPolygonArray

public final void setPolygonArray(PolygonArray polygonArray)
set the PolygonArray that contain the mesh information

Parameters:
polygonArray - the PolygonArray

setUsedPolygonArea

public final boolean setUsedPolygonArea(int firstPolygonIndex,
                                        int polygonCount)
set the polygon index area that should used from the given PolygonArray

Parameters:
firstPolygonIndex - the index of the first polygon that should used
polygonCount - the number of polygons that should used start with firstPolygonIndex OR 0 when the rest of the PolygonArray should used OR a negative number n, so that all polygons starting with firstPolygonIndex and ending by polygonArray.getPolygonCount() - n will used
Returns:
true - polygon index area was successful setted. false - at least one parameter is invalid.

update

public void update()
update the state of this GL20ResourceMesh

Overrides:
update in class GL20Resource
See Also:
GL20Resource