com.jme.scene.geometryinstancing
Class GeometryBatchInstance

java.lang.Object
  extended by com.jme.scene.geometryinstancing.instance.GeometryInstance<GeometryBatchInstanceAttributes>
      extended by com.jme.scene.geometryinstancing.GeometryBatchInstance

public class GeometryBatchInstance
extends GeometryInstance<GeometryBatchInstanceAttributes>

GeometryBatchInstance uses a GeometryBatchInstanceAttributes to define an instance of object in world space. Uses TriMesh as source data for the instance, instead of GeomBatch which does not have an index buffer.

Author:
Patrik Lindegrén

Field Summary
 TriMesh instanceMesh
           
(package private)  Vector3f worldVector
          Vector used to store and calculate world transformations
 
Fields inherited from class com.jme.scene.geometryinstancing.instance.GeometryInstance
attributes
 
Constructor Summary
GeometryBatchInstance(TriMesh sourceBatch, GeometryBatchInstanceAttributes attributes)
           
 
Method Summary
 void commit(TriMesh mesh)
          Uses the instanceAttributes to transform the instanceBatch into world coordinates.
 int getNumIndices()
           
 int getNumVerts()
           
 
Methods inherited from class com.jme.scene.geometryinstancing.instance.GeometryInstance
getAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instanceMesh

public TriMesh instanceMesh

worldVector

Vector3f worldVector
Vector used to store and calculate world transformations

Constructor Detail

GeometryBatchInstance

public GeometryBatchInstance(TriMesh sourceBatch,
                             GeometryBatchInstanceAttributes attributes)
Method Detail

commit

public void commit(TriMesh mesh)
Uses the instanceAttributes to transform the instanceBatch into world coordinates. The transformed instance mesh is added to the mesh.

Specified by:
commit in class GeometryInstance<GeometryBatchInstanceAttributes>
Parameters:
mesh -

getNumIndices

public int getNumIndices()
Specified by:
getNumIndices in class GeometryInstance<GeometryBatchInstanceAttributes>

getNumVerts

public int getNumVerts()
Specified by:
getNumVerts in class GeometryInstance<GeometryBatchInstanceAttributes>