org.ogre4j
Class InstancedGeometry

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.InstancedGeometry
All Implemented Interfaces:
IAllocatedObject<IGeometryAllocPolicy>, IGeometryAllocatedObject, IInstancedGeometry, INativeObject

public class InstancedGeometry
extends NativeObject
implements IInstancedGeometry


Nested Class Summary
static class InstancedGeometry.BatchInstance
           
static class InstancedGeometry.BatchInstanceIterator
           
static class InstancedGeometry.BatchInstanceMap
           
static class InstancedGeometry.GeometryBucket
           
protected static class InstancedGeometry.IndexRemap
           
static class InstancedGeometry.InstancedObject
           
static class InstancedGeometry.LODBucket
           
static class InstancedGeometry.MaterialBucket
           
static class InstancedGeometry.OptimisedSubMeshGeometry
           
static class InstancedGeometry.OptimisedSubMeshGeometryList
           
static class InstancedGeometry.QueuedGeometry
           
static class InstancedGeometry.QueuedGeometryList
           
static class InstancedGeometry.QueuedSubMesh
           
static class InstancedGeometry.QueuedSubMeshList
           
static class InstancedGeometry.QueuedSubMeshOriginList
           
static class InstancedGeometry.RenderOperationVector
           
static class InstancedGeometry.SubMeshGeometryLookup
           
static class InstancedGeometry.SubMeshLodGeometryLink
           
static class InstancedGeometry.SubMeshLodGeometryLinkList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IInstancedGeometry
IInstancedGeometry.IBatchInstance, IInstancedGeometry.IBatchInstanceIterator, IInstancedGeometry.IBatchInstanceMap, IInstancedGeometry.IGeometryBucket, IInstancedGeometry.IIndexRemap, IInstancedGeometry.IInstancedObject, IInstancedGeometry.ILODBucket, IInstancedGeometry.IMaterialBucket, IInstancedGeometry.IOptimisedSubMeshGeometry, IInstancedGeometry.IOptimisedSubMeshGeometryList, IInstancedGeometry.IQueuedGeometry, IInstancedGeometry.IQueuedGeometryList, IInstancedGeometry.IQueuedSubMesh, IInstancedGeometry.IQueuedSubMeshList, IInstancedGeometry.IQueuedSubMeshOriginList, IInstancedGeometry.IRenderOperationVector, IInstancedGeometry.ISubMeshGeometryLookup, IInstancedGeometry.ISubMeshLodGeometryLink, IInstancedGeometry.ISubMeshLodGeometryLinkList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  InstancedGeometry(InstancePointer p)
          This constructor is public for internal useage only!
