org.ogre4j
Class BillboardSet

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.BillboardSet
All Implemented Interfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IAnimableObject, IBillboardSet, IMovableObject, IRenderable, ISceneObjAllocatedObject, IShadowCaster, INativeObject

public class BillboardSet
extends NativeObject
implements IBillboardSet


Nested Class Summary
protected static class BillboardSet.ActiveBillboardList
           
protected static class BillboardSet.BillboardPool
           
protected static class BillboardSet.FreeBillboardList
           
protected static class BillboardSet.SortByDirectionFunctor
           
protected static class BillboardSet.SortByDistanceFunctor
           
protected static class BillboardSet.TextureCoordSets
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IBillboardSet
IBillboardSet.IActiveBillboardList, IBillboardSet.IBillboardPool, IBillboardSet.IFreeBillboardList, IBillboardSet.ISortByDirectionFunctor, IBillboardSet.ISortByDistanceFunctor, IBillboardSet.ITextureCoordSets
 
Nested classes/interfaces inherited from interface org.ogre4j.IMovableObject
IMovableObject.IListener
 
Nested classes/interfaces inherited from interface org.ogre4j.IShadowCaster
IShadowCaster.IShadowRenderableList, IShadowCaster.IShadowRenderableListIterator
 
Nested classes/interfaces inherited from interface org.ogre4j.IAnimableObject
IAnimableObject.IAnimableDictionaryMap
 
Nested classes/interfaces inherited from interface org.ogre4j.IRenderable
IRenderable.ICustomParameterMap, IRenderable.IRenderSystemData, IRenderable.IVisitor
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  BillboardSet(InstancePointer p)
          This constructor is public for internal useage only!
