org.ogre4j
Class SubEntity

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.SubEntity
All Implemented Interfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IRenderable, ISceneObjAllocatedObject, ISubEntity, INativeObject

public class SubEntity
extends NativeObject
implements ISubEntity


Nested Class Summary
 
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
  SubEntity(InstancePointer p)
          This constructor is public for internal useage only!
protected SubEntity(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  SubEntity(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 boolean _getBuffersMarkedForAnimation()
          Are buffers already marked as vertex animated?
 IVertexData _getHardwareVertexAnimVertexData()
          Advanced method to get the hardware morph vertex information
 ITempBlendedBufferInfo _getSkelAnimTempBufferInfo()
          Advanced method to get the temp buffer information for software skeletal animation.
 IVertexData _getSkelAnimVertexData()
          Advanced method to get the temporarily blended vertex information for entities which are software skinned.
 IVertexData _getSoftwareVertexAnimVertexData()
          Advanced method to get the temporarily blended software morph vertex information
 ITempBlendedBufferInfo _getVertexAnimTempBufferInfo()
          Advanced method to get the temp buffer information for software morph animation.
 void _invalidateCameraCache()
          Invalidate the camera distance cache
 void _markBuffersUnusedForAnimation()
          Mark all vertex data as so far unanimated.
 void _markBuffersUsedForAnimation()
          Mark all vertex data as animated.
 void _restoreBuffersForUnusedAnimation(boolean hardwareAnimation)
          Internal method to copy original vertex data to the morph structures should there be no active animation in use.
 void _updateCustomGpuParameter(IGpuProgramParameters.IAutoConstantEntry constantEntry, IGpuProgramParameters params)
          Overridden from to provide some custom behaviour.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 boolean getCastsShadows()
          Method which reports whether this renderable would normally cast a shadow.
 IVector4 getCustomParameter(int index)
          Gets the custom value associated with this at the given index.
 ILightList getLights()
          Gets a list of lights, ordered relative to how close they are to this renderable.
 IMaterialPtr getMaterial()
          Overridden - see .
 java.lang.String getMaterialName()
          Gets the name of the in use by this instance.
 int getNumWorldTransforms()
          Overridden - see .
 IEntity getParent()
          Accessor to get parent
 boolean getPolygonModeOverrideable()
          Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.
 void getRenderOperation(IRenderOperation op)
          Overridden - see .
 IRenderable.IRenderSystemData getRenderSystemData()
          Sets render system private data
 float getSquaredViewDepth(ICamera cam)
          Overridden, see
 ISubMesh getSubMesh()
          Accessor method to read mesh data.
 ITechnique getTechnique()
          Overridden - see .
 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.
 IVertexData getVertexDataForBinding()
           
 void getWorldTransforms(IMatrix4 xform)
          Overridden - see .
 boolean isVisible()
          Returns whether or not this is supposed to be visible.
 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.
 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 setMaterialName(java.lang.String name)
          Sets the name of the to be used.
 void setPolygonModeOverrideable(boolean override)
          Sets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.
 void setRenderSystemData(IRenderable.IRenderSystemData val)
          gets render system private data
 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 setVisible(boolean visible)
          Tells this whether to be visible or not.
 
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

SubEntity

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


SubEntity

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


SubEntity

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()
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

getMaterialName

public java.lang.String getMaterialName()
Gets the name of the in use by this instance.

Specified by:
getMaterialName in interface ISubEntity

setMaterialName

public void setMaterialName(java.lang.String name)
Sets the name of the to be used.

Specified by:
setMaterialName in interface ISubEntity

setVisible

public void setVisible(boolean visible)
Tells this whether to be visible or not.

Specified by:
setVisible in interface ISubEntity

isVisible

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

Specified by:
isVisible in interface ISubEntity

getSubMesh

public ISubMesh getSubMesh()
Accessor method to read mesh data.

Specified by:
getSubMesh in interface ISubEntity

getParent

public IEntity getParent()
Accessor to get parent

Specified by:
getParent in interface ISubEntity

getMaterial

public IMaterialPtr getMaterial()
Overridden - see .

Specified by:
getMaterial in interface IRenderable
Specified by:
getMaterial in interface ISubEntity

getTechnique

public ITechnique getTechnique()
Overridden - see .

Specified by:
getTechnique in interface IRenderable
Specified by:
getTechnique in interface ISubEntity

getRenderOperation

public void getRenderOperation(IRenderOperation op)
Overridden - see .

Specified by:
getRenderOperation in interface IRenderable
Specified by:
getRenderOperation in interface ISubEntity

getWorldTransforms

public void getWorldTransforms(IMatrix4 xform)
Overridden - see .

Specified by:
getWorldTransforms in interface IRenderable
Specified by:
getWorldTransforms in interface ISubEntity

getNumWorldTransforms

public int getNumWorldTransforms()
Overridden - see .

Specified by:
getNumWorldTransforms in interface IRenderable
Specified by:
getNumWorldTransforms in interface ISubEntity

getSquaredViewDepth

public float getSquaredViewDepth(ICamera cam)
Overridden, see

Specified by:
getSquaredViewDepth in interface IRenderable
Specified by:
getSquaredViewDepth in interface ISubEntity

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 IRenderable
Specified by:
getLights in interface ISubEntity

getCastsShadows

public boolean getCastsShadows()
Description copied from interface: IRenderable
Method which reports whether this renderable would normally cast a shadow.

Specified by:
getCastsShadows in interface IRenderable
Specified by:
getCastsShadows in interface ISubEntity

_getSkelAnimVertexData

public IVertexData _getSkelAnimVertexData()
Advanced method to get the temporarily blended vertex information for entities which are software skinned.

Specified by:
_getSkelAnimVertexData in interface ISubEntity

_getSoftwareVertexAnimVertexData

public IVertexData _getSoftwareVertexAnimVertexData()
Advanced method to get the temporarily blended software morph vertex information

Specified by:
_getSoftwareVertexAnimVertexData in interface ISubEntity

_getHardwareVertexAnimVertexData

public IVertexData _getHardwareVertexAnimVertexData()
Advanced method to get the hardware morph vertex information

Specified by:
_getHardwareVertexAnimVertexData in interface ISubEntity

_getSkelAnimTempBufferInfo

public ITempBlendedBufferInfo _getSkelAnimTempBufferInfo()
Advanced method to get the temp buffer information for software skeletal animation.

Specified by:
_getSkelAnimTempBufferInfo in interface ISubEntity

_getVertexAnimTempBufferInfo

public ITempBlendedBufferInfo _getVertexAnimTempBufferInfo()
Advanced method to get the temp buffer information for software morph animation.

Specified by:
_getVertexAnimTempBufferInfo in interface ISubEntity

getVertexDataForBinding

public IVertexData getVertexDataForBinding()
Specified by:
getVertexDataForBinding in interface ISubEntity

_markBuffersUnusedForAnimation

public void _markBuffersUnusedForAnimation()
Mark all vertex data as so far unanimated.

Specified by:
_markBuffersUnusedForAnimation in interface ISubEntity

_markBuffersUsedForAnimation

public void _markBuffersUsedForAnimation()
Mark all vertex data as animated.

Specified by:
_markBuffersUsedForAnimation in interface ISubEntity

_getBuffersMarkedForAnimation

public boolean _getBuffersMarkedForAnimation()
Are buffers already marked as vertex animated?

Specified by:
_getBuffersMarkedForAnimation in interface ISubEntity

_restoreBuffersForUnusedAnimation

public void _restoreBuffersForUnusedAnimation(boolean hardwareAnimation)
Internal method to copy original vertex data to the morph structures should there be no active animation in use.

Specified by:
_restoreBuffersForUnusedAnimation in interface ISubEntity

_updateCustomGpuParameter

public void _updateCustomGpuParameter(IGpuProgramParameters.IAutoConstantEntry constantEntry,
                                      IGpuProgramParameters params)
Overridden from to provide some custom behaviour.

Specified by:
_updateCustomGpuParameter in interface IRenderable
Specified by:
_updateCustomGpuParameter in interface ISubEntity

_invalidateCameraCache

public void _invalidateCameraCache()
Invalidate the camera distance cache

Specified by:
_invalidateCameraCache in interface ISubEntity

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

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

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

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

setUserAny

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

Specified by:
setUserAny in interface IRenderable

getUserAny

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

Specified by:
getUserAny 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.