Microsoft.Xna.Framework.Graphics
Class VertexBuffer

java.lang.Object
  extended by Microsoft.Xna.Framework.Graphics.GraphicsResource
      extended by Microsoft.Xna.Framework.Graphics.VertexBuffer
All Implemented Interfaces:
IDisposable

public class VertexBuffer
extends GraphicsResource

Represents a list of 3D vertices to be streamed to the graphics device.

Author:
Halofreak1990

Field Summary
protected  BufferUsage _usage
           
 
Fields inherited from class Microsoft.Xna.Framework.Graphics.GraphicsResource
_parent, Disposing, Name, Tag
 
Constructor Summary
VertexBuffer(GraphicsDevice graphicsDevice, java.lang.Class vertexType, int vertexCount, BufferUsage usage)
          Creates an instance of this object.
VertexBuffer(GraphicsDevice graphicsDevice, VertexDeclaration vertexDeclaration, int vertexCount, BufferUsage usage)
          Creates an instance of this object.
 
Method Summary
 BufferUsage getBufferUsage()
           
<T> void
GetData(int offsetInBytes, T[] data, int startIndex, int elementCount, int vertexStride)
           
<T> void
GetData(T[] data)
           
<T> void
GetData(T[] data, int startIndex, int elementCount)
           
 VertexDeclaration getVertexDeclaration()
           
<T> void
SetData(int offsetInBytes, T[] data, int startIndex, int elementCount, int vertexStride)
           
<T> void
SetData(T[] data)
           
<T> void
SetData(T[] data, int startIndex, int elementCount)
           
 java.lang.String toString()
          Gets a string representation of the current instance.
 int VertexCount()
           
 
Methods inherited from class Microsoft.Xna.Framework.Graphics.GraphicsResource
Dispose, Dispose, finalize, GraphicsDevice, IsDisposed, raise_disposing
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_usage

protected BufferUsage _usage
Constructor Detail

VertexBuffer

public VertexBuffer(GraphicsDevice graphicsDevice,
                    VertexDeclaration vertexDeclaration,
                    int vertexCount,
                    BufferUsage usage)
Creates an instance of this object.

Parameters:
graphicsDevice - The graphics device.
vertexDeclaration -
vertexCount -
usage -

VertexBuffer

public VertexBuffer(GraphicsDevice graphicsDevice,
                    java.lang.Class vertexType,
                    int vertexCount,
                    BufferUsage usage)
Creates an instance of this object.

Parameters:
graphicsDevice - The graphics device.
vertexType -
vertexCount -
usage -
Method Detail

getBufferUsage

public BufferUsage getBufferUsage()
Returns:

VertexCount

public int VertexCount()
Returns:

getVertexDeclaration

public VertexDeclaration getVertexDeclaration()
Returns:

GetData

public <T> void GetData(T[] data)

GetData

public <T> void GetData(T[] data,
                        int startIndex,
                        int elementCount)

GetData

public <T> void GetData(int offsetInBytes,
                        T[] data,
                        int startIndex,
                        int elementCount,
                        int vertexStride)

SetData

public <T> void SetData(T[] data)

SetData

public <T> void SetData(T[] data,
                        int startIndex,
                        int elementCount)

SetData

public <T> void SetData(int offsetInBytes,
                        T[] data,
                        int startIndex,
                        int elementCount,
                        int vertexStride)

toString

public java.lang.String toString()
Description copied from class: GraphicsResource
Gets a string representation of the current instance.

Overrides:
toString in class GraphicsResource