protected BillboardSet(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  BillboardSet(java.lang.String name, long poolSize, boolean externalDataSource)
          Usual constructor - this is called by the .
  BillboardSet(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 IMovableObjectFactory _getCreator()
          Get the creator of this object, if any (internal use only)
 ILightList _getLightList()
          Returns a pointer to the current list of lights for this object.
 ISceneManager _getManager()
          Get the manager of this object, if any (internal use only)
 IMatrix4 _getParentNodeFullTransform()
           
 SortMode _getSortMode()
          Gets the sort mode of this billboard set
 void _notifyAttached(INode parent, boolean isTagPoint)
          Internal method called to notify the object that it has been attached to a node.
 void _notifyBillboardResized()
          Internal callback used by Billboards to notify their parent that they have been resized.
 void _notifyBillboardRotated()
          Internal callback used by Billboards to notify their parent that they have been rotated..
 void _notifyCreator(IMovableObjectFactory fact)
          Notify the object of it's creator (internal use only)
 void _notifyCurrentCamera(ICamera cam)
          Overridden from
 void _notifyManager(ISceneManager man)
          Notify the object of it's manager (internal use only)
 void _notifyMoved()
          Internal method called to notify the object that it has been moved.
 void _sortBillboards(ICamera cam)
          Sort the billboard set.
 void _updateBounds()
          Update the bounds of the billboardset
 void _updateCustomGpuParameter(IGpuProgramParameters.IAutoConstantEntry constantEntry, IGpuProgramParameters params)
          Update a custom constant which is derived from information only this knows.
 void _updateRenderQueue(IRenderQueue queue)
          Overridden from
 void addQueryFlags(long flags)
          As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.
 void addVisibilityFlags(long flags)
          As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object.
 void beginBillboards(int numBillboards)
          Begin injection of billboard data; applicable when constructing the for external data use.
 void clear()
          Empties this set of all billboards.
 void createAnimableValue(IAnimableValuePtr returnValue, java.lang.String valueName)
          Create a reference-counted AnimableValuePtr for the named value.
 IBillboard createBillboard(float x, float y, float z, IColourValue colour)
          Creates a new billboard and adds it to this set.
 IBillboard createBillboard(IVector3 position, IColourValue colour)
          Creates a new billboard and adds it to this set.
 void delete()
          Deletes the corresponding C++ object.
 void detatchFromParent()
          Detaches an object from a parent or , if attached.
 void endBillboards()
          Finish defining billboards.
static void extrudeVertices(IHardwareVertexBufferSharedPtr vertexBuffer, int originalVertexCount, IVector4 lightPos, float extrudeDist)
          Utility method for extruding vertices based on a light.
 void finalize()
           
 IStringVector getAnimableValueNames()
          Gets a list of animable value names for this object.
 boolean getAutoextend()
          Returns true if the billboard pool automatically extends.
 IBillboard getBillboard(long index)
          Returns a pointer to the billboard at the supplied index.
 BillboardOrigin getBillboardOrigin()
          Gets the point which acts as the origin point for all billboards in this set.
 BillboardRotationType getBillboardRotationType()
          Sets billboard rotation type.
 BillboardType getBillboardType()
          Returns the billboard type in use.
 IAxisAlignedBox getBoundingBox()
          Overridden from
 float getBoundingRadius()
          Overridden from
 boolean getCastShadows()
          Returns whether shadow casting is enabled for this object.
 boolean getCastsShadows()
          Method which reports whether this renderable would normally cast a shadow.
 IVector3 getCommonDirection()
          Gets the common direction for all billboards (BBT_ORIENTED_COMMON)
 IVector3 getCommonUpVector()
          Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF and BBT_PERPENDICULAR_COMMON)
 boolean getCullIndividually()
          Returns whether or not billboards in this are tested individually for culling.
 IVector4 getCustomParameter(int index)
          Gets the custom value associated with this at the given index.
 IAxisAlignedBox getDarkCapBounds(ILight light, float dirLightExtrusionDist)
          Overridden member from .
 float getDefaultHeight()
          See setDefaultDimensions - this gets 1 component individually.
static long getDefaultQueryFlags()
          Get the default query flags for all future instances.
static long getDefaultVisibilityFlags()
          Get the default visibility flags for all future instances.
 float getDefaultWidth()
          See setDefaultDimensions - this gets 1 component individually.
 IEdgeData getEdgeList()
          Returns details of the edges which might be used to determine a silhouette.
 IAxisAlignedBox getLightCapBounds()
          Overridden member from .
 ILightList getLights()
          Gets a list of lights, ordered relative to how close they are to this renderable.
 IMovableObject.IListener getListener()
          Gets the current listener for this object.
 IMaterialPtr getMaterial()
          Overridden from
 java.lang.String getMaterialName()
          Sets the name of the material to be used for this billboard set.
 java.lang.String getMovableType()
          Overridden from
 java.lang.String getName()
          Returns the name of this object.
 int getNumBillboards()
          Returns the number of active billboards which currently make up this set.
 int getNumWorldTransforms()
          Returns the number of world transform matrices this renderable requires.
 INode getParentNode()
          Returns the node to which this object is attached.
 ISceneNode getParentSceneNode()
          Returns the scene node to which this object is attached.
 float getPointExtrusionDistance(ILight l)
          Get the distance to extrude for a point/spot light
 boolean getPolygonModeOverrideable()
          Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.
 long getPoolSize()
          Returns the current size of the billboard pool.
 long getQueryFlags()
           
 float getRenderingDistance()
          Gets the distance at which batches are no longer rendered.
 void getRenderOperation(IRenderOperation op)
          Overridden from
 short getRenderQueueGroup()
          Gets the queue group for this entity, see setRenderQueueGroup for full details.
 IRenderable.IRenderSystemData getRenderSystemData()
          Sets render system private data
 void getShadowVolumeRenderableIterator(IShadowCaster.IShadowRenderableListIterator returnValue, ShadowTechnique shadowTechnique, ILight light, IHardwareIndexBufferSharedPtr indexBuffer, boolean extrudeVertices, float extrusionDist, long flags)
          Gets an iterator over the renderables required to render the shadow volume.
 boolean getSortingEnabled()
          Returns true if sorting of billboards is enabled based on their distance from the camera
 float getSquaredViewDepth(ICamera cam)
          Overridden, see
 ITechnique getTechnique()
          Retrieves a pointer to the this renderable object uses.
 IFloatRect getTextureCoords(IntegerPointer oNumCoords)
          returns the current texture coordinate rects in effect.
 long getTypeFlags()
          Get the 'type flags' for this .
 boolean getUseAccurateFacing()
          Gets whether or not billboards use an 'accurate' facing model based on the vector from each billboard to the camera, rather than an optimised version using just the camera direction.
 boolean getUseIdentityProjection()
          Returns whether or not to use an 'identity' projection.
 boolean getUseIdentityView()
          Returns whether or not to use an 'identity' view.
 IAny getUserAny()
          Retrieves the custom user value associated with this object.
 IUserDefinedObject getUserObject()
          Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.
 long getVisibilityFlags()
           
 boolean getVisible()
          Gets this object whether to be visible or not, if it has a renderable component.
 IAxisAlignedBox getWorldBoundingBox(boolean derive)
          Retrieves the axis-aligned bounding box for this object in world coordinates.
 ISphere getWorldBoundingSphere(boolean derive)
          Retrieves the worldspace bounding sphere for this object.
 void getWorldTransforms(IMatrix4 xform)
          Overridden from
 boolean hasEdgeList()
          Returns whether the object has a valid edge list.
 void injectBillboard(IBillboard bb)
          Define a billboard.
 boolean isAttached()
          Returns true if this object is attached to a or .
 boolean isDebugDisplayEnabled()
           
 boolean isInScene()
          Returns true if this object is attached to a or , and this / is currently in an active part of the scene graph.
 boolean isPointRenderingEnabled()
          Returns whether point rendering is enabled.
 boolean isVisible()
          Returns whether or not this object is supposed to be visible or not.
 void postRender(ISceneManager sm, IRenderSystem rsys)
          Called immediately after the has been rendered.
 boolean preRender(ISceneManager sm, IRenderSystem rsys)
          Called just prior to the being rendered.
 ILightList queryLights()
          Gets a list of lights, ordered relative to how close they are to this movable object.
 void removeBillboard(IBillboard pBill)
          Removes a billboard from the set.
 void removeBillboard(long index)
          Removes the billboard at the supplied index.
 void removeQueryFlags(long flags)
          As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object.
 void removeVisibilityFlags(long flags)
          As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object.
 void setAutoextend(boolean autoextend)
          Tells the set whether to allow automatic extension of the pool of billboards.
 void setBillboardOrigin(BillboardOrigin origin)
          Sets the point which acts as the origin point for all billboards in this set.
 void setBillboardRotationType(BillboardRotationType rotationType)
          Sets billboard rotation type.
 void setBillboardsInWorldSpace(boolean ws)
          Sets whether billboards should be treated as being in world space.
 void setBillboardType(BillboardType bbt)
          Sets the type of billboard to render.
 void setBounds(IAxisAlignedBox box, float radius)
          Set the bounds of the .
 void setCastShadows(boolean enabled)
          Sets whether or not this object will cast shadows.
 void setCommonDirection(IVector3 vec)
          Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON or BBT_PERPENDICULAR_COMMON.
 void setCommonUpVector(IVector3 vec)
          Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF or BBT_PERPENDICULAR_COMMON.
 void setCullIndividually(boolean cullIndividual)
          Sets whether culling tests billboards in this individually as well as in a group.
 void setCustomParameter(int index, IVector4 value)
          Sets a custom parameter for this , which may be used to drive calculations for this specific , like GPU program parameters.
 void setDebugDisplayEnabled(boolean enabled)
          Sets whether or not the debug display of this object is enabled.
 void setDefaultDimensions(float width, float height)
          Sets the default dimensions of the billboards in this set.
 void setDefaultHeight(float height)
          See setDefaultDimensions - this sets 1 component individually.
static void setDefaultQueryFlags(long flags)
          Set the default query flags for all future instances.
static void setDefaultVisibilityFlags(long flags)
          Set the default visibility flags for all future instances.
 void setDefaultWidth(float width)
          See setDefaultDimensions - this sets 1 component individually.
 void setListener(IMovableObject.IListener listener)
          Sets a listener for this object.
 void setMaterialName(java.lang.String name)
          Sets the name of the material to be used for this billboard set.
 void setPointRenderingEnabled(boolean enabled)
          Set whether or not the will use point rendering rather than manually generated quads.
 void setPolygonModeOverrideable(boolean override)
          Sets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.
 void setPoolSize(int size)
          Adjusts the size of the pool of billboards available in this set.
 void setQueryFlags(long flags)
          Sets the query flags for this object.
 void setRenderingDistance(float dist)
          Sets the distance at which the object is no longer rendered.
 void setRenderQueueGroup(short queueID)
          Sets the render queue group this entity will be rendered through.
 void setRenderSystemData(IRenderable.IRenderSystemData val)
          gets render system private data
 void setSortingEnabled(boolean sortenable)
          Enables sorting for this .
 void setTextureCoords(IFloatRect coords, int numCoords)
          can use custom texture coordinates for various billboards.
 void setTextureStacksAndSlices(short stacks, short slices)
          will generate texture coordinate rects as if the texture for the billboard set contained 'stacks' rows of 'slices' images each, all equal size.
 void setUseAccurateFacing(boolean acc)
          Sets whether or not billboards should use an 'accurate' facing model based on the vector from each billboard to the camera, rather than an optimised version using just the camera direction.
 void setUseIdentityProjection(boolean useIdentityProjection)
          Sets whether or not to use an 'identity' projection.
 void setUseIdentityView(boolean useIdentityView)
          Sets whether or not to use an 'identity' view.
 void setUserAny(IAny anything)
          Sets any kind of user value on this object.
 void setUserObject(IUserDefinedObject obj)
          Call this to associate your own custom user object instance with this .
 void setVisibilityFlags(long flags)
          Sets the visiblity flags for this object.
 void setVisible(boolean visible)
          Tells this object whether to be visible or not, if it has a renderable component.
 void visitRenderables(IRenderable.IVisitor visitor, boolean debugRenderables)
          Method to allow a caller to abstractly iterate over the instances that this will add to the render queue when asked, if any.
 
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

BillboardSet

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


BillboardSet

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


BillboardSet

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

BillboardSet

public BillboardSet(java.lang.String name,
                    long poolSize,
                    boolean externalDataSource)
Usual constructor - this is called by the .

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

createBillboard

public IBillboard createBillboard(IVector3 position,
                                  IColourValue colour)
Creates a new billboard and adds it to this set.

Specified by:
createBillboard in interface IBillboardSet

createBillboard

public IBillboard createBillboard(float x,
                                  float y,
                                  float z,
                                  IColourValue colour)
Creates a new billboard and adds it to this set.

Specified by:
createBillboard in interface IBillboardSet

getNumBillboards

public int getNumBillboards()
Returns the number of active billboards which currently make up this set.

Specified by:
getNumBillboards in interface IBillboardSet

setAutoextend

public void setAutoextend(boolean autoextend)
Tells the set whether to allow automatic extension of the pool of billboards.

Specified by:
setAutoextend in interface IBillboardSet

getAutoextend

public boolean getAutoextend()
Returns true if the billboard pool automatically extends.

Specified by:
getAutoextend in interface IBillboardSet

setSortingEnabled

public void setSortingEnabled(boolean sortenable)
Enables sorting for this . (default: off)

Specified by:
setSortingEnabled in interface IBillboardSet

getSortingEnabled

public boolean getSortingEnabled()
Returns true if sorting of billboards is enabled based on their distance from the camera

Specified by:
getSortingEnabled in interface IBillboardSet

setPoolSize

public void setPoolSize(int size)
Adjusts the size of the pool of billboards available in this set.

Specified by:
setPoolSize in interface IBillboardSet

getPoolSize

public long getPoolSize()
Returns the current size of the billboard pool.

Specified by:
getPoolSize in interface IBillboardSet

clear

public void clear()
Empties this set of all billboards.

Specified by:
clear in interface IBillboardSet

getBillboard

public IBillboard getBillboard(long index)
Returns a pointer to the billboard at the supplied index.

Specified by:
getBillboard in interface IBillboardSet

removeBillboard

public void removeBillboard(long index)
Removes the billboard at the supplied index.

Specified by:
removeBillboard in interface IBillboardSet

removeBillboard

public void removeBillboard(IBillboard pBill)
Removes a billboard from the set.

Specified by:
removeBillboard in interface IBillboardSet

setBillboardOrigin

public void setBillboardOrigin(BillboardOrigin origin)
Sets the point which acts as the origin point for all billboards in this set.

Specified by:
setBillboardOrigin in interface IBillboardSet

getBillboardOrigin

public BillboardOrigin getBillboardOrigin()
Gets the point which acts as the origin point for all billboards in this set.

Specified by:
getBillboardOrigin in interface IBillboardSet

setBillboardRotationType

public void setBillboardRotationType(BillboardRotationType rotationType)
Sets billboard rotation type.

Specified by:
setBillboardRotationType in interface IBillboardSet

getBillboardRotationType

public BillboardRotationType getBillboardRotationType()
Sets billboard rotation type.

Specified by:
getBillboardRotationType in interface IBillboardSet

setDefaultDimensions

public void setDefaultDimensions(float width,
                                 float height)
Sets the default dimensions of the billboards in this set.

Specified by:
setDefaultDimensions in interface IBillboardSet

setDefaultWidth

public void setDefaultWidth(float width)
See setDefaultDimensions - this sets 1 component individually.

Specified by:
setDefaultWidth in interface IBillboardSet

getDefaultWidth

public float getDefaultWidth()
See setDefaultDimensions - this gets 1 component individually.

Specified by:
getDefaultWidth in interface IBillboardSet

setDefaultHeight

public void setDefaultHeight(float height)
See setDefaultDimensions - this sets 1 component individually.

Specified by:
setDefaultHeight in interface IBillboardSet

getDefaultHeight

public float getDefaultHeight()
See setDefaultDimensions - this gets 1 component individually.

Specified by:
getDefaultHeight in interface IBillboardSet

setMaterialName

public void setMaterialName(java.lang.String name)
Sets the name of the material to be used for this billboard set.

Specified by:
setMaterialName in interface IBillboardSet

getMaterialName

public java.lang.String getMaterialName()
Sets the name of the material to be used for this billboard set.

Specified by:
getMaterialName in interface IBillboardSet

_notifyCurrentCamera

public void _notifyCurrentCamera(ICamera cam)
Overridden from

Specified by:
_notifyCurrentCamera in interface IBillboardSet
Specified by:
_notifyCurrentCamera in interface IMovableObject

beginBillboards

public void beginBillboards(int numBillboards)
Begin injection of billboard data; applicable when constructing the for external data use.

Specified by:
beginBillboards in interface IBillboardSet

injectBillboard

public void injectBillboard(IBillboard bb)
Define a billboard.

Specified by:
injectBillboard in interface IBillboardSet

endBillboards

public void endBillboards()
Finish defining billboards.

Specified by:
endBillboards in interface IBillboardSet

setBounds

public void setBounds(IAxisAlignedBox box,
                      float radius)
Set the bounds of the .

Specified by:
setBounds in interface IBillboardSet

getBoundingBox

public IAxisAlignedBox getBoundingBox()
Overridden from

Specified by:
getBoundingBox in interface IBillboardSet
Specified by:
getBoundingBox in interface IMovableObject

getBoundingRadius

public float getBoundingRadius()
Overridden from

Specified by:
getBoundingRadius in interface IBillboardSet
Specified by:
getBoundingRadius in interface IMovableObject

_updateRenderQueue

public void _updateRenderQueue(IRenderQueue queue)
Overridden from

Specified by:
_updateRenderQueue in interface IBillboardSet
Specified by:
_updateRenderQueue in interface IMovableObject

getMaterial

public IMaterialPtr getMaterial()
Overridden from

Specified by:
getMaterial in interface IBillboardSet
Specified by:
getMaterial in interface IRenderable

getRenderOperation

public void getRenderOperation(IRenderOperation op)
Overridden from

Specified by:
getRenderOperation in interface IBillboardSet
Specified by:
getRenderOperation in interface IRenderable

getWorldTransforms

public void getWorldTransforms(IMatrix4 xform)
Overridden from

Specified by:
getWorldTransforms in interface IBillboardSet
Specified by:
getWorldTransforms in interface IRenderable

_notifyBillboardResized

public void _notifyBillboardResized()
Internal callback used by Billboards to notify their parent that they have been resized.

Specified by:
_notifyBillboardResized in interface IBillboardSet

_notifyBillboardRotated

public void _notifyBillboardRotated()
Internal callback used by Billboards to notify their parent that they have been rotated..

Specified by:
_notifyBillboardRotated in interface IBillboardSet

getCullIndividually

public boolean getCullIndividually()
Returns whether or not billboards in this are tested individually for culling.

Specified by:
getCullIndividually in interface IBillboardSet

setCullIndividually

public void setCullIndividually(boolean cullIndividual)
Sets whether culling tests billboards in this individually as well as in a group.

Specified by:
setCullIndividually in interface IBillboardSet

setBillboardType

public void setBillboardType(BillboardType bbt)
Sets the type of billboard to render.

Specified by:
setBillboardType in interface IBillboardSet

getBillboardType

public BillboardType getBillboardType()
Returns the billboard type in use.

Specified by:
getBillboardType in interface IBillboardSet

setCommonDirection

public void setCommonDirection(IVector3 vec)
Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON or BBT_PERPENDICULAR_COMMON.

Specified by:
setCommonDirection in interface IBillboardSet

getCommonDirection

public IVector3 getCommonDirection()
Gets the common direction for all billboards (BBT_ORIENTED_COMMON)

Specified by:
getCommonDirection in interface IBillboardSet

setCommonUpVector

public void setCommonUpVector(IVector3 vec)
Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF or BBT_PERPENDICULAR_COMMON.

Specified by:
setCommonUpVector in interface IBillboardSet

getCommonUpVector

public IVector3 getCommonUpVector()
Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF and BBT_PERPENDICULAR_COMMON)

