Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    GeometricPrimitive<T> Class

    Namespace: Stride.Graphics.GeometricPrimitives
    Assembly: Stride.Graphics.dll

    A geometric primitive used to draw a simple model built from a set of vertices and indices.

    System.Object → DisposeBase → ComponentBase → GeometricPrimitive<T>
    Derived from GeometricPrimitive<T>: GeometricPrimitive

    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.

    | Improve this Doc View Source

    Constructors


    GeometricPrimitive(GraphicsDevice, GeometricMeshData<T>)

    public GeometricPrimitive(GraphicsDevice graphicsDevice, GeometricMeshData<T> geometryMesh)
    Parameters
    Type Name Description
    GraphicsDevice graphicsDevice
    GeometricMeshData<T> geometryMesh
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    Methods


    Draw(GraphicsContext, EffectInstance)

    Draws this GeometricPrimitive.

    public void Draw(GraphicsContext graphicsContext, EffectInstance effectInstance)
    Parameters
    Type Name Description
    GraphicsContext graphicsContext
    EffectInstance effectInstance

    Inherited Members

    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.Destroy()
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    GeometricPrimitiveExtensions.ToMeshDraw<T>(GeometricPrimitive<T>)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation