org.ogre4j
Class StaticGeometry

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

public class StaticGeometry
extends NativeObject
implements IStaticGeometry


Nested Class Summary
static class StaticGeometry.GeometryBucket
           
protected static class StaticGeometry.IndexRemap
           
static class StaticGeometry.LODBucket
           
static class StaticGeometry.MaterialBucket
           
static class StaticGeometry.OptimisedSubMeshGeometry
           
static class StaticGeometry.OptimisedSubMeshGeometryList
           
static class StaticGeometry.QueuedGeometry
           
static class StaticGeometry.QueuedGeometryList
           
static class StaticGeometry.QueuedSubMesh
           
static class StaticGeometry.QueuedSubMeshList
           
static class StaticGeometry.Region
           
static class StaticGeometry.RegionIterator
           
static class StaticGeometry.RegionMap
           
static class StaticGeometry.SubMeshGeometryLookup
           
static class StaticGeometry.SubMeshLodGeometryLink
           
static class StaticGeometry.SubMeshLodGeometryLinkList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IStaticGeometry
IStaticGeometry.IGeometryBucket, IStaticGeometry.IIndexRemap, IStaticGeometry.ILODBucket, IStaticGeometry.IMaterialBucket, IStaticGeometry.IOptimisedSubMeshGeometry, IStaticGeometry.IOptimisedSubMeshGeometryList, IStaticGeometry.IQueuedGeometry, IStaticGeometry.IQueuedGeometryList, IStaticGeometry.IQueuedSubMesh, IStaticGeometry.IQueuedSubMeshList, IStaticGeometry.IRegion, IStaticGeometry.IRegionIterator, IStaticGeometry.IRegionMap, IStaticGeometry.ISubMeshGeometryLookup, IStaticGeometry.ISubMeshLodGeometryLink, IStaticGeometry.ISubMeshLodGeometryLinkList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  StaticGeometry(InstancePointer p)
          This constructor is public for internal useage only!
protected StaticGeometry(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  StaticGeometry(ISceneManager owner, java.lang.String name)
           
  StaticGeometry(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 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()
           
 boolean getCastShadows()
           
 java.lang.String getName()
           
 IVector3 getOrigin()
          Gets the origin of this geometry.
 IVector3 getRegionDimensions()
          Gets the size of a single batch of geometry.
 void getRegionIterator(IStaticGeometry.IRegionIterator returnValue)
           
 float getRenderingDistance()
          Gets the distance at which batches are no longer rendered.
 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 setCastShadows(boolean castShadows)
          Sets whether this geometry should cast shadows.
 void setOrigin(IVector3 origin)
          Sets the origin of the geometry.
 void setRegionDimensions(IVector3 size)
          Sets the size of a single region of 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

StaticGeometry

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


StaticGeometry

protected StaticGeometry(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.


StaticGeometry

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

StaticGeometry

public StaticGeometry(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 IStaticGeometry

addEntity

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

Specified by:
addEntity in interface IStaticGeometry

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 IStaticGeometry

build

public void build()
Build the geometry.

Specified by:
build in interface IStaticGeometry

destroy

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

Specified by:
destroy in interface IStaticGeometry

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 IStaticGeometry

setRenderingDistance

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

Specified by:
setRenderingDistance in interface IStaticGeometry

getRenderingDistance

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

Specified by:
getRenderingDistance in interface IStaticGeometry

getSquaredRenderingDistance

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

Specified by:
getSquaredRenderingDistance in interface IStaticGeometry

setVisible

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

Specified by:
setVisible in interface IStaticGeometry

isVisible

public boolean isVisible()
Are the batches visible?

Specified by:
isVisible in interface IStaticGeometry

setCastShadows

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

Specified by:
setCastShadows in interface IStaticGeometry

getCastShadows

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

setRegionDimensions

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

Specified by:
setRegionDimensions in interface IStaticGeometry

getRegionDimensions

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

Specified by:
getRegionDimensions in interface IStaticGeometry

setOrigin

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

Specified by:
setOrigin in interface IStaticGeometry

getOrigin

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

Specified by:
getOrigin in interface IStaticGeometry

setRenderQueueGroup

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

Specified by:
setRenderQueueGroup in interface IStaticGeometry

getRenderQueueGroup

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

Specified by:
getRenderQueueGroup in interface IStaticGeometry

visitRenderables

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

getRegionIterator

public void getRegionIterator(IStaticGeometry.IRegionIterator returnValue)
Specified by:
getRegionIterator in interface IStaticGeometry

dump

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

Specified by:
dump in interface IStaticGeometry


Copyright © 2007 netAllied GmbH. All Rights Reserved.