Specified by:
getCommonUpVector in interface IBillboardSet

setUseAccurateFacing

public void setUseAccurateFacing(boolean acc)
Sets whether or not billboards should use an 'accurate' facing model based on the vector from each billboard to the camera, rather than an optimised version using just the camera direction.

Specified by:
setUseAccurateFacing in interface IBillboardSet

getUseAccurateFacing

public boolean getUseAccurateFacing()
Gets whether or not billboards use an 'accurate' facing model based on the vector from each billboard to the camera, rather than an optimised version using just the camera direction.

Specified by:
getUseAccurateFacing in interface IBillboardSet

getMovableType

public java.lang.String getMovableType()
Overridden from

Specified by:
getMovableType in interface IBillboardSet
Specified by:
getMovableType in interface IMovableObject

getSquaredViewDepth

public float getSquaredViewDepth(ICamera cam)
Overridden, see

Specified by:
getSquaredViewDepth in interface IBillboardSet
Specified by:
getSquaredViewDepth in interface IRenderable

_updateBounds

public void _updateBounds()
Update the bounds of the billboardset

Specified by:
_updateBounds in interface IBillboardSet

getLights

public ILightList getLights()
Description copied from interface: IRenderable
Gets a list of lights, ordered relative to how close they are to this renderable.

Specified by:
getLights in interface IBillboardSet
Specified by:
getLights in interface IRenderable

