org.ogre4j
Class SubMesh

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.SubMesh
All Implemented Interfaces:
IAllocatedObject<IResourceAllocPolicy>, IResourceAllocatedObject, ISubMesh, INativeObject

public class SubMesh
extends NativeObject
implements ISubMesh


Nested Class Summary
static class SubMesh.AliasTextureIterator
           
static class SubMesh.BoneAssignmentIterator
           
static class SubMesh.IndexMap
           
static class SubMesh.VertexBoneAssignmentList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.ISubMesh
ISubMesh.IAliasTextureIterator, ISubMesh.IBoneAssignmentIterator, ISubMesh.IIndexMap, ISubMesh.IVertexBoneAssignmentList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  SubMesh()
           
  SubMesh(InstancePointer p)
          This constructor is public for internal useage only!
protected SubMesh(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  SubMesh(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _compileBoneAssignments()
          Must be called once to compile bone assignments into geometry buffer.
 void _getRenderOperation(IRenderOperation rend, int lodIndex)
          Returns a structure required to render this mesh.
 void addBoneAssignment(IVertexBoneAssignment_s vertBoneAssign)
          Assigns a vertex to a bone with a given weight, for skeletal animation.
 void addTextureAlias(java.lang.String aliasName, java.lang.String textureName)
          Adds the alias or replaces an existing one and associates the texture name to it.
 void clearBoneAssignments()
          Removes all bone assignments for this mesh.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 void generateExtremes(int count)
          Generate the submesh extremes (
 void getAliasTextureIterator(ISubMesh.IAliasTextureIterator returnValue)
          Gets an constant iterator to access all texture alias names assigned to this submesh.
 void getblendIndexToBoneIndexMap(ISubMesh.IIndexMap returnValue)
           
 void getBoneAssignmentIterator(ISubMesh.IBoneAssignmentIterator returnValue)
          Gets an iterator for access all bone assignments.
 ISubMesh.IVertexBoneAssignmentList getBoneAssignments()
          Gets a const reference to the list of bone assignments
 void getextremityPoints(Ivector<IVector3> returnValue)
           
 IIndexData getindexData()
           
 java.lang.String getMaterialName()
           
 void getmLodFaceList(IProgressiveMesh.ILODFaceList returnValue)
           
 RenderOperation.OperationType getoperationType()
           
 IMesh getparent()
           
 int getTextureAliasCount()
          Gets the number of texture aliases assigned to the sub mesh.
 boolean getuseSharedVertices()
           
 VertexAnimationType getVertexAnimationType()
          Get the type of any vertex animation used by dedicated geometry.
 IVertexData getvertexData()
           
 boolean hasTextureAliases()
          returns true if the sub mesh has texture aliases
 boolean isBuildEdgesEnabled()
          Returns true(by default) if the submesh should be included in the mesh EdgeList, otherwise returns false.
 boolean isMatInitialised()
          Returns true if a material has been assigned to the submesh, otherwise returns false.
 void removeAllTextureAliases()
          removes all texture aliases from the sub mesh
 void removeTextureAlias(java.lang.String aliasName)
          Remove a specific texture alias name from the sub mesh
 void setblendIndexToBoneIndexMap(ISubMesh.IIndexMap _jni_value_)
           
 void setBuildEdgesEnabled(boolean b)
           
 void setextremityPoints(Ivector<IVector3> _jni_value_)
           
 void setindexData(IIndexData _jni_value_)
           
 void setMaterialName(java.lang.String matName)
           
 void setmLodFaceList(IProgressiveMesh.ILODFaceList _jni_value_)
           
 void setoperationType(RenderOperation.OperationType _jni_value_)
           
 void setparent(IMesh _jni_value_)
           
 void setuseSharedVertices(boolean _jni_value_)
           
 void setvertexData(IVertexData _jni_value_)
           
 boolean updateMaterialUsingTextureAliases()
          The current material used by the submesh is copied into a new material and the submesh's texture aliases are applied if the current texture alias names match those found in the original material.
 
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

SubMesh

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


SubMesh

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


SubMesh

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

SubMesh

public SubMesh()
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

setMaterialName

public void setMaterialName(java.lang.String matName)
Specified by:
setMaterialName in interface ISubMesh

getMaterialName

public java.lang.String getMaterialName()
Specified by:
getMaterialName in interface ISubMesh

isMatInitialised

public boolean isMatInitialised()
Returns true if a material has been assigned to the submesh, otherwise returns false.

Specified by:
isMatInitialised in interface ISubMesh

_getRenderOperation

public void _getRenderOperation(IRenderOperation rend,
                                int lodIndex)
Returns a structure required to render this mesh.

Specified by:
_getRenderOperation in interface ISubMesh

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 ISubMesh

clearBoneAssignments

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

Specified by:
clearBoneAssignments in interface ISubMesh

getBoneAssignmentIterator

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

Specified by:
getBoneAssignmentIterator in interface ISubMesh

getBoneAssignments

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

Specified by:
getBoneAssignments in interface ISubMesh

_compileBoneAssignments

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

Specified by:
_compileBoneAssignments in interface ISubMesh

getAliasTextureIterator

public void getAliasTextureIterator(ISubMesh.IAliasTextureIterator returnValue)
Gets an constant iterator to access all texture alias names assigned to this submesh.

Specified by:
getAliasTextureIterator in interface ISubMesh

addTextureAlias

public void addTextureAlias(java.lang.String aliasName,
                            java.lang.String textureName)
Adds the alias or replaces an existing one and associates the texture name to it.

Specified by:
addTextureAlias in interface ISubMesh

removeTextureAlias

public void removeTextureAlias(java.lang.String aliasName)
Remove a specific texture alias name from the sub mesh

Specified by:
removeTextureAlias in interface ISubMesh

removeAllTextureAliases

public void removeAllTextureAliases()
removes all texture aliases from the sub mesh

Specified by:
removeAllTextureAliases in interface ISubMesh

hasTextureAliases

public boolean hasTextureAliases()
returns true if the sub mesh has texture aliases

Specified by:
hasTextureAliases in interface ISubMesh

getTextureAliasCount

public int getTextureAliasCount()
Gets the number of texture aliases assigned to the sub mesh.

Specified by:
getTextureAliasCount in interface ISubMesh

updateMaterialUsingTextureAliases

public boolean updateMaterialUsingTextureAliases()
The current material used by the submesh is copied into a new material and the submesh's texture aliases are applied if the current texture alias names match those found in the original material.

Specified by:
updateMaterialUsingTextureAliases in interface ISubMesh

getVertexAnimationType

public VertexAnimationType getVertexAnimationType()
Get the type of any vertex animation used by dedicated geometry.

Specified by:
getVertexAnimationType in interface ISubMesh

generateExtremes

public void generateExtremes(int count)
Generate the submesh extremes (

Specified by:
generateExtremes in interface ISubMesh

isBuildEdgesEnabled

public boolean isBuildEdgesEnabled()
Returns true(by default) if the submesh should be included in the mesh EdgeList, otherwise returns false.

Specified by:
isBuildEdgesEnabled in interface ISubMesh

setBuildEdgesEnabled

public void setBuildEdgesEnabled(boolean b)
Specified by:
setBuildEdgesEnabled in interface ISubMesh

getuseSharedVertices

public boolean getuseSharedVertices()
Specified by:
getuseSharedVertices in interface ISubMesh

setuseSharedVertices

public void setuseSharedVertices(boolean _jni_value_)
Specified by:
setuseSharedVertices in interface ISubMesh

getoperationType

public RenderOperation.OperationType getoperationType()
Specified by:
getoperationType in interface ISubMesh

setoperationType

public void setoperationType(RenderOperation.OperationType _jni_value_)
Specified by:
setoperationType in interface ISubMesh

getvertexData

public IVertexData getvertexData()
Specified by:
getvertexData in interface ISubMesh

setvertexData

public void setvertexData(IVertexData _jni_value_)
Specified by:
setvertexData in interface ISubMesh

getindexData

public IIndexData getindexData()
Specified by:
getindexData in interface ISubMesh

setindexData

public void setindexData(IIndexData _jni_value_)
Specified by:
setindexData in interface ISubMesh

getblendIndexToBoneIndexMap

public void getblendIndexToBoneIndexMap(ISubMesh.IIndexMap returnValue)
Specified by:
getblendIndexToBoneIndexMap in interface ISubMesh

setblendIndexToBoneIndexMap

public void setblendIndexToBoneIndexMap(ISubMesh.IIndexMap _jni_value_)
Specified by:
setblendIndexToBoneIndexMap in interface ISubMesh

getmLodFaceList

public void getmLodFaceList(IProgressiveMesh.ILODFaceList returnValue)
Specified by:
getmLodFaceList in interface ISubMesh

setmLodFaceList

public void setmLodFaceList(IProgressiveMesh.ILODFaceList _jni_value_)
Specified by:
setmLodFaceList in interface ISubMesh

getextremityPoints

public void getextremityPoints(Ivector<IVector3> returnValue)
Specified by:
getextremityPoints in interface ISubMesh

setextremityPoints

public void setextremityPoints(Ivector<IVector3> _jni_value_)
Specified by:
setextremityPoints in interface ISubMesh

getparent

public IMesh getparent()
Specified by:
getparent in interface ISubMesh

setparent

public void setparent(IMesh _jni_value_)
Specified by:
setparent in interface ISubMesh


Copyright © 2007 netAllied GmbH. All Rights Reserved.