org.ogre4j
Class Mesh

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Mesh
All Implemented Interfaces:
IAllocatedObject<IResourceAllocPolicy>, IMesh, IResource, IResourceAllocatedObject, IStringInterface, INativeObject

public class Mesh
extends NativeObject
implements IMesh


Nested Class Summary
protected static class Mesh.AnimationList
           
static class Mesh.BoneAssignmentIterator
           
static class Mesh.ConstPoseIterator
           
static class Mesh.IndexMap
           
static class Mesh.LodDistanceList
           
protected static class Mesh.MeshLodUsageList
           
static class Mesh.PoseIterator
           
static class Mesh.SubMeshIterator
           
static class Mesh.SubMeshList
           
static class Mesh.SubMeshNameMap
           
static class Mesh.VertexBoneAssignmentList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IMesh
IMesh.IAnimationList, IMesh.IBoneAssignmentIterator, IMesh.IConstPoseIterator, IMesh.IIndexMap, IMesh.ILodDistanceList, IMesh.IMeshLodUsageList, IMesh.IPoseIterator, IMesh.ISubMeshIterator, IMesh.ISubMeshList, IMesh.ISubMeshNameMap, IMesh.IVertexBoneAssignmentList
 
Nested classes/interfaces inherited from interface org.ogre4j.IResource
IResource.IListener, IResource.IListenerList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Mesh(InstancePointer p)
          This constructor is public for internal useage only!
