PrimitiveProceduralModelBase Class
Namespace: Stride.Rendering.ProceduralModelsAssembly: Stride.Rendering.dll
Base class for primitive procedural model.
[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) | ||
Constructors
PrimitiveProceduralModelBase()
protected PrimitiveProceduralModelBase()
Fields
Scale
[DataMember(510)]
public Vector3 Scale
Field Value
| Type | Description |
|---|---|
| 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
| 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 |
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 |