visitRenderables

public void visitRenderables(IRenderable.IVisitor visitor,
                             boolean debugRenderables)
Description copied from interface: IMovableObject
Method to allow a caller to abstractly iterate over the instances that this will add to the render queue when asked, if any.

Specified by:
visitRenderables in interface IBillboardSet
Specified by:
visitRenderables in interface IMovableObject

_sortBillboards

public void _sortBillboards(ICamera cam)
Sort the billboard set. Only called when enabled via setSortingEnabled

Specified by:
_sortBillboards in interface IBillboardSet

_getSortMode

public SortMode _getSortMode()
Gets the sort mode of this billboard set

Specified by:
_getSortMode in interface IBillboardSet

setBillboardsInWorldSpace

public void setBillboardsInWorldSpace(boolean ws)
Sets whether billboards should be treated as being in world space.

Specified by:
setBillboardsInWorldSpace in interface IBillboardSet

setTextureCoords

public void setTextureCoords(IFloatRect coords,
                             int numCoords)
can use custom texture coordinates for various billboards. This is useful for selecting one of many particle images out of a tiled texture sheet, or doing flipbook animation within a single texture.

Specified by:
setTextureCoords in interface IBillboardSet

setTextureStacksAndSlices

public void setTextureStacksAndSlices(short stacks,
                                      short slices)
