Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    PrimitiveProceduralModelBase Class

    Namespace: Stride.Rendering.ProceduralModels
    Assembly: Stride.Rendering.dll

    Base class for primitive procedural model.

    System.Object → PrimitiveProceduralModelBase
    Derived from PrimitiveProceduralModelBase: CapsuleProceduralModel ConeProceduralModel CubeProceduralModel CylinderProceduralModel GeoSphereProceduralModel PlaneProceduralModel SphereProceduralModel TeapotProceduralModel TorusProceduralModel

    [DataContract]
    public abstract class PrimitiveProceduralModelBase : IProceduralModel
    Name Description
    Constructors
    PrimitiveProceduralModelBase()
    Fields
    Scale
    Properties
    LocalOffset

    Gets or sets the local offset that will be applied to the procedural model's vertexes.

    MaterialInstance

    Gets the material instance.

    MaterialInstances

    Gets the collection of material instances used by this IProceduralModel/

    NumberOfTextureCoordinates

    Gets or sets the number of texture coordinate channels to generate. A value between 1 and 10, inclusive.

    UvScale

    Gets or sets the UV scale.

    Methods
    CreatePrimitiveMeshData()
    Generate(IServiceRegistry, Model)
    SetMaterial(String, Material)
    | Improve this Doc View Source

    Constructors


    PrimitiveProceduralModelBase()

    protected PrimitiveProceduralModelBase()
    | Improve this Doc View Source

    Fields


    Scale

    [DataMember(510)]
    public Vector3 Scale
    Field Value
    Type Description
    Vector3
    | Improve this Doc View Source

    Properties


    LocalOffset

    Gets or sets the local offset that will be applied to the procedural model's vertexes.

    [DataMember(530)]
    public Vector3 LocalOffset { get; set; }
    Property Value
    Type Description
    Vector3

    MaterialInstance

    Gets the material instance.

    [DataMember(600)]
    [Display("Material", null)]
    public MaterialInstance MaterialInstance { get; }
    Property Value
    Type Description
    MaterialInstance

    The material instance.


    MaterialInstances

    Gets the collection of material instances used by this IProceduralModel/

    public IEnumerable<KeyValuePair<string, MaterialInstance>> MaterialInstances { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, MaterialInstance>>

    NumberOfTextureCoordinates

    Gets or sets the number of texture coordinate channels to generate. A value between 1 and 10, inclusive.

    [DataMember(540)]
    [DataMemberRange(1, 10)]
    [Display("Number of texture coordinate channels", null)]
    public int NumberOfTextureCoordinates { get; set; }
    Property Value
    Type Description
    System.Int32

    The number of texure coordinate channels.


    UvScale

    Gets or sets the UV scale.

    [DataMember(520)]
    [Display("UV Scale", null)]
    public Vector2 UvScale { get; set; }
    Property Value
    Type Description
    Vector2

    The UV scale

    | Improve this Doc View Source

    Methods


    CreatePrimitiveMeshData()

    protected abstract GeometricMeshData<VertexPositionNormalTexture> CreatePrimitiveMeshData()
    Returns
    Type Description
    GeometricMeshData<VertexPositionNormalTexture>

    Generate(IServiceRegistry, Model)

    public void Generate(IServiceRegistry services, Model model)
    Parameters
    Type Name Description
    IServiceRegistry services
    Model model

    SetMaterial(String, Material)

    public void SetMaterial(string name, Material material)
    Parameters
    Type Name Description
    System.String name
    Material material

    Extension Methods

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

    Back to top

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