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
BatchedGeometryVertStruct
- Inheritance
-
StaticGeometryBatchingBufferBase<BatchedGeometry, VertStruct>
- Implements
- Derived
- Inherited Members
Constructors
StaticGeometryBatchingBufferBase(PrimitiveTopology, IElementsBufferProxy, IElementsBufferProxy)
public StaticGeometryBatchingBufferBase(PrimitiveTopology topology, IElementsBufferProxy vertexBuffer, IElementsBufferProxy indexBuffer)
Parameters
topologyPrimitiveTopologyvertexBufferIElementsBufferProxyindexBufferIElementsBufferProxy
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
contextDeviceContextProxyThe context.
vertexBufferStartSlotintThe vertex buffer start slot.
deviceResourcesIDeviceResourcesThe device resources.
Returns
Commit(DeviceContextProxy)
public bool Commit(DeviceContextProxy deviceContext)
Parameters
deviceContextDeviceContextProxy
Returns
InvalidateGeometries()
public void InvalidateGeometries()
OnDispose(bool)
Disposes of object resources.
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesboolIf 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
OnSubmitGeometries(DeviceContextProxy)
protected virtual void OnSubmitGeometries(DeviceContextProxy deviceContext)
Parameters
deviceContextDeviceContextProxy
UpdateBuffers(DeviceContextProxy, IDeviceResources?)
Updates the buffers.
public bool UpdateBuffers(DeviceContextProxy context, IDeviceResources? deviceResources)
Parameters
contextDeviceContextProxyThe context.
deviceResourcesIDeviceResourcesThe device resources.
Returns
- bool
True if buffer updated.
Events
InvalidateRender
public event EventHandler<EventArgs>? InvalidateRender