will generate texture coordinate rects as if the texture for the billboard set contained 'stacks' rows of 'slices' images each, all equal size. Thus, if the texture size is 512x512 and 'stacks' is 4 and 'slices' is 8, each sub-rectangle of the texture would be 128 texels tall and 64 texels wide.

Specified by:
setTextureStacksAndSlices in interface IBillboardSet

getTextureCoords

public IFloatRect getTextureCoords(IntegerPointer oNumCoords)
returns the current texture coordinate rects in effect. By default, there is only one texture coordinate rect in the set, spanning the entire texture from 0 through 1 in each direction.

Specified by:
getTextureCoords in interface IBillboardSet

setPointRenderingEnabled

public void setPointRenderingEnabled(boolean enabled)
Set whether or not the will use point rendering rather than manually generated quads.

Specified by:
setPointRenderingEnabled in interface IBillboardSet

isPointRenderingEnabled

public boolean isPointRenderingEnabled()
Returns whether point rendering is enabled.

Specified by:
isPointRenderingEnabled in interface IBillboardSet

getTypeFlags

public long getTypeFlags()
Description copied from interface: IMovableObject
Get the 'type flags' for this .

Specified by:
getTypeFlags in interface IBillboardSet
Specified by:
getTypeFlags in interface IMovableObject