protected InstancedGeometry(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  InstancedGeometry(ISceneManager owner, java.lang.String name)
           
  InstancedGeometry(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void addBatchInstance()
          Add a new batch instance
 void addEntity(IEntity ent, IVector3 position, IQuaternion orientation, IVector3 scale)
          Adds an to the static geometry.
 void addSceneNode(ISceneNode node)
          Adds all the objects attached to a and all it's children to the static geometry.
 void build()
          Build the geometry.
 void delete()
          Deletes the corresponding C++ object.
 void destroy()
          Destroys all the built geometry state (reverse of build).
 void dump(java.lang.String filename)
          Dump the contents of this to a file for diagnostic purposes.
 void finalize()
           
 IAnimationStateSet getBaseAnimationState()
           
 void getBaseSkeleton(ISkeletonPtr returnValue)
           
 ISkeletonInstance getBaseSkeletonInstance()
           
 IVector3 getBatchInstanceDimensions()
          Gets the size of a single batch of geometry.
 void getBatchInstanceIterator(IInstancedGeometry.IBatchInstanceIterator returnValue)
           
 boolean getCastShadows()
           
 java.lang.String getName()
           
 long getObjectCount()
           
 IVector3 getOrigin()
          Gets the origin of this geometry.
 float getRenderingDistance()
          Gets the distance at which batches are no longer rendered.
 IInstancedGeometry.IRenderOperationVector getRenderOperationVector()
           
 short getRenderQueueGroup()
          Gets the queue group for this entity, see setRenderQueueGroup for full details.
 float getSquaredRenderingDistance()
          Gets the squared distance at which batches are no longer rendered.
 boolean isVisible()
          Are the batches visible?
 void reset()
          Clears any of the entities / nodes added to this geometry and destroys anything which has already been built.
 void setBatchInstanceDimensions(IVector3 size)
          Sets the size of a single of geometry.
 void setCastShadows(boolean castShadows)
          Sets whether this geometry should cast shadows.
 void setOrigin(IVector3 origin)
          Sets the origin of the geometry.
 void setRenderingDistance(float dist)
          Sets the distance at which batches are no longer rendered.
 void setRenderQueueGroup(short queueID)
          Sets the render queue group this object will be rendered through.
 void setVisible(boolean visible)
          Hides or shows all the batches.
 void visitRenderables(IRenderable.IVisitor visitor, boolean debugRenderables)
           
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

InstancedGeometry

public InstancedGeometry(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


InstancedGeometry

protected InstancedGeometry(InstancePointer p,
                            boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


InstancedGeometry

public InstancedGeometry(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

InstancedGeometry

public InstancedGeometry(ISceneManager owner,
                         java.lang.String name)
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

getName

public java.lang.String getName()
Specified by:
getName in interface IInstancedGeometry

addEntity

public void addEntity(IEntity ent,
                      IVector3 position,
                      IQuaternion orientation,
                      IVector3 scale)
Adds an to the static geometry.

Specified by:
addEntity in interface IInstancedGeometry

addSceneNode

public void addSceneNode(ISceneNode node)
Adds all the objects attached to a and all it's children to the static geometry.

Specified by:
addSceneNode in interface IInstancedGeometry

build

public void build()
Build the geometry.

Specified by:
build in interface IInstancedGeometry

addBatchInstance

public void addBatchInstance()
Add a new batch instance

Specified by:
addBatchInstance in interface IInstancedGeometry

destroy

public void destroy()
Destroys all the built geometry state (reverse of build).

Specified by:
destroy in interface IInstancedGeometry

reset

public void reset()
Clears any of the entities / nodes added to this geometry and destroys anything which has already been built.

Specified by:
reset in interface IInstancedGeometry

setRenderingDistance

public void setRenderingDistance(float dist)
Sets the distance at which batches are no longer rendered.

Specified by:
setRenderingDistance in interface IInstancedGeometry

getRenderingDistance

public float getRenderingDistance()
Gets the distance at which batches are no longer rendered.

Specified by:
getRenderingDistance in interface IInstancedGeometry

getSquaredRenderingDistance

public float getSquaredRenderingDistance()
Gets the squared distance at which batches are no longer rendered.

Specified by:
getSquaredRenderingDistance in interface IInstancedGeometry

setVisible

public void setVisible(boolean visible)
Hides or shows all the batches.

Specified by:
setVisible in interface IInstancedGeometry

isVisible

public boolean isVisible()
Are the batches visible?

Specified by:
isVisible in interface IInstancedGeometry

setCastShadows

public void setCastShadows(boolean castShadows)
Sets whether this geometry should cast shadows.

Specified by:
setCastShadows in interface IInstancedGeometry

getCastShadows

public boolean getCastShadows()
Specified by:
getCastShadows in interface IInstancedGeometry

setBatchInstanceDimensions

public void setBatchInstanceDimensions(IVector3 size)
Sets the size of a single of geometry.

Specified by:
setBatchInstanceDimensions in interface IInstancedGeometry

getBatchInstanceDimensions

public IVector3 getBatchInstanceDimensions()
Gets the size of a single batch of geometry.

Specified by:
getBatchInstanceDimensions in interface IInstancedGeometry

setOrigin

public void setOrigin(IVector3 origin)
Sets the origin of the geometry.

Specified by:
setOrigin in interface IInstancedGeometry

getOrigin

public IVector3 getOrigin()
Gets the origin of this geometry.

Specified by:
getOrigin in interface IInstancedGeometry

setRenderQueueGroup

public void setRenderQueueGroup(short queueID)
Sets the render queue group this object will be rendered through.

Specified by:
setRenderQueueGroup in interface IInstancedGeometry

getRenderQueueGroup

public short getRenderQueueGroup()
Gets the queue group for this entity, see setRenderQueueGroup for full details.

Specified by:
getRenderQueueGroup in interface IInstancedGeometry

getBatchInstanceIterator

public void getBatchInstanceIterator(IInstancedGeometry.IBatchInstanceIterator returnValue)
Specified by:
getBatchInstanceIterator in interface IInstancedGeometry

getRenderOperationVector

public IInstancedGeometry.IRenderOperationVector getRenderOperationVector()
Specified by:
getRenderOperationVector in interface IInstancedGeometry

visitRenderables

public void visitRenderables(IRenderable.IVisitor visitor,
                             boolean debugRenderables)
Specified by:
visitRenderables in interface IInstancedGeometry

dump

public void dump(java.lang.String filename)
Dump the contents of this to a file for diagnostic purposes.

Specified by:
dump in interface IInstancedGeometry

getBaseSkeletonInstance

public ISkeletonInstance getBaseSkeletonInstance()
Specified by:
getBaseSkeletonInstance in interface IInstancedGeometry

getBaseSkeleton

public void getBaseSkeleton(ISkeletonPtr returnValue)
Specified by:
getBaseSkeleton in interface IInstancedGeometry

getBaseAnimationState

public IAnimationStateSet getBaseAnimationState()
Specified by:
getBaseAnimationState in interface IInstancedGeometry

getObjectCount

public long getObjectCount()
Specified by:
getObjectCount in interface IInstancedGeometry


Copyright © 2007 netAllied GmbH. All Rights Reserved.