org.ogre4j
Class VertexBufferBinding

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

public class VertexBufferBinding
extends NativeObject
implements IVertexBufferBinding


Nested Class Summary
static class VertexBufferBinding.BindingIndexMap
           
static class VertexBufferBinding.VertexBufferBindingMap
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IVertexBufferBinding
IVertexBufferBinding.IBindingIndexMap, IVertexBufferBinding.IVertexBufferBindingMap
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  VertexBufferBinding()
           
  VertexBufferBinding(InstancePointer p)
          This constructor is public for internal useage only!
protected VertexBufferBinding(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  VertexBufferBinding(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void closeGaps(IVertexBufferBinding.IBindingIndexMap bindingIndexMap)
          Remove any gaps in the bindings.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 IVertexBufferBinding.IVertexBufferBindingMap getBindings()
           
 IHardwareVertexBufferSharedPtr getBuffer(int index)
           
 int getBufferCount()
           
 int getLastBoundIndex()
          Gets the last bound index.
 int getNextIndex()
          Gets the highest index which has already been set, plus 1.
 boolean hasGaps()
          Check whether any gaps in the bindings.
 boolean isBufferBound(int index)
           
 void setBinding(int index, IHardwareVertexBufferSharedPtr buffer)
          Set a binding, associating a vertex buffer with a given index.
 void unsetAllBindings()
          Removes all the bindings.
 void unsetBinding(int index)
          Removes an existing binding.
 
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

VertexBufferBinding

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


VertexBufferBinding

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


VertexBufferBinding

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

VertexBufferBinding

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

setBinding

public void setBinding(int index,
                       IHardwareVertexBufferSharedPtr buffer)
Set a binding, associating a vertex buffer with a given index.

Specified by:
setBinding in interface IVertexBufferBinding

unsetBinding

public void unsetBinding(int index)
Removes an existing binding.

Specified by:
unsetBinding in interface IVertexBufferBinding

unsetAllBindings

public void unsetAllBindings()
Removes all the bindings.

Specified by:
unsetAllBindings in interface IVertexBufferBinding

getBindings

public IVertexBufferBinding.IVertexBufferBindingMap getBindings()
Specified by:
getBindings in interface IVertexBufferBinding

getBuffer

public IHardwareVertexBufferSharedPtr getBuffer(int index)
Specified by:
getBuffer in interface IVertexBufferBinding

isBufferBound

public boolean isBufferBound(int index)
Specified by:
isBufferBound in interface IVertexBufferBinding

getBufferCount

public int getBufferCount()
Specified by:
getBufferCount in interface IVertexBufferBinding

getNextIndex

public int getNextIndex()
Gets the highest index which has already been set, plus 1.

Specified by:
getNextIndex in interface IVertexBufferBinding

getLastBoundIndex

public int getLastBoundIndex()
Gets the last bound index.

Specified by:
getLastBoundIndex in interface IVertexBufferBinding

hasGaps

public boolean hasGaps()
Check whether any gaps in the bindings.

Specified by:
hasGaps in interface IVertexBufferBinding

closeGaps

public void closeGaps(IVertexBufferBinding.IBindingIndexMap bindingIndexMap)
Remove any gaps in the bindings.

Specified by:
closeGaps in interface IVertexBufferBinding


Copyright © 2007 netAllied GmbH. All Rights Reserved.