_notifyCreator

public void _notifyCreator(IMovableObjectFactory fact)
Notify the object of it's creator (internal use only)

Specified by:
_notifyCreator in interface IMovableObject

_getCreator

public IMovableObjectFactory _getCreator()
Get the creator of this object, if any (internal use only)

Specified by:
_getCreator in interface IMovableObject

_notifyManager

public void _notifyManager(ISceneManager man)
Notify the object of it's manager (internal use only)

Specified by:
_notifyManager in interface IMovableObject

_getManager

public ISceneManager _getManager()
Get the manager of this object, if any (internal use only)

Specified by:
_getManager in interface IMovableObject

getName

public java.lang.String getName()
Returns the name of this object.

Specified by:
getName in interface IMovableObject

getParentNode

public INode getParentNode()
Returns the node to which this object is attached.

Specified by:
getParentNode in interface IMovableObject

getParentSceneNode

public ISceneNode getParentSceneNode()
Returns the scene node to which this object is attached.

Specified by:
getParentSceneNode in interface IMovableObject

_notifyAttached

public void _notifyAttached(INode parent,
                            boolean isTagPoint)
Internal method called to notify the object that it has been attached to a node.

Specified by:
_notifyAttached in interface IMovableObject

isAttached

public boolean isAttached()
Returns true if this object is attached to a or .

Specified by:
isAttached in interface IMovableObject

detatchFromParent

public void detatchFromParent()
Detaches an object from a parent or , if attached.

Specified by:
detatchFromParent in interface IMovableObject

isInScene

public boolean isInScene()
Returns true if this object is attached to a or , and this / is currently in an active part of the scene graph.

Specified by:
isInScene in interface IMovableObject

_notifyMoved

public void _notifyMoved()
Internal method called to notify the object that it has been moved.

Specified by:
_notifyMoved in interface IMovableObject

getWorldBoundingBox

public IAxisAlignedBox getWorldBoundingBox(boolean derive)
Retrieves the axis-aligned bounding box for this object in world coordinates.

Specified by:
getWorldBoundingBox in interface IMovableObject
Specified by:
getWorldBoundingBox in interface IShadowCaster

getWorldBoundingSphere

public ISphere getWorldBoundingSphere(boolean derive)
Retrieves the worldspace bounding sphere for this object.

Specified by:
getWorldBoundingSphere in interface IMovableObject

setVisible

public void setVisible(boolean visible)
Tells this object whether to be visible or not, if it has a renderable component.

Specified by:
setVisible in interface IMovableObject

getVisible

public boolean getVisible()
Gets this object whether to be visible or not, if it has a renderable component.

Specified by:
getVisible in interface IMovableObject

isVisible

