org.ogre4j
Interface IMesh

All Superinterfaces:
IAllocatedObject<IResourceAllocPolicy>, INativeObject, IResource, IResourceAllocatedObject, IStringInterface
All Known Subinterfaces:
IPatchMesh
All Known Implementing Classes:
Mesh, PatchMesh

public interface IMesh
extends INativeObject, IResource


Nested Class Summary
static interface IMesh.IAnimationList
           
static interface IMesh.IBoneAssignmentIterator
           
static interface IMesh.IConstPoseIterator
           
static interface IMesh.IIndexMap
           
static interface IMesh.ILodDistanceList
           
static interface IMesh.IMeshLodUsageList
           
static interface IMesh.IPoseIterator
           
static interface IMesh.ISubMeshIterator
           
static interface IMesh.ISubMeshList
           
static interface IMesh.ISubMeshNameMap
           
static interface IMesh.IVertexBoneAssignmentList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IResource
IResource.IListener, IResource.IListenerList
 
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).
 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 _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 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 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.
 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 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.
 IEdgeData getEdgeList_const(long lodIndex)
           
 IEdgeData getEdgeList(long lodIndex)
          Return the edge list for this mesh, building it if required.
 HardwareBuffer.Usage getIndexBufferUsage()
          Gets the usage setting for this meshes index buffers.
 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.
 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.
 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.
 ISkeletonPtr getSkeleton()
          Gets a pointer to any linked .
 java.lang.String getSkeletonName()
          Gets the name of any linked
 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 isEdgeListBuilt()
          Returns whether this mesh has an attached edge list.
 boolean isIndexBufferShadowed()
          Gets whether or not this meshes index buffers are shadowed.
 boolean isLodManual()
          Returns true if this mesh is using manual LOD.
 boolean isPreparedForShadowVolumes()
          Returns whether this mesh has already had it's geometry prepared for use in rendering shadow volumes.
 boolean isVertexBufferShadowed()
          Gets whether or not this meshes vertex buffers are shadowed.
 void nameSubMesh(java.lang.String name, int index)
          Gives a name to a
 void prepareForShadowVolume()
          This method prepares the mesh for generating a renderable shadow volume.
 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 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 setIndexBufferPolicy(HardwareBuffer.Usage usage, boolean shadowBuffer)
          Sets the policy for the index buffers to be used when loading this .
 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 .
 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 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 interface org.ogre4j.IResource
_dirtyState, _fireBackgroundLoadingComplete, _fireBackgroundPreparingComplete, _notifyOrigin, addListener, changeGroupOwnership, escalateLoading, getCreator, getGroup, getHandle, getLoadingState, getName, getOrigin, getSize, getStateCount, isBackgroundLoaded, isLoaded, isLoading, isManuallyLoaded, isPrepared, isReloadable, load, prepare, reload, removeListener, setBackgroundLoaded, touch, unload
 
Methods inherited from interface org.ogre4j.IStringInterface
copyParametersTo, getParamDictionary_const, getParamDictionary, getParameter, getParameters, setParameter, setParameterList
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

createSubMesh

ISubMesh createSubMesh()
Creates a new .


createSubMesh

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


nameSubMesh

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


_getSubMeshIndex

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


getNumSubMeshes

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


getSubMesh

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


getSubMesh

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


getSubMeshIterator

void getSubMeshIterator(IMesh.ISubMeshIterator returnValue)

clone

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.


getBounds

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


getBoundingSphereRadius

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


_setBounds

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


_setBoundingSphereRadius

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


setSkeletonName

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


hasSkeleton

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


hasVertexAnimation

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


getSkeleton

ISkeletonPtr getSkeleton()
Gets a pointer to any linked .


getSkeletonName

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


_initAnimationState

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


_refreshAnimationState

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


addBoneAssignment

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


clearBoneAssignments

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


_notifySkeleton

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


getBoneAssignmentIterator

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


getBoneAssignments

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


generateLodLevels

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.


getNumLodLevels

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


getLodLevel

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


createManualLodLevel

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


updateManualLodLevel

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


getLodIndex

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


getLodIndexSquaredDepth

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


isLodManual

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


_setLodInfo

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


_setLodUsage

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


_setSubMeshLodFaceList

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


removeLodLevels

void removeLodLevels()
Removes all LOD data from this .


setVertexBufferPolicy

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


setIndexBufferPolicy

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


getVertexBufferUsage

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


getIndexBufferUsage

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


isVertexBufferShadowed

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


isIndexBufferShadowed

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


_rationaliseBoneAssignments

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


_compileBoneAssignments

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


_updateCompiledBoneAssignments

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


buildTangentVectors

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.


suggestTangentVectorBuildParams

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.


buildEdgeList

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


freeEdgeList

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


prepareForShadowVolume

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


getEdgeList

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


getEdgeList_const

IEdgeData getEdgeList_const(long lodIndex)

isPreparedForShadowVolumes

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


isEdgeListBuilt

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


getSubMeshNameMap

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


setAutoBuildEdgeLists

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.


getAutoBuildEdgeLists

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.


getSharedVertexDataAnimationType

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


createAnimation

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


getAnimation

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


_getAnimationImpl

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


hasAnimation

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


removeAnimation

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


getNumAnimations

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


getAnimation

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


removeAllAnimations

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


getVertexDataByTrackHandle

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


updateMaterialForAllSubMeshes

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


_determineAnimationTypes

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).


_getAnimationTypesDirty

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


createPose

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


getPoseCount

int getPoseCount()
Get the number of poses.


getPose

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


getPose

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


removePose

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


removePose

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


removeAllPoses

void removeAllPoses()
Destroy all poses


getPoseIterator

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


getPoseIterator_const

void getPoseIterator_const(IMesh.IConstPoseIterator returnValue)

getPoseList

IPoseList getPoseList()
Get pose list


getsharedVertexData

IVertexData getsharedVertexData()

setsharedVertexData

void setsharedVertexData(IVertexData _jni_value_)

getsharedBlendIndexToBoneIndexMap

void getsharedBlendIndexToBoneIndexMap(IMesh.IIndexMap returnValue)

setsharedBlendIndexToBoneIndexMap

void setsharedBlendIndexToBoneIndexMap(IMesh.IIndexMap _jni_value_)


Copyright © 2007 netAllied GmbH. All Rights Reserved.