Table of Contents

Class StaticGeometryBatchingBufferBase<BatchedGeometry, VertStruct>

Namespace
HelixToolkit.SharpDX.Core
Assembly
HelixToolkit.SharpDX.dll
public abstract class StaticGeometryBatchingBufferBase<BatchedGeometry, VertStruct> : DisposeObject, IAttachableBufferModel, IGUID, IDisposable where BatchedGeometry : struct, IBatchedGeometry where VertStruct : unmanaged

Type Parameters

BatchedGeometry
VertStruct
Inheritance
StaticGeometryBatchingBufferBase<BatchedGeometry, VertStruct>
Implements
Derived
Inherited Members

Constructors

StaticGeometryBatchingBufferBase(PrimitiveTopology, IElementsBufferProxy, IElementsBufferProxy)

public StaticGeometryBatchingBufferBase(PrimitiveTopology topology, IElementsBufferProxy vertexBuffer, IElementsBufferProxy indexBuffer)

Parameters

topology PrimitiveTopology
vertexBuffer IElementsBufferProxy
indexBuffer IElementsBufferProxy

Properties

GUID

Gets the unique identifier.

public Guid GUID { get; }

Property Value

Guid

The unique identifier.

Geometries

public BatchedGeometry[]? Geometries { get; set; }

Property Value

BatchedGeometry[]

IndexBuffer

Gets or sets the index buffer.

public IElementsBufferProxy? IndexBuffer { get; }

Property Value

IElementsBufferProxy

The index buffer.

Topology

Gets or sets the topology.

public PrimitiveTopology Topology { get; set; }

Property Value

PrimitiveTopology

The topology.

VertexBuffer

Gets or sets the vertex buffer.

public IElementsBufferProxy?[] VertexBuffer { get; }

Property Value

IElementsBufferProxy[]

The vertex buffer.

VertexStructSize

Gets the size of the vertex structure.

public IEnumerable<int> VertexStructSize { get; }

Property Value

IEnumerable<int>

The size of the vertex structure.

Methods

AttachBuffers(DeviceContextProxy, ref int, IDeviceResources?)

Attaches the buffers.

public bool AttachBuffers(DeviceContextProxy context, ref int vertexBufferStartSlot, IDeviceResources? deviceResources)

Parameters

context DeviceContextProxy

The context.

vertexBufferStartSlot int

The vertex buffer start slot.

deviceResources IDeviceResources

The device resources.

Returns

bool

Commit(DeviceContextProxy)

public bool Commit(DeviceContextProxy deviceContext)

Parameters

deviceContext DeviceContextProxy

Returns

bool

InvalidateGeometries()

public void InvalidateGeometries()

OnDispose(bool)

Disposes of object resources.

protected override void OnDispose(bool disposeManagedResources)

Parameters

disposeManagedResources bool

If true, managed resources should be disposed of in addition to unmanaged resources.

OnFillVertArray(VertStruct[], int, ref BatchedGeometry, ref Matrix4x4)

protected abstract void OnFillVertArray(VertStruct[] array, int offset, ref BatchedGeometry geometry, ref Matrix4x4 transform)

Parameters

array VertStruct[]
offset int
geometry BatchedGeometry
transform Matrix4x4

OnSubmitGeometries(DeviceContextProxy)

protected virtual void OnSubmitGeometries(DeviceContextProxy deviceContext)

Parameters

deviceContext DeviceContextProxy

UpdateBuffers(DeviceContextProxy, IDeviceResources?)

Updates the buffers.

public bool UpdateBuffers(DeviceContextProxy context, IDeviceResources? deviceResources)

Parameters

context DeviceContextProxy

The context.

deviceResources IDeviceResources

The device resources.

Returns

bool

True if buffer updated.

Events

InvalidateRender

public event EventHandler<EventArgs>? InvalidateRender

Event Type

EventHandler<EventArgs>