public boolean isVisible()
Returns whether or not this object is supposed to be visible or not.

Specified by:
isVisible in interface IMovableObject

setRenderingDistance

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

Specified by:
setRenderingDistance in interface IMovableObject

getRenderingDistance

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

Specified by:
getRenderingDistance in interface IMovableObject

setUserObject

public void setUserObject(IUserDefinedObject obj)
Call this to associate your own custom user object instance with this .

Specified by:
setUserObject in interface IMovableObject

getUserObject

public IUserDefinedObject getUserObject()
Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.

Specified by:
getUserObject in interface IMovableObject

setUserAny

public void setUserAny(IAny anything)
Sets any kind of user value on this object.

Specified by:
setUserAny in interface IMovableObject
Specified by:
setUserAny in interface IRenderable

getUserAny

public IAny getUserAny()
Retrieves the custom user value associated with this object.

Specified by:
getUserAny in interface IMovableObject
Specified by:
getUserAny in interface IRenderable

setRenderQueueGroup

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

Specified by:
setRenderQueueGroup in interface IMovableObject

getRenderQueueGroup

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

Specified by:
getRenderQueueGroup in interface IMovableObject

_getParentNodeFullTransform

public IMatrix4 _getParentNodeFullTransform()
Specified by:
_getParentNodeFullTransform in interface IMovableObject

setQueryFlags

public void setQueryFlags(long flags)
Sets the query flags for this object.

Specified by:
setQueryFlags in interface IMovableObject

addQueryFlags