protected Mesh(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Mesh(IResourceManager creator, java.lang.String name, long handle, java.lang.String group, boolean isManual, IManualResourceLoader loader)
          Default constructor - used by
  Mesh(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _compileBoneAssignments()
          Internal method, be called once to compile bone assignments into geometry buffer.
 void _determineAnimationTypes()
          Internal method which, if animation types have not been determined, scans any vertex animations and determines the type for each set of vertex data (cannot have 2 different types).
 void _dirtyState()
          Manually mark the state of this resource as having been changed.
 void _fireBackgroundLoadingComplete()
          Firing of background loading complete event
 void _fireBackgroundPreparingComplete()
          Firing of background preparing complete event
 IAnimation _getAnimationImpl(java.lang.String name)
          Internal access to the named vertex object - returns null if it does not exist.
 boolean _getAnimationTypesDirty()
          Are the derived animation types out of date?
 int _getSubMeshIndex(java.lang.String name)
          Gets the index of a submesh with a given name.
 void _initAnimationState(IAnimationStateSet animSet)
          Initialise an animation set suitable for use with this mesh.
 void _notifyOrigin(java.lang.String origin)
           
 void _notifySkeleton(ISkeletonPtr pSkel)
          Internal notification, used to tell the which to use without loading it.
 int _rationaliseBoneAssignments(int vertexCount, IMesh.IVertexBoneAssignmentList assignments)
          Rationalises the passed in bone assignment list.
 void _refreshAnimationState(IAnimationStateSet animSet)
          Refresh an animation set suitable for use with this mesh.
 void _setBoundingSphereRadius(float radius)
          Manually set the bounding radius.
 void _setBounds(IAxisAlignedBox bounds, boolean pad)
          Manually set the bounding box for this .
 void _setLodInfo(int numLevels, boolean isManual)
          Internal methods for loading LOD, do not use.
 void _setLodUsage(int level, IMeshLodUsage usage)
          Internal methods for loading LOD, do not use.
 void _setSubMeshLodFaceList(int subIdx, int level, IIndexData facedata)
          Internal methods for loading LOD, do not use.
 void _updateCompiledBoneAssignments()
          Internal method, be called once to update the compiled bone assignments.
 void addBoneAssignment(IVertexBoneAssignment_s vertBoneAssign)
          Assigns a vertex to a bone with a given weight, for skeletal animation.
 void addListener(IResource.IListener lis)
          Register a listener on this resource.
 void buildEdgeList()
          Builds an edge list for this mesh, which can be used for generating a shadow volume among other things.
 void buildTangentVectors(VertexElementSemantic targetSemantic, int sourceTexCoordSet, int index, boolean splitMirrored, boolean splitRotated, boolean storeParityInW)
          This method builds a set of tangent vectors for a given mesh into a 3D texture coordinate buffer.
 void changeGroupOwnership(java.lang.String newGroup)
          Change the resource group ownership of a .
static void cleanupDictionary()
          Cleans up the static 'msDictionary' required to reset , otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the implementers (e.g. ) initializes.
 void clearBoneAssignments()
          Removes all bone assignments for this mesh.
 void clone(IMeshPtr returnValue, java.lang.String newName, java.lang.String newGroup)
          Makes a copy of this mesh object and gives it a new name.
 void copyParametersTo(IStringInterface dest)
          Method for copying this object's parameters to another object.
 IAnimation createAnimation(java.lang.String name, float length)
          Creates a new object for vertex animating this mesh.
 void createManualLodLevel(float fromDepth, java.lang.String meshName)
          Adds a new manual level-of-detail entry to this .
 IPose createPose(int target, java.lang.String name)
          Create a new for this mesh or one of its submeshes.
 ISubMesh createSubMesh()
          Creates a new .
 ISubMesh createSubMesh(java.lang.String name)
          Creates a new and gives it a name
 void delete()
          Deletes the corresponding C++ object.
 void escalateLoading()
          Escalates the loading of a background loaded resource.
 void finalize()
           
 void freeEdgeList()
          Destroys and frees the edge lists this mesh has built.
 void generateLodLevels(IMesh.ILodDistanceList lodDistances, ProgressiveMesh.VertexReductionQuota reductionMethod, float reductionValue)
          Automatically generates lower level of detail versions of this mesh for use when a simpler version of the model is acceptable for rendering.
 IAnimation getAnimation(int index)
          Gets a single morph animation by index.
 IAnimation getAnimation(java.lang.String name)
          Returns the named vertex object.
 boolean getAutoBuildEdgeLists()
          Sets whether or not this should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided.
 void getBoneAssignmentIterator(IMesh.IBoneAssignmentIterator returnValue)
          Gets an iterator for access all bone assignments.
 IMesh.IVertexBoneAssignmentList getBoneAssignments()
          Gets a const reference to the list of bone assignments
 float getBoundingSphereRadius()
          Gets the radius of the bounding sphere surrounding this mesh.
 IAxisAlignedBox getBounds()
          Get the axis-aligned bounding box for this mesh.
 IResourceManager getCreator()
           
 IEdgeData getEdgeList_const(long lodIndex)
           
 IEdgeData getEdgeList(long lodIndex)
          Return the edge list for this mesh, building it if required.
 java.lang.String getGroup()
           
 long getHandle()
           
 HardwareBuffer.Usage getIndexBufferUsage()
          Gets the usage setting for this meshes index buffers.
 Resource.LoadingState getLoadingState()
          Returns the current loading state.
 int getLodIndex(float depth)
          Retrieves the level of detail index for the given depth value.
 int getLodIndexSquaredDepth(float squaredDepth)
          Retrieves the level of detail index for the given squared depth value.
 IMeshLodUsage getLodLevel(int index)
          Gets details of the numbered level of detail entry.
 java.lang.String getName()
          Gets resource name.
 int getNumAnimations()
          Gets the number of morph animations in this mesh.
 int getNumLodLevels()
          Returns the number of levels of detail that this mesh supports.
 int getNumSubMeshes()
          Gets the number of sub meshes which comprise this mesh.
 java.lang.String getOrigin()
          Get the origin of this resource, e.g. a script file name.
 IParamDictionary getParamDictionary_const()
           
 IParamDictionary getParamDictionary()
          Retrieves the parameter dictionary for this class.
 java.lang.String getParameter(java.lang.String name)
          Generic parameter retrieval method.
 IParameterList getParameters()
          Retrieves a list of parameters valid for this object.
 IPose getPose(int index)
          Retrieve an existing by index.
 IPose getPose(java.lang.String name)
          Retrieve an existing by name.
 int getPoseCount()
          Get the number of poses.
 void getPoseIterator_const(IMesh.IConstPoseIterator returnValue)
           
 void getPoseIterator(IMesh.IPoseIterator returnValue)
          Get an iterator over all the poses defined.
 IPoseList getPoseList()
          Get pose list
 void getsharedBlendIndexToBoneIndexMap(IMesh.IIndexMap returnValue)
           
 IVertexData getsharedVertexData()
           
 VertexAnimationType getSharedVertexDataAnimationType()
          Gets the type of vertex animation the shared vertex data of this mesh supports.
 int getSize()
          Retrieves info about the size of the resource.
 ISkeletonPtr getSkeleton()
          Gets a pointer to any linked .
 java.lang.String getSkeletonName()
          Gets the name of any linked
 int getStateCount()
          Returns the number of times this resource has changed state, which generally means the number of times it has been loaded.
 ISubMesh getSubMesh(int index)
          Gets a pointer to the submesh indicated by the index.
 ISubMesh getSubMesh(java.lang.String name)
          Gets a by name
 void getSubMeshIterator(IMesh.ISubMeshIterator returnValue)
           
 IMesh.ISubMeshNameMap getSubMeshNameMap()
          Gets a reference to the optional name assignments of the SubMeshes.
 HardwareBuffer.Usage getVertexBufferUsage()
          Gets the usage setting for this meshes vertex buffers.
 IVertexData getVertexDataByTrackHandle(int handle)
          Gets a pointer to a vertex data element based on a morph animation track handle.
 boolean hasAnimation(java.lang.String name)
          Returns whether this mesh contains the named vertex animation.
 boolean hasSkeleton()
          Returns true if this has a linked .
 boolean hasVertexAnimation()
          Returns whether or not this mesh has some kind of vertex animation.
 boolean isBackgroundLoaded()
          Returns whether this has been earmarked for background loading.
 boolean isEdgeListBuilt()
          Returns whether this mesh has an attached edge list.
 boolean isIndexBufferShadowed()
          Gets whether or not this meshes index buffers are shadowed.
 boolean isLoaded()
          Returns true if the has been loaded, false otherwise.
 boolean isLoading()
          Returns whether the resource is currently in the process of background loading.
 boolean isLodManual()
          Returns true if this mesh is using manual LOD.
 boolean isManuallyLoaded()
          Is this resource manually loaded?
 boolean isPrepared()
          Returns true if the has been prepared, false otherwise.
 boolean isPreparedForShadowVolumes()
          Returns whether this mesh has already had it's geometry prepared for use in rendering shadow volumes.
 boolean isReloadable()
          Returns true if the is reloadable, false otherwise.
 boolean isVertexBufferShadowed()
          Gets whether or not this meshes vertex buffers are shadowed.
 void load(boolean backgroundThread)
          Loads the resource, if it is not already.
 void nameSubMesh(java.lang.String name, int index)
          Gives a name to a
 void prepare()
          Prepares the resource for load, if it is not already.
 void prepareForShadowVolume()
          This method prepares the mesh for generating a renderable shadow volume.
static void prepareMatricesForVertexBlend(NativeObjectPointer<IMatrix4> blendMatrices, IMatrix4 boneMatrices, IMesh.IIndexMap indexMap)
          Prepare matrices for software indexed vertex blend.
 void reload()
          Reloads the resource, if it is already loaded.
 void removeAllAnimations()
          Removes all morph Animations from this mesh.
 void removeAllPoses()
          Destroy all poses
 void removeAnimation(java.lang.String name)
          Removes vertex from this mesh.
 void removeListener(IResource.IListener lis)
          Remove a listener on this resource.
 void removeLodLevels()
          Removes all LOD data from this .
 void removePose(int index)
          Destroy a pose by index.
 void removePose(java.lang.String name)
          Destroy a pose by name.
 void setAutoBuildEdgeLists(boolean autobuild)
          Sets whether or not this should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided.
 void setBackgroundLoaded(boolean bl)
          Tells the resource whether it is background loaded or not.
 void setIndexBufferPolicy(HardwareBuffer.Usage usage, boolean shadowBuffer)
          Sets the policy for the index buffers to be used when loading this .
 boolean setParameter(java.lang.String name, java.lang.String value)
          Generic parameter setting method.
 void setParameterList(INameValuePairList paramList)
          Generic multiple parameter setting method.
 void setsharedBlendIndexToBoneIndexMap(IMesh.IIndexMap _jni_value_)
           
 void setsharedVertexData(IVertexData _jni_value_)
           
 void setSkeletonName(java.lang.String skelName)
          Sets the name of the skeleton this uses for animation.
 void setVertexBufferPolicy(HardwareBuffer.Usage usage, boolean shadowBuffer)
          Sets the policy for the vertex buffers to be used when loading this .
static void softwareVertexBlend(IVertexData sourceVertexData, IVertexData targetVertexData, NativeObjectPointer<IMatrix4> blendMatrices, int numMatrices, boolean blendNormals)
          Performs a software indexed vertex blend, of the kind used for skeletal animation although it can be used for other purposes.
static void softwareVertexMorph(float t, IHardwareVertexBufferSharedPtr b1, IHardwareVertexBufferSharedPtr b2, IVertexData targetVertexData)
          Performs a software vertex morph, of the kind used for morph animation although it can be used for other purposes.
static void softwareVertexPoseBlend(float weight, Imap<java.lang.Integer,IVector3> vertexOffsetMap, IVertexData targetVertexData)
          Performs a software vertex pose blend, of the kind used for morph animation although it can be used for other purposes.
 boolean suggestTangentVectorBuildParams(VertexElementSemantic targetSemantic, IntegerPointer outSourceCoordSet, IntegerPointer outIndex)
          Ask the mesh to suggest parameters to a future buildTangentVectors call, should you wish to use texture coordinates to store the tangents.
 void touch()
          'Touches' the resource to indicate it has been used.
 void unload()
          Unloads the resource; this is not permanent, the resource can be reloaded later if required.
 void updateManualLodLevel(int index, java.lang.String meshName)
          Changes the alternate mesh to use as a manual LOD at the given index.
 void updateMaterialForAllSubMeshes()
          Iterates through all submeshes and requests them to apply their texture aliases to the material they use.
 
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

Mesh

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


Mesh

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


Mesh

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Mesh

public Mesh(IResourceManager creator,
            java.lang.String name,
            long handle,
            java.lang.String group,
            boolean isManual,
            IManualResourceLoader loader)
Default constructor - used by

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

createSubMesh

public ISubMesh createSubMesh()
Creates a new .

Specified by:
createSubMesh in interface IMesh

createSubMesh

public ISubMesh createSubMesh(java.lang.String name)
Creates a new and gives it a name

Specified by:
createSubMesh in interface IMesh

nameSubMesh

public void nameSubMesh(java.lang.String name,
                        int index)
Gives a name to a

Specified by:
nameSubMesh in interface IMesh

_getSubMeshIndex

public int _getSubMeshIndex(java.lang.String name)
Gets the index of a submesh with a given name.

Specified by:
_getSubMeshIndex in interface IMesh

getNumSubMeshes

public int getNumSubMeshes()
Gets the number of sub meshes which comprise this mesh.

Specified by:
getNumSubMeshes in interface IMesh

getSubMesh

public ISubMesh getSubMesh(int index)
Gets a pointer to the submesh indicated by the index.

Specified by:
getSubMesh in interface IMesh

getSubMesh

public ISubMesh getSubMesh(java.lang.String name)
Gets a by name

Specified by:
getSubMesh in interface IMesh

getSubMeshIterator

public void getSubMeshIterator(IMesh.ISubMeshIterator returnValue)
Specified by:
getSubMeshIterator in interface IMesh

clone

public void clone(IMeshPtr returnValue,
                  java.lang.String newName,
                  java.lang.String newGroup)
Makes a copy of this mesh object and gives it a new name.

Specified by:
clone in interface IMesh

getBounds

public IAxisAlignedBox getBounds()
Get the axis-aligned bounding box for this mesh.

Specified by:
getBounds in interface IMesh

getBoundingSphereRadius

public float getBoundingSphereRadius()
Gets the radius of the bounding sphere surrounding this mesh.

Specified by:
getBoundingSphereRadius in interface IMesh

_setBounds

public void _setBounds(IAxisAlignedBox bounds,
                       boolean pad)
Manually set the bounding box for this .

Specified by:
_setBounds in interface IMesh

_setBoundingSphereRadius

public void _setBoundingSphereRadius(float radius)
Manually set the bounding radius.

Specified by:
_setBoundingSphereRadius in interface IMesh

setSkeletonName

public void setSkeletonName(java.lang.String skelName)
Sets the name of the skeleton this uses for animation.

Specified by:
setSkeletonName in interface IMesh

hasSkeleton

public boolean hasSkeleton()
Returns true if this has a linked .

Specified by:
hasSkeleton in interface IMesh

hasVertexAnimation

public boolean hasVertexAnimation()
Returns whether or not this mesh has some kind of vertex animation.

Specified by:
hasVertexAnimation in interface IMesh

getSkeleton

public ISkeletonPtr getSkeleton()
Gets a pointer to any linked .

Specified by:
getSkeleton in interface IMesh

getSkeletonName

public java.lang.String getSkeletonName()
Gets the name of any linked

Specified by:
getSkeletonName in interface IMesh

_initAnimationState

public void _initAnimationState(IAnimationStateSet animSet)
Initialise an animation set suitable for use with this mesh.

Specified by:
_initAnimationState in interface IMesh

_refreshAnimationState

public void _refreshAnimationState(IAnimationStateSet animSet)
Refresh an animation set suitable for use with this mesh.

Specified by:
_refreshAnimationState in interface IMesh

addBoneAssignment

public void addBoneAssignment(IVertexBoneAssignment_s vertBoneAssign)
Assigns a vertex to a bone with a given weight, for skeletal animation.

Specified by:
addBoneAssignment in interface IMesh

clearBoneAssignments

public void clearBoneAssignments()
Removes all bone assignments for this mesh.

Specified by:
clearBoneAssignments in interface IMesh

_notifySkeleton

public void _notifySkeleton(ISkeletonPtr pSkel)
Internal notification, used to tell the which to use without loading it.

Specified by:
_notifySkeleton in interface IMesh

getBoneAssignmentIterator

public void getBoneAssignmentIterator(IMesh.IBoneAssignmentIterator returnValue)
Gets an iterator for access all bone assignments.

Specified by:
getBoneAssignmentIterator in interface IMesh

getBoneAssignments

public IMesh.IVertexBoneAssignmentList getBoneAssignments()
Gets a const reference to the list of bone assignments

Specified by:
getBoneAssignments in interface IMesh

generateLodLevels

public void generateLodLevels(IMesh.ILodDistanceList lodDistances,
                              ProgressiveMesh.VertexReductionQuota reductionMethod,
                              float reductionValue)
Automatically generates lower level of detail versions of this mesh for use when a simpler version of the model is acceptable for rendering.

Specified by:
generateLodLevels in interface IMesh

getNumLodLevels

public int getNumLodLevels()
Returns the number of levels of detail that this mesh supports.

Specified by:
getNumLodLevels in interface IMesh

getLodLevel

public IMeshLodUsage getLodLevel(int index)
Gets details of the numbered level of detail entry.

Specified by:
getLodLevel in interface IMesh

createManualLodLevel

public void createManualLodLevel(float fromDepth,
                                 java.lang.String meshName)
Adds a new manual level-of-detail entry to this .

Specified by:
createManualLodLevel in interface IMesh

updateManualLodLevel

public void updateManualLodLevel(int index,
                                 java.lang.String meshName)
Changes the alternate mesh to use as a manual LOD at the given index.

Specified by:
updateManualLodLevel in interface IMesh

getLodIndex

public int getLodIndex(float depth)
Retrieves the level of detail index for the given depth value.

Specified by:
getLodIndex in interface IMesh

getLodIndexSquaredDepth

public int getLodIndexSquaredDepth(float squaredDepth)
Retrieves the level of detail index for the given squared depth value.

Specified by:
getLodIndexSquaredDepth in interface IMesh

isLodManual

public boolean isLodManual()
Returns true if this mesh is using manual LOD.

Specified by:
isLodManual in interface IMesh

_setLodInfo

public void _setLodInfo(int numLevels,
                        boolean isManual)
Internal methods for loading LOD, do not use.

Specified by:
_setLodInfo in interface IMesh

_setLodUsage

public void _setLodUsage(int level,
                         IMeshLodUsage usage)
Internal methods for loading LOD, do not use.

Specified by:
_setLodUsage in interface IMesh

_setSubMeshLodFaceList

public void _setSubMeshLodFaceList(int subIdx,
                                   int level,
                                   IIndexData facedata)
Internal methods for loading LOD, do not use.

Specified by:
_setSubMeshLodFaceList in interface IMesh

removeLodLevels

public void removeLodLevels()
Removes all LOD data from this .

Specified by:
removeLodLevels in interface IMesh

setVertexBufferPolicy

public void setVertexBufferPolicy(HardwareBuffer.Usage usage,
                                  boolean shadowBuffer)
Sets the policy for the vertex buffers to be used when loading this .

Specified by:
setVertexBufferPolicy in interface IMesh

setIndexBufferPolicy

public void setIndexBufferPolicy(HardwareBuffer.Usage usage,
                                 boolean shadowBuffer)
Sets the policy for the index buffers to be used when loading this .

Specified by:
setIndexBufferPolicy in interface IMesh

getVertexBufferUsage

public HardwareBuffer.Usage getVertexBufferUsage()
Gets the usage setting for this meshes vertex buffers.

Specified by:
getVertexBufferUsage in interface IMesh

getIndexBufferUsage

public HardwareBuffer.Usage getIndexBufferUsage()
Gets the usage setting for this meshes index buffers.

Specified by:
getIndexBufferUsage in interface IMesh

isVertexBufferShadowed

public boolean isVertexBufferShadowed()
Gets whether or not this meshes vertex buffers are shadowed.

Specified by:
isVertexBufferShadowed in interface IMesh

isIndexBufferShadowed

public boolean isIndexBufferShadowed()
Gets whether or not this meshes index buffers are shadowed.

Specified by:
isIndexBufferShadowed in interface IMesh

_rationaliseBoneAssignments

public int _rationaliseBoneAssignments(int vertexCount,
                                       IMesh.IVertexBoneAssignmentList assignments)
Rationalises the passed in bone assignment list.

Specified by:
_rationaliseBoneAssignments in interface IMesh

_compileBoneAssignments

public void _compileBoneAssignments()
Internal method, be called once to compile bone assignments into geometry buffer.

Specified by:
_compileBoneAssignments in interface IMesh

_updateCompiledBoneAssignments

public void _updateCompiledBoneAssignments()
Internal method, be called once to update the compiled bone assignments.

Specified by:
_updateCompiledBoneAssignments in interface IMesh

buildTangentVectors

public void buildTangentVectors(VertexElementSemantic targetSemantic,
                                int sourceTexCoordSet,
                                int index,
                                boolean splitMirrored,
                                boolean splitRotated,
                                boolean storeParityInW)
This method builds a set of tangent vectors for a given mesh into a 3D texture coordinate buffer.

Specified by:
buildTangentVectors in interface IMesh

suggestTangentVectorBuildParams

public boolean suggestTangentVectorBuildParams(VertexElementSemantic targetSemantic,
                                               IntegerPointer outSourceCoordSet,
                                               IntegerPointer outIndex)
Ask the mesh to suggest parameters to a future buildTangentVectors call, should you wish to use texture coordinates to store the tangents.

Specified by:
suggestTangentVectorBuildParams in interface IMesh

buildEdgeList

public void buildEdgeList()
Builds an edge list for this mesh, which can be used for generating a shadow volume among other things.

Specified by:
buildEdgeList in interface IMesh

freeEdgeList

public void freeEdgeList()
Destroys and frees the edge lists this mesh has built.

Specified by:
freeEdgeList in interface IMesh

prepareForShadowVolume

public void prepareForShadowVolume()
This method prepares the mesh for generating a renderable shadow volume.

Specified by:
prepareForShadowVolume in interface IMesh

getEdgeList

public IEdgeData getEdgeList(long lodIndex)
Return the edge list for this mesh, building it if required.

Specified by:
getEdgeList in interface IMesh

getEdgeList_const

public IEdgeData getEdgeList_const(long lodIndex)
Specified by:
getEdgeList_const in interface IMesh

isPreparedForShadowVolumes

public boolean isPreparedForShadowVolumes()
Returns whether this mesh has already had it's geometry prepared for use in rendering shadow volumes.

Specified by:
isPreparedForShadowVolumes in interface IMesh

isEdgeListBuilt

public boolean isEdgeListBuilt()
Returns whether this mesh has an attached edge list.

Specified by:
isEdgeListBuilt in interface IMesh

getSubMeshNameMap

public IMesh.ISubMeshNameMap getSubMeshNameMap()
Gets a reference to the optional name assignments of the SubMeshes.

Specified by:
getSubMeshNameMap in interface IMesh

setAutoBuildEdgeLists

public void setAutoBuildEdgeLists(boolean autobuild)
Sets whether or not this should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided.

Specified by:
setAutoBuildEdgeLists in interface IMesh

getAutoBuildEdgeLists

public boolean getAutoBuildEdgeLists()
Sets whether or not this should automatically build edge lists when asked for them, or whether it should never build them if they are not already provided.

Specified by:
getAutoBuildEdgeLists in interface IMesh

getSharedVertexDataAnimationType

public VertexAnimationType getSharedVertexDataAnimationType()
Gets the type of vertex animation the shared vertex data of this mesh supports.

Specified by:
getSharedVertexDataAnimationType in interface IMesh

createAnimation

public IAnimation createAnimation(java.lang.String name,
                                  float length)
Creates a new object for vertex animating this mesh.

Specified by:
createAnimation in interface IMesh

getAnimation

public IAnimation getAnimation(java.lang.String name)
Returns the named vertex object.

Specified by:
getAnimation in interface IMesh

_getAnimationImpl

public IAnimation _getAnimationImpl(java.lang.String name)
Internal access to the named vertex object - returns null if it does not exist.

Specified by:
_getAnimationImpl in interface IMesh

hasAnimation

public boolean hasAnimation(java.lang.String name)
Returns whether this mesh contains the named vertex animation.

Specified by:
hasAnimation in interface IMesh

removeAnimation

public void removeAnimation(java.lang.String name)
Removes vertex from this mesh.

Specified by:
removeAnimation in interface IMesh

getNumAnimations

public int getNumAnimations()
Gets the number of morph animations in this mesh.

Specified by:
getNumAnimations in interface IMesh

getAnimation

public IAnimation getAnimation(int index)
Gets a single morph animation by index.

Specified by:
getAnimation in interface IMesh

removeAllAnimations

public void removeAllAnimations()
Removes all morph Animations from this mesh.

Specified by:
removeAllAnimations in interface IMesh

getVertexDataByTrackHandle

public IVertexData getVertexDataByTrackHandle(int handle)
Gets a pointer to a vertex data element based on a morph animation track handle.

Specified by:
getVertexDataByTrackHandle in interface IMesh

updateMaterialForAllSubMeshes

public void updateMaterialForAllSubMeshes()
Iterates through all submeshes and requests them to apply their texture aliases to the material they use.

Specified by:
updateMaterialForAllSubMeshes in interface IMesh

_determineAnimationTypes

public void _determineAnimationTypes()
Internal method which, if animation types have not been determined, scans any vertex animations and determines the type for each set of vertex data (cannot have 2 different types).

Specified by:
_determineAnimationTypes in interface IMesh

_getAnimationTypesDirty

public boolean _getAnimationTypesDirty()
Are the derived animation types out of date?

Specified by:
_getAnimationTypesDirty in interface IMesh

createPose

public IPose createPose(int target,
                        java.lang.String name)
Create a new for this mesh or one of its submeshes.

Specified by:
createPose in interface IMesh

getPoseCount

public int getPoseCount()
Get the number of poses.

Specified by:
getPoseCount in interface IMesh

getPose

public IPose getPose(int index)
Retrieve an existing by index.

Specified by:
getPose in interface IMesh

getPose

public IPose getPose(java.lang.String name)
Retrieve an existing by name.

Specified by:
getPose in interface IMesh

removePose

public void removePose(int index)
Destroy a pose by index.

Specified by:
removePose in interface IMesh

removePose

public void removePose(java.lang.String name)
Destroy a pose by name.

Specified by:
removePose in interface IMesh

removeAllPoses

public void removeAllPoses()
Destroy all poses

Specified by:
removeAllPoses in interface IMesh

getPoseIterator

public void getPoseIterator(IMesh.IPoseIterator returnValue)
Get an iterator over all the poses defined.

Specified by:
getPoseIterator in interface IMesh

getPoseIterator_const

public void getPoseIterator_const(IMesh.IConstPoseIterator returnValue)
Specified by:
getPoseIterator_const in interface IMesh

getPoseList

public IPoseList getPoseList()
Get pose list

Specified by:
getPoseList in interface IMesh

prepareMatricesForVertexBlend

public static void prepareMatricesForVertexBlend(NativeObjectPointer<IMatrix4> blendMatrices,
                                                 IMatrix4 boneMatrices,
                                                 IMesh.IIndexMap indexMap)
Prepare matrices for software indexed vertex blend.


softwareVertexBlend

public static void softwareVertexBlend(IVertexData sourceVertexData,
                                       IVertexData targetVertexData,
                                       NativeObjectPointer<IMatrix4> blendMatrices,
                                       int numMatrices,
                                       boolean blendNormals)
Performs a software indexed vertex blend, of the kind used for skeletal animation although it can be used for other purposes.


softwareVertexMorph

public static void softwareVertexMorph(float t,
                                       IHardwareVertexBufferSharedPtr b1,
                                       IHardwareVertexBufferSharedPtr b2,
                                       IVertexData targetVertexData)
Performs a software vertex morph, of the kind used for morph animation although it can be used for other purposes.


softwareVertexPoseBlend

public static void softwareVertexPoseBlend(float weight,
                                           Imap<java.lang.Integer,IVector3> vertexOffsetMap,
                                           IVertexData targetVertexData)
Performs a software vertex pose blend, of the kind used for morph animation although it can be used for other purposes.


prepare

public void prepare()
Prepares the resource for load, if it is not already. One can call before , but this is not required as will call itself, if needed. When OGRE_THREAD_SUPPORT==1 both and are thread-safe. When OGRE_THREAD_SUPPORT==2 however, only is thread-safe. The reason for this function is to allow a background thread to do some of the loading work, without requiring the whole render system to be thread-safe. The background thread would call while the main render loop would later call . So long as remains thread-safe, subclasses can arbitrarily split the work of loading a resource between and . It is best to try and do as much work in , however, since this will leave less work for the main render thread to do and thus increase FPS.

Specified by:
prepare in interface IResource

load

public void load(boolean backgroundThread)
Loads the resource, if it is not already.

Specified by:
load in interface IResource

reload

public void reload()
Reloads the resource, if it is already loaded.

Specified by:
reload in interface IResource

isReloadable

public boolean isReloadable()
Returns true if the is reloadable, false otherwise.

Specified by:
isReloadable in interface IResource

isManuallyLoaded

public boolean isManuallyLoaded()
Is this resource manually loaded?

Specified by:
isManuallyLoaded in interface IResource

unload

public void unload()
Unloads the resource; this is not permanent, the resource can be reloaded later if required.

Specified by:
unload in interface IResource

getSize

public int getSize()
Retrieves info about the size of the resource.

Specified by:
getSize in interface IResource

touch

public void touch()
'Touches' the resource to indicate it has been used.

Specified by:
touch in interface IResource

getName

public java.lang.String getName()
Gets resource name.

Specified by:
getName in interface IResource

getHandle

public long getHandle()
Specified by:
getHandle in interface IResource

isPrepared

public boolean isPrepared()
Returns true if the has been prepared, false otherwise.

Specified by:
isPrepared in interface IResource

isLoaded

public boolean isLoaded()
Returns true if the has been loaded, false otherwise.

Specified by:
isLoaded in interface IResource

isLoading

public boolean isLoading()
Returns whether the resource is currently in the process of background loading.

Specified by:
isLoading in interface IResource

getLoadingState

public Resource.LoadingState getLoadingState()
Returns the current loading state.

Specified by:
getLoadingState in interface IResource

isBackgroundLoaded

public boolean isBackgroundLoaded()
Returns whether this has been earmarked for background loading.

Specified by:
isBackgroundLoaded in interface IResource

setBackgroundLoaded

public void setBackgroundLoaded(boolean bl)
Tells the resource whether it is background loaded or not.

Specified by:
setBackgroundLoaded in interface IResource

escalateLoading

public void escalateLoading()
Escalates the loading of a background loaded resource.

Specified by:
escalateLoading in interface IResource

addListener

public void addListener(IResource.IListener lis)
Register a listener on this resource.

Specified by:
addListener in interface IResource

removeListener

public void removeListener(IResource.IListener lis)
Remove a listener on this resource.

Specified by:
removeListener in interface IResource

getGroup

public java.lang.String getGroup()
Specified by:
getGroup in interface IResource

changeGroupOwnership

public void changeGroupOwnership(java.lang.String newGroup)
Change the resource group ownership of a .

Specified by:
changeGroupOwnership in interface IResource

getCreator

public IResourceManager getCreator()
Specified by:
getCreator in interface IResource

getOrigin

public java.lang.String getOrigin()
Get the origin of this resource, e.g. a script file name.

Specified by:
getOrigin in interface IResource

_notifyOrigin

public void _notifyOrigin(java.lang.String origin)
Specified by:
_notifyOrigin in interface IResource

getStateCount

public int getStateCount()
Returns the number of times this resource has changed state, which generally means the number of times it has been loaded. Objects that build derived data based on the resource can check this value against a copy they kept last time they built this derived data, in order to know whether it needs rebuilding. This is a nice way of monitoring changes without having a tightly-bound callback.

Specified by:
getStateCount in interface IResource

_dirtyState

public void _dirtyState()
Manually mark the state of this resource as having been changed.

Specified by:
_dirtyState in interface IResource

_fireBackgroundLoadingComplete

public void _fireBackgroundLoadingComplete()
Firing of background loading complete event

Specified by:
_fireBackgroundLoadingComplete in interface IResource

_fireBackgroundPreparingComplete

public void _fireBackgroundPreparingComplete()
Firing of background preparing complete event

Specified by:
_fireBackgroundPreparingComplete in interface IResource

getParamDictionary

public IParamDictionary getParamDictionary()
Retrieves the parameter dictionary for this class.

Specified by:
getParamDictionary in interface IStringInterface

getParamDictionary_const

public IParamDictionary getParamDictionary_const()
Specified by:
getParamDictionary_const in interface IStringInterface

getParameters

public IParameterList getParameters()
Retrieves a list of parameters valid for this object.

Specified by:
getParameters in interface IStringInterface

setParameter

public boolean setParameter(java.lang.String name,
                            java.lang.String value)
Generic parameter setting method.

Specified by:
setParameter in interface IStringInterface

setParameterList

public void setParameterList(INameValuePairList paramList)
Generic multiple parameter setting method.

Specified by:
setParameterList in interface IStringInterface

getParameter

public java.lang.String getParameter(java.lang.String name)
Generic parameter retrieval method.

Specified by:
getParameter in interface IStringInterface

copyParametersTo

public void copyParametersTo(IStringInterface dest)
Method for copying this object's parameters to another object.

Specified by:
copyParametersTo in interface IStringInterface

cleanupDictionary

public static void cleanupDictionary()
Cleans up the static 'msDictionary' required to reset , otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the implementers (e.g. ) initializes.


getsharedVertexData

public IVertexData getsharedVertexData()
Specified by:
getsharedVertexData in interface IMesh

setsharedVertexData

public void setsharedVertexData(IVertexData _jni_value_)
Specified by:
setsharedVertexData in interface IMesh

getsharedBlendIndexToBoneIndexMap

public void getsharedBlendIndexToBoneIndexMap(IMesh.IIndexMap returnValue)
Specified by:
getsharedBlendIndexToBoneIndexMap in interface IMesh

setsharedBlendIndexToBoneIndexMap

public void setsharedBlendIndexToBoneIndexMap(IMesh.IIndexMap _jni_value_)
Specified by:
setsharedBlendIndexToBoneIndexMap in interface IMesh


Copyright © 2007 netAllied GmbH. All Rights Reserved.