de.grogra.imp3d.gl20
public class GL20ResourceMesh extends 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| Modifier | Constructor and Description |
|---|---|
protected |
GL20ResourceMesh(int resourceClassType) |
| Modifier and Type | Method and Description |
|---|---|
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 |
getResourceClass, getResourceClassType, getResourceTypepublic void destroy()
GL20ResourceMeshdestroy in class GL20ResourceGL20Resourcepublic void draw()
public boolean isUpToDate()
GL20ResourceMesh is up to dateisUpToDate in class GL20Resourcetrue - this GL20ResourceMesh is up to dateGL20Resourcepublic final void setPolygonArray(PolygonArray polygonArray)
PolygonArray that contain the mesh informationpolygonArray - the PolygonArraypublic final boolean setUsedPolygonArea(int firstPolygonIndex,
int polygonCount)
PolygonArrayfirstPolygonIndex - the index of the first polygon that should usedpolygonCount - 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 usedtrue - polygon index area was successful setted.
false - at least one parameter is invalid.public void update()
GL20ResourceMeshupdate in class GL20ResourceGL20Resource