org.ogre4j
Class VertexDeclaration

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.VertexDeclaration
All Implemented Interfaces:
IAllocatedObject<IGeometryAllocPolicy>, IGeometryAllocatedObject, IVertexDeclaration, INativeObject

public class VertexDeclaration
extends NativeObject
implements IVertexDeclaration


Nested Class Summary
static class VertexDeclaration.VertexElementList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IVertexDeclaration
IVertexDeclaration.IVertexElementList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  VertexDeclaration()
           
  VertexDeclaration(InstancePointer p)
          This constructor is public for internal useage only!
protected VertexDeclaration(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  VertexDeclaration(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 IVertexElement addElement(int source, int offset, VertexElementType theType, VertexElementSemantic semantic, int index)
          Adds a new to this declaration.
 IVertexDeclaration clone()
          Clones this declaration.
 void closeGapsInSource()
          Remove any gaps in the source buffer list used by this declaration.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 IVertexElement findElementBySemantic(VertexElementSemantic sem, int index)
          Finds a with the given semantic, and index if there is more than one element with the same semantic.
 void findElementsBySource(IVertexDeclaration.IVertexElementList returnValue, int source)
          Gets a list of elements which use a given source.
 IVertexDeclaration getAutoOrganisedDeclaration(boolean skeletalAnimation, boolean vertexAnimation)
          Generates a new for optimal usage based on the current vertex declaration, which can be used with later if you wish, or simply used as a template.
 IVertexElement getElement(int index)
          Get a single element.
 int getElementCount()
          Get the number of elements in the declaration.
 IVertexDeclaration.IVertexElementList getElements()
          Gets read-only access to the list of vertex elements.
 int getMaxSource()
          Gets the index of the highest source value referenced by this declaration.
 int getVertexSize(int source)
          Gets the vertex size defined by this declaration for a given source.
 IVertexElement insertElement(int atPosition, int source, int offset, VertexElementType theType, VertexElementSemantic semantic, int index)
          Inserts a new at a given position in this declaration.
 void modifyElement(int elem_index, int source, int offset, VertexElementType theType, VertexElementSemantic semantic, int index)
          Modify an element in-place, params as addElement.
 boolean operatorEqual(IVertexDeclaration rhs)
           
 boolean operatorNotEqual(IVertexDeclaration rhs)
           
 void removeAllElements()
          Remove all elements.
 void removeElement(int elem_index)
          Remove the element at the given index from this declaration.
 void removeElement(VertexElementSemantic semantic, int index)
          Remove the element with the given semantic and usage index.
 void sort()
          Sorts the elements in this list to be compatible with the maximum number of rendering APIs / graphics cards.
static boolean vertexElementLess(IVertexElement e1, IVertexElement e2)
           
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

VertexDeclaration

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


VertexDeclaration

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


VertexDeclaration

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

VertexDeclaration

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

getElementCount

public int getElementCount()
Get the number of elements in the declaration.

Specified by:
getElementCount in interface IVertexDeclaration

getElements

public IVertexDeclaration.IVertexElementList getElements()
Gets read-only access to the list of vertex elements.

Specified by:
getElements in interface IVertexDeclaration

getElement

public IVertexElement getElement(int index)
Get a single element.

Specified by:
getElement in interface IVertexDeclaration

sort

public void sort()
Sorts the elements in this list to be compatible with the maximum number of rendering APIs / graphics cards.

Specified by:
sort in interface IVertexDeclaration

closeGapsInSource

public void closeGapsInSource()
Remove any gaps in the source buffer list used by this declaration.

Specified by:
closeGapsInSource in interface IVertexDeclaration

getAutoOrganisedDeclaration

public IVertexDeclaration getAutoOrganisedDeclaration(boolean skeletalAnimation,
                                                      boolean vertexAnimation)
Generates a new for optimal usage based on the current vertex declaration, which can be used with later if you wish, or simply used as a template.

Specified by:
getAutoOrganisedDeclaration in interface IVertexDeclaration

getMaxSource

public int getMaxSource()
Gets the index of the highest source value referenced by this declaration.

Specified by:
getMaxSource in interface IVertexDeclaration

addElement

public IVertexElement addElement(int source,
                                 int offset,
                                 VertexElementType theType,
                                 VertexElementSemantic semantic,
                                 int index)
Adds a new to this declaration.

Specified by:
addElement in interface IVertexDeclaration

insertElement

public IVertexElement insertElement(int atPosition,
                                    int source,
                                    int offset,
                                    VertexElementType theType,
                                    VertexElementSemantic semantic,
                                    int index)
Inserts a new at a given position in this declaration.

Specified by:
insertElement in interface IVertexDeclaration

removeElement

public void removeElement(int elem_index)
Remove the element at the given index from this declaration.

Specified by:
removeElement in interface IVertexDeclaration

removeElement

public void removeElement(VertexElementSemantic semantic,
                          int index)
Remove the element with the given semantic and usage index.

Specified by:
removeElement in interface IVertexDeclaration

removeAllElements

public void removeAllElements()
Remove all elements.

Specified by:
removeAllElements in interface IVertexDeclaration

modifyElement

public void modifyElement(int elem_index,
                          int source,
                          int offset,
                          VertexElementType theType,
                          VertexElementSemantic semantic,
                          int index)
Modify an element in-place, params as addElement.

Specified by:
modifyElement in interface IVertexDeclaration

findElementBySemantic

public IVertexElement findElementBySemantic(VertexElementSemantic sem,
                                            int index)
Finds a with the given semantic, and index if there is more than one element with the same semantic.

Specified by:
findElementBySemantic in interface IVertexDeclaration

findElementsBySource

public void findElementsBySource(IVertexDeclaration.IVertexElementList returnValue,
                                 int source)
Gets a list of elements which use a given source.

Specified by:
findElementsBySource in interface IVertexDeclaration

getVertexSize

public int getVertexSize(int source)
Gets the vertex size defined by this declaration for a given source.

Specified by:
getVertexSize in interface IVertexDeclaration

clone

public IVertexDeclaration clone()
Clones this declaration.

Specified by:
clone in interface IVertexDeclaration
Overrides:
clone in class java.lang.Object

operatorEqual

public boolean operatorEqual(IVertexDeclaration rhs)
Specified by:
operatorEqual in interface IVertexDeclaration

operatorNotEqual

public boolean operatorNotEqual(IVertexDeclaration rhs)
Specified by:
operatorNotEqual in interface IVertexDeclaration

vertexElementLess

public static boolean vertexElementLess(IVertexElement e1,
                                        IVertexElement e2)


Copyright © 2007 netAllied GmbH. All Rights Reserved.