public void addQueryFlags(long flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.

Specified by:
addQueryFlags in interface IMovableObject

removeQueryFlags

public void removeQueryFlags(long flags)
As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object.

Specified by:
removeQueryFlags in interface IMovableObject

getQueryFlags

public long getQueryFlags()
Specified by:
getQueryFlags in interface IMovableObject

setVisibilityFlags

public void setVisibilityFlags(long flags)
Sets the visiblity flags for this object.

Specified by:
setVisibilityFlags in interface IMovableObject

addVisibilityFlags

public void addVisibilityFlags(long flags)
As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object.

Specified by:
addVisibilityFlags in interface IMovableObject

removeVisibilityFlags

public void removeVisibilityFlags(long flags)
As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object.

Specified by:
removeVisibilityFlags in interface IMovableObject

getVisibilityFlags

public long getVisibilityFlags()
Specified by:
getVisibilityFlags in interface IMovableObject

setListener

public void setListener(IMovableObject.IListener listener)
Sets a listener for this object.

Specified by:
setListener in interface IMovableObject

getListener

public IMovableObject.IListener getListener()
Gets the current listener for this object.

Specified by:
getListener in interface IMovableObject

queryLights

public ILightList queryLights()
Gets a list of lights, ordered relative to how close they are to this movable object.

Specified by:
queryLights in interface IMovableObject

_getLightList

public ILightList _getLightList()
Returns a pointer to the current list of lights for this object.

Specified by:
_getLightList in interface IMovableObject

getEdgeList

public IEdgeData getEdgeList()
Description copied from interface: IShadowCaster
Returns details of the edges which might be used to determine a silhouette.

Specified by:
getEdgeList in interface IMovableObject
Specified by:
getEdgeList in interface IShadowCaster

hasEdgeList

public boolean hasEdgeList()
Description copied from interface: IShadowCaster
Returns whether the object has a valid edge list.

Specified by:
hasEdgeList in interface IMovableObject
Specified by:
hasEdgeList in interface IShadowCaster

getShadowVolumeRenderableIterator

public void getShadowVolumeRenderableIterator(IShadowCaster.IShadowRenderableListIterator returnValue,
                                              ShadowTechnique shadowTechnique,
                                              ILight light,
                                              IHardwareIndexBufferSharedPtr indexBuffer,
                                              boolean extrudeVertices,
                                              float extrusionDist,
                                              long flags)
Description copied from interface: IShadowCaster
Gets an iterator over the renderables required to render the shadow volume.

Specified by:
getShadowVolumeRenderableIterator in interface IMovableObject
Specified by:
getShadowVolumeRenderableIterator in interface IShadowCaster

getLightCapBounds

public IAxisAlignedBox getLightCapBounds()
Overridden member from .

Specified by:
getLightCapBounds in interface IMovableObject
Specified by:
getLightCapBounds in interface IShadowCaster

getDarkCapBounds

public IAxisAlignedBox getDarkCapBounds(ILight light,
                                        float dirLightExtrusionDist)
Overridden member from .

Specified by:
getDarkCapBounds in interface IMovableObject
Specified by:
getDarkCapBounds in interface IShadowCaster

setCastShadows

public void setCastShadows(boolean enabled)
Sets whether or not this object will cast shadows.

Specified by:
setCastShadows in interface IMovableObject

getCastShadows

public boolean getCastShadows()
Returns whether shadow casting is enabled for this object.

Specified by:
getCastShadows in interface IMovableObject
Specified by:
getCastShadows in interface IShadowCaster

getPointExtrusionDistance

public float getPointExtrusionDistance(ILight l)
Get the distance to extrude for a point/spot light

Specified by:
getPointExtrusionDistance in interface IMovableObject
Specified by:
getPointExtrusionDistance in interface IShadowCaster

setDebugDisplayEnabled

public void setDebugDisplayEnabled(boolean enabled)
Sets whether or not the debug display of this object is enabled.

Specified by:
setDebugDisplayEnabled in interface IMovableObject

isDebugDisplayEnabled

public boolean isDebugDisplayEnabled()
Specified by:
isDebugDisplayEnabled in interface IMovableObject

setDefaultQueryFlags

public static void setDefaultQueryFlags(long flags)
Set the default query flags for all future instances.


getDefaultQueryFlags

public static long getDefaultQueryFlags()
Get the default query flags for all future instances.


setDefaultVisibilityFlags

public static void setDefaultVisibilityFlags(long flags)
Set the default visibility flags for all future instances.


getDefaultVisibilityFlags

public static long getDefaultVisibilityFlags()
Get the default visibility flags for all future instances.


extrudeVertices

public static void extrudeVertices(IHardwareVertexBufferSharedPtr vertexBuffer,
                                   int originalVertexCount,
                                   IVector4 lightPos,
                                   float extrudeDist)
Utility method for extruding vertices based on a light.


getAnimableValueNames

public IStringVector getAnimableValueNames()
Gets a list of animable value names for this object.

Specified by:
getAnimableValueNames in interface IAnimableObject

createAnimableValue

public void createAnimableValue(IAnimableValuePtr returnValue,
                                java.lang.String valueName)
Create a reference-counted AnimableValuePtr for the named value.

Specified by:
createAnimableValue in interface IAnimableObject

getTechnique

public ITechnique getTechnique()
Retrieves a pointer to the this renderable object uses.

Specified by:
getTechnique in interface IRenderable

preRender

public boolean preRender(ISceneManager sm,
                         IRenderSystem rsys)
Called just prior to the being rendered.

Specified by:
preRender in interface IRenderable

postRender

public void postRender(ISceneManager sm,
                       IRenderSystem rsys)
Called immediately after the has been rendered.

Specified by:
postRender in interface IRenderable

getNumWorldTransforms

public int getNumWorldTransforms()
Returns the number of world transform matrices this renderable requires.

Specified by:
getNumWorldTransforms in interface IRenderable

setUseIdentityProjection

public void setUseIdentityProjection(boolean useIdentityProjection)
Sets whether or not to use an 'identity' projection.

Specified by:
setUseIdentityProjection in interface IRenderable

getUseIdentityProjection

public boolean getUseIdentityProjection()
Returns whether or not to use an 'identity' projection.

Specified by:
getUseIdentityProjection in interface IRenderable

setUseIdentityView

public void setUseIdentityView(boolean useIdentityView)
Sets whether or not to use an 'identity' view.

Specified by:
setUseIdentityView in interface IRenderable

getUseIdentityView

public boolean getUseIdentityView()
Returns whether or not to use an 'identity' view.

Specified by:
getUseIdentityView in interface IRenderable

getCastsShadows

public boolean getCastsShadows()
Method which reports whether this renderable would normally cast a shadow.

Specified by:
getCastsShadows in interface IRenderable

setCustomParameter

public void setCustomParameter(int index,
                               IVector4 value)
Sets a custom parameter for this , which may be used to drive calculations for this specific , like GPU program parameters.

Specified by:
setCustomParameter in interface IRenderable

getCustomParameter

public IVector4 getCustomParameter(int index)
Gets the custom value associated with this at the given index.

Specified by:
getCustomParameter in interface IRenderable

_updateCustomGpuParameter

public void _updateCustomGpuParameter(IGpuProgramParameters.IAutoConstantEntry constantEntry,
                                      IGpuProgramParameters params)
Update a custom constant which is derived from information only this knows.

Specified by:
_updateCustomGpuParameter in interface IRenderable

setPolygonModeOverrideable

public void setPolygonModeOverrideable(boolean override)
Sets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.

Specified by:
setPolygonModeOverrideable in interface IRenderable

getPolygonModeOverrideable

public boolean getPolygonModeOverrideable()
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.

Specified by:
getPolygonModeOverrideable in interface IRenderable

getRenderSystemData

public IRenderable.IRenderSystemData getRenderSystemData()
Sets render system private data

Specified by:
getRenderSystemData in interface IRenderable

setRenderSystemData

public void setRenderSystemData(IRenderable.IRenderSystemData val)
gets render system private data

Specified by:
setRenderSystemData in interface IRenderable


Copyright © 2007 netAllied GmbH. All Rights Reserved.