Table of Contents

Class PrimitiveProceduralModelBase

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

Base class for primitive procedural model.

[DataContract]
public abstract class PrimitiveProceduralModelBase : IProceduralModel
Inheritance
PrimitiveProceduralModelBase
Implements
Derived

Constructors

PrimitiveProceduralModelBase()

protected PrimitiveProceduralModelBase()

Fields

Scale

[DataMember(510)]
public Vector3 Scale

Field Value

Vector3

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

Vector3

MaterialInstance

Gets the material instance.

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

Property Value

MaterialInstance

The material instance.

MaterialInstances

Gets the collection of material instances used by this IProceduralModel/

public IEnumerable<KeyValuePair<string, MaterialInstance>> MaterialInstances { get; }

Property Value

IEnumerable<KeyValuePair<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

int

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

Vector2

The UV scale

Methods

CreatePrimitiveMeshData()

protected abstract GeometricMeshData<VertexPositionNormalTexture> CreatePrimitiveMeshData()

Returns

GeometricMeshData<VertexPositionNormalTexture>

Generate(IServiceRegistry)

public Model Generate(IServiceRegistry services)

Parameters

services IServiceRegistry

Returns

Model

Generate(IServiceRegistry, Model)

Creates a procedural model.

public void Generate(IServiceRegistry services, Model model)

Parameters

services IServiceRegistry

The services registry.

model Model

A model instance to fill with procedural content.

SetMaterial(string, Material)

public void SetMaterial(string name, Material material)

Parameters

name string
material Material