Class GeometryBufferModel
- Namespace
- HelixToolkit.SharpDX.Core
- Assembly
- HelixToolkit.SharpDX.dll
General Geometry Buffer Model.
public abstract class GeometryBufferModel : DisposeObject, IGeometryBufferModel, IAttachableBufferModel, IGUID, IDisposable
- Inheritance
-
GeometryBufferModel
- Implements
- Derived
- Inherited Members
Constructors
GeometryBufferModel(PrimitiveTopology, IElementsBufferProxy?, IElementsBufferProxy?)
Initializes a new instance of the GeometryBufferModel class.
protected GeometryBufferModel(PrimitiveTopology topology, IElementsBufferProxy? vertexBuffer, IElementsBufferProxy? indexBuffer)
Parameters
topologyPrimitiveTopologyThe topology.
vertexBufferIElementsBufferProxyThe vertex buffer.
indexBufferIElementsBufferProxyThe index buffer.
GeometryBufferModel(PrimitiveTopology, IElementsBufferProxy[]?, IElementsBufferProxy?)
Initializes a new instance of the GeometryBufferModel class.
protected GeometryBufferModel(PrimitiveTopology topology, IElementsBufferProxy[]? vertexBuffer, IElementsBufferProxy? indexBuffer)
Parameters
topologyPrimitiveTopologyThe topology.
vertexBufferIElementsBufferProxy[]The vertex buffer.
indexBufferIElementsBufferProxyThe index buffer.
Fields
IndexChanged
Gets or sets a value indicating whether [index changed].
protected volatile bool IndexChanged
Field Value
- bool
trueif [index changed]; otherwise,false.
VertexChanged
change flags
protected volatile uint VertexChanged
Field Value
Properties
EffectsManager
Gets or sets the effects manager.
public IEffectsManager? EffectsManager { get; set; }
Property Value
- IEffectsManager
The effects manager.
GUID
Gets the unique identifier.
public Guid GUID { get; }
Property Value
- Guid
The unique identifier.
Geometry
Gets or sets the geometry.
public Geometry3D? Geometry { get; set; }
Property Value
- Geometry3D
The geometry.
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.
VertexBufferBindings
protected VertexBufferBinding[] VertexBufferBindings { get; }
Property Value
- VertexBufferBinding[]
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 slot.
deviceResourcesIDeviceResourcesThe device resources.
Returns
InvalidateRenderer()
Invalidates the renderer.
protected void InvalidateRenderer()
IsIndexBufferChanged(string)
Determines whether [is index buffer changed] [the specified property name].
protected virtual bool IsIndexBufferChanged(string propertyName)
Parameters
propertyNamestringName of the property.
Returns
- bool
trueif [is index buffer changed] [the specified property name]; otherwise,false.
IsVertexBufferChanged(string, int)
Determines whether [is vertex buffer changed] [the specified property name].
protected virtual bool IsVertexBufferChanged(string propertyName, int vertexBufferIndex)
Parameters
Returns
- bool
trueif [is vertex buffer changed] [the specified property name]; otherwise,false.
OnAttachBuffer(DeviceContextProxy, ref int)
Called when [attach buffer].
protected virtual bool OnAttachBuffer(DeviceContextProxy context, ref int vertexBufferStartSlot)
Parameters
contextDeviceContextProxyThe context.
vertexBufferStartSlotintThe vertex buffer start slot. It will be changed to the next available slot after binding
Returns
OnCreateIndexBuffer(DeviceContextProxy, IElementsBufferProxy, Geometry3D?, IDeviceResources?)
Called when [create index buffer].
protected abstract void OnCreateIndexBuffer(DeviceContextProxy context, IElementsBufferProxy buffer, Geometry3D? geometry, IDeviceResources? deviceResources)
Parameters
contextDeviceContextProxyThe context.
bufferIElementsBufferProxyThe buffer.
geometryGeometry3DThe geometry.
deviceResourcesIDeviceResourcesThe device resources.
OnCreateVertexBuffer(DeviceContextProxy, IElementsBufferProxy, int, Geometry3D?, IDeviceResources?)
Called when [create vertex buffer].
protected abstract void OnCreateVertexBuffer(DeviceContextProxy context, IElementsBufferProxy buffer, int bufferIndex, Geometry3D? geometry, IDeviceResources? deviceResources)
Parameters
contextDeviceContextProxyThe context.
bufferIElementsBufferProxyThe buffer.
bufferIndexintgeometryGeometry3DThe geometry.
deviceResourcesIDeviceResourcesThe device resources.
OnCreateVertexBufferBinding()
protected virtual VertexBufferBinding[] OnCreateVertexBufferBinding()
Returns
- VertexBufferBinding[]
OnDispose(bool)
Releases unmanaged and - optionally - managed resources.
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesbooltrueto release both managed and unmanaged resources;falseto release only unmanaged resources.
UpdateBuffers(DeviceContextProxy, IDeviceResources?)
Updates the buffers.
public virtual bool UpdateBuffers(DeviceContextProxy context, IDeviceResources? deviceResources)
Parameters
contextDeviceContextProxyThe context.
deviceResourcesIDeviceResourcesThe device resources.
Returns
Events
IndexBufferUpdated
public event EventHandler? IndexBufferUpdated
Event Type
VertexBufferUpdated
public event EventHandler? VertexBufferUpdated