Visual3D Game EngineAPI Documentation for XNA, C#, VB, and .NET
References set of vertex buffers bound to specific vertex streams, holds vertex format declaration and start/end vertex number. Also allows instanced rendering through vertex frequencies assigned to each stream.

Namespace: Visual3D.Graphics3D
Assembly: Visual3D.Engine (in Visual3D.Engine.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

      
 C#  Visual Basic 
public class VertexData : IDisposable, IOwned
Public Class VertexData _
	Implements IDisposable, IOwned

Members

               
 All Members  Constructors   Fields   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
VertexData()()()()
Create new VertexData object.
VertexData(Object)
Initializes a new instance of the VertexData class
AllowReadingFromDynamicVertexBuffers
BytesPerVertex
CanAddElementsForInstancing()()()()
Clone(Boolean)
Clones this vertex data by-reference (without cloning vertex buffer instances). Set "markIfShared" to "true" to avoid multi-owner disposal exceptions.
CloneForWriteablePositions(Object)
Clones this vertex data by-reference (without cloning vertex buffer instances).
Create(Int32, array<VertexElement>[]()[][])
Easy to use creation of VertexData, from number of vertices and vertex format. Will create a VertexBuffer and bind it to stream #0. Will also create and fill VertexDeclaration from given array of VertexElements.
DisableInstancing()()()()
Disable instancing.
DisablePositionCaching()()()()
Dispose()()()()
DisposeOfUnownedBuffers
EnablePositionCaching()()()()
Equals(Object) (Overrides Object..::..Equals(Object).)
Frequencies
(Instancing) Returns raw array of vertex buffer frequency assignments.
GetBoundingBox()()()()
Calculates and returns bounding box from vertex buffer containing POSITION element. Avoid calling this method too often, it's quite expensive for most cases.
GetBoundingBox(IndexData)
Calculates and returns bounding box from vertex buffer containing POSITION element. Avoid calling this method too often, it's quite expensive for most cases.
GetBufferClone(VertexElementUsage, Nullable<(Of <<'(Boolean>)>>), VertexBuffer%, Int32%)
GetBufferDescription(Int32)
GetBytesPerVertex(Int32)
GetData()()()()
Interleave streams of elements.
GetData<(Of <<'(TElement>)>>)(Int32)
GetData(Int32)
Get stream of elements as a stream of bytes.
GetData<(Of <<'(TElement>)>>)(VertexElement, Buffer<(Of <<'(TElement>)>>)%)
GetData<(Of <<'(TElement>)>>)(Int32, IntRange)
GetData<(Of <<'(TElement>)>>)(Int32, IntRange, Buffer<(Of <<'(TElement>)>>)%)
GetData<(Of <<'(TElement>)>>)(VertexElement, Buffer<(Of <<'(TElement>)>>)%, Int32, Nullable<(Of <<'(Int32>)>>))
GetData<(Of <<'(TElement>)>>)(VertexElementUsage, Buffer<(Of <<'(TElement>)>>)%, Int32, Nullable<(Of <<'(Int32>)>>))
GetFrequency(Int32)
(Instancing) Returns frequency (a number of instances) for specified stream. Converts XNA-specific value (flagged) into simple number of instances.
GetFrequencyRaw(Int32)
(Instancing) Returns raw frequency for specified stream.
GetHashCode()()()() (Overrides Object..::..GetHashCode()()()().)
GetPositions()()()()
Old version that returns array, used by Model. TODO: Change Model to use ArraySegment.
GetPositions(Int32, Int32)
GetVertexBuffer(VertexElementUsage, Int32%)
GetVertexCount(Int32)
GetVertexElements(Int32)
HasOwner<(Of <<'(TOwner>)>>)(IOwned) (Inherited from EntityExtensions.)
HasOwner<(Of <<'(TOwner>)>>)(IOwned, TOwner%) (Inherited from EntityExtensions.)
HasOwner<(Of <<'(TOwner>)>>)(IOwned, TOwner%, Boolean) (Inherited from EntityExtensions.)
IncludeOwnerInBufferName
IndexedObjectData
InstanceData
IsEmpty
Gets if the VertexCount is 0 or negative.
IsInstanceOf(VertexData, VertexData) (Inherited from XnaMethodExtensions.)
IsOwnedBy(VertexData, Object, Boolean) (Inherited from XnaMethodExtensions.)
IsValid
LogVertexGetSetData
Owner
Prefab
SetData<(Of <<'(TElement>)>>)(Int32, Buffer<(Of <<'(TElement>)>>))
SetData<(Of <<'(TElement>)>>)(Int32, IntRange, Buffer<(Of <<'(TElement>)>>))
SetData<(Of <<'(TElement>)>>)(VertexElementUsage, Buffer<(Of <<'(TElement>)>>), Int32, Nullable<(Of <<'(Int32>)>>))
SetFrequencies(Int32, Int32)
(Instancing) Smart method to set up instancing, when there's a vertex buffer containing per-instance data and set of buffers containing single instance data.
SetFrequency(Int32, Int32)
(Instancing) Sets a frequency (number of instances) for specified vertex buffer.
SetFrequencyRaw(Int32, Int32)
(Instancing) Sets a raw frequency for specified stream.
SetPositions(Buffer<(Of <<'(Vector3>)>>), Int32, Int32)
SizeInBytes
ToString()()()() (Overrides Object..::..ToString()()()().)
ToString(Boolean)
VertexBufferOffsets
Optional offset from the beginning of each corresponding vertex buffer to the beginning of the vertex data, in bytes.
VertexBuffers
The vertex buffer(s) containing vertices of the geometry. Key of this dictionary is zero-based index of vertex stream, value is reference to vertex buffer bound to that stream. When there is no multistreaming used, a dictionary will contain only one element (key is 0, value is VertexBuffer).
VertexCount
The number of vertices to render.
VertexDeclaration
Define format of vertices contained in VertexBuffers.
VertexDeclarationsEqual(VertexData)
VertexRange
Gets the range of vertices which are used for rendering, as defined by [VertexStart, VertexStart + VertexCount].
VertexStart
The base vertex index to start render from.

Inheritance Hierarchy

System..::..Object
  Visual3D.Graphics3D..::..VertexData

See Also