Table of Contents

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

topology PrimitiveTopology

The topology.

vertexBuffer IElementsBufferProxy

The vertex buffer.

indexBuffer IElementsBufferProxy

The index buffer.

GeometryBufferModel(PrimitiveTopology, IElementsBufferProxy[]?, IElementsBufferProxy?)

Initializes a new instance of the GeometryBufferModel class.

protected GeometryBufferModel(PrimitiveTopology topology, IElementsBufferProxy[]? vertexBuffer, IElementsBufferProxy? indexBuffer)

Parameters

topology PrimitiveTopology

The topology.

vertexBuffer IElementsBufferProxy[]

The vertex buffer.

indexBuffer IElementsBufferProxy

The index buffer.

Fields

IndexChanged

Gets or sets a value indicating whether [index changed].

protected volatile bool IndexChanged

Field Value

bool

true if [index changed]; otherwise, false.

VertexChanged

change flags

protected volatile uint VertexChanged

Field Value

uint

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

context DeviceContextProxy

The context.

vertexBufferStartSlot int

The vertex buffer slot.

deviceResources IDeviceResources

The device resources.

Returns

bool

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

propertyName string

Name of the property.

Returns

bool

true if [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

propertyName string

Name of the property.

vertexBufferIndex int

Returns

bool

true if [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

context DeviceContextProxy

The context.

vertexBufferStartSlot int

The vertex buffer start slot. It will be changed to the next available slot after binding

Returns

bool

OnCreateIndexBuffer(DeviceContextProxy, IElementsBufferProxy, Geometry3D?, IDeviceResources?)

Called when [create index buffer].

protected abstract void OnCreateIndexBuffer(DeviceContextProxy context, IElementsBufferProxy buffer, Geometry3D? geometry, IDeviceResources? deviceResources)

Parameters

context DeviceContextProxy

The context.

buffer IElementsBufferProxy

The buffer.

geometry Geometry3D

The geometry.

deviceResources IDeviceResources

The 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

context DeviceContextProxy

The context.

buffer IElementsBufferProxy

The buffer.

bufferIndex int
geometry Geometry3D

The geometry.

deviceResources IDeviceResources

The device resources.

OnCreateVertexBufferBinding()

protected virtual VertexBufferBinding[] OnCreateVertexBufferBinding()

Returns

VertexBufferBinding[]

OnDispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void OnDispose(bool disposeManagedResources)

Parameters

disposeManagedResources bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

UpdateBuffers(DeviceContextProxy, IDeviceResources?)

Updates the buffers.

public virtual bool UpdateBuffers(DeviceContextProxy context, IDeviceResources? deviceResources)

Parameters

context DeviceContextProxy

The context.

deviceResources IDeviceResources

The device resources.

Returns

bool

Events

IndexBufferUpdated

public event EventHandler? IndexBufferUpdated

Event Type

EventHandler

VertexBufferUpdated

public event EventHandler? VertexBufferUpdated

Event Type

EventHandler