GeometricPrimitive<T> Class
Namespace: Stride.Graphics.GeometricPrimitivesAssembly: Stride.Graphics.dll
A geometric primitive used to draw a simple model built from a set of vertices and indices.
public class GeometricPrimitive<T> : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder where T : struct, IVertex
Type Parameters
| Name | Description |
|---|---|
| T |
| Name | Description | |
|---|---|---|
| Constructors | ||
| GeometricPrimitive(GraphicsDevice, GeometricMeshData<T>) | ||
| Fields | ||
| GraphicsDevice | The default graphics device. |
|
| IndexBuffer | The index buffer used by this geometric primitive. |
|
| IsIndex32Bits | True if the index buffer is a 32 bit index buffer. |
|
| PipelineState | The pipeline state. |
|
| VertexBuffer | The vertex buffer used by this geometric primitive. |
|
| VertexBufferBinding | The input layout used by this geometric primitive (shared for all geometric primitive). |
|
| Methods | ||
| Draw(GraphicsContext, EffectInstance) | Draws this GeometricPrimitive. |
|
Constructors
GeometricPrimitive(GraphicsDevice, GeometricMeshData<T>)
public GeometricPrimitive(GraphicsDevice graphicsDevice, GeometricMeshData<T> geometryMesh)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsDevice | graphicsDevice | |
| GeometricMeshData<T> | geometryMesh |
Fields
GraphicsDevice
The default graphics device.
protected readonly GraphicsDevice GraphicsDevice
Field Value
| Type | Description |
|---|---|
| GraphicsDevice |
IndexBuffer
The index buffer used by this geometric primitive.
public readonly Buffer IndexBuffer
Field Value
| Type | Description |
|---|---|
| Buffer |
IsIndex32Bits
True if the index buffer is a 32 bit index buffer.
public readonly bool IsIndex32Bits
Field Value
| Type | Description |
|---|---|
| System.Boolean |
PipelineState
The pipeline state.
public readonly MutablePipelineState PipelineState
Field Value
| Type | Description |
|---|---|
| MutablePipelineState |
VertexBuffer
The vertex buffer used by this geometric primitive.
public readonly Buffer VertexBuffer
Field Value
| Type | Description |
|---|---|
| Buffer |
VertexBufferBinding
The input layout used by this geometric primitive (shared for all geometric primitive).
protected readonly VertexBufferBinding VertexBufferBinding
Field Value
| Type | Description |
|---|---|
| VertexBufferBinding |
Methods
Draw(GraphicsContext, EffectInstance)
Draws this GeometricPrimitive.
public void Draw(GraphicsContext graphicsContext, EffectInstance effectInstance)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsContext | graphicsContext | |
| EffectInstance | effectInstance |