Model Class
Namespace: Stride.RenderingAssembly: Stride.Rendering.dll
Collection of Mesh, each one usually being a different LOD of the same Model. The effect system will select the appropriate LOD depending on distance, current pass, and other effect-specific requirements.
[DataSerializerGlobal(typeof(ReferenceSerializer<Model>), null, DataSerializerGenericMode.None, false, false, Profile = "Content")]
[ContentSerializer(typeof(DataContentSerializer<Model>))]
[DataContract]
public class Model : IEnumerable
| Name | Description | |
|---|---|---|
| Properties | ||
| BoundingBox | Gets or sets the bounding box encompassing all the Meshes (not including animation). |
|
| BoundingSphere | Gets or sets the bounding sphere encompassing all the Meshes (not including animation). |
|
| Children | Gets the views. |
|
| Materials | Gets the materials. |
|
| Meshes | Gets the meshes. |
|
| Skeleton | Gets or sets the hierarchy definition, which describes nodes name, default transformation and hierarchical parent. |
|
| Methods | ||
| Add(MaterialInstance) | Adds the specified material (for collection Initializers). |
|
| Add(Mesh) | Adds the specified mesh (for collection Initializers). |
|
| Add(Model) | Adds the specified model view (for collection Initializers). |
|
| Instantiate() | Create a clone with its own ParameterCollection. It allows reuse of a single Model for multiple ModelComponent. |
|
| Explicit Interface Implementations | ||
| IEnumerable.GetEnumerator() | ||
Properties
BoundingBox
Gets or sets the bounding box encompassing all the Meshes (not including animation).
public BoundingBox BoundingBox { get; set; }
Property Value
| Type | Description |
|---|---|
| BoundingBox | The bounding box. |
BoundingSphere
Gets or sets the bounding sphere encompassing all the Meshes (not including animation).
public BoundingSphere BoundingSphere { get; set; }
Property Value
| Type | Description |
|---|---|
| BoundingSphere | The bounding sphere. |
Children
Gets the views.
public IList<Model> Children { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IList<Model> | The views. |
Materials
Gets the materials.
public List<MaterialInstance> Materials { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<MaterialInstance> | The materials. |
Meshes
Gets the meshes.
public List<Mesh> Meshes { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<Mesh> | The meshes. |
Skeleton
Gets or sets the hierarchy definition, which describes nodes name, default transformation and hierarchical parent.
public Skeleton Skeleton { get; set; }
Property Value
| Type | Description |
|---|---|
| Skeleton | The hierarchy, which describes nodes name, default transformation and hierarchical parent. |
Methods
Add(MaterialInstance)
Adds the specified material (for collection Initializers).
public void Add(MaterialInstance material)
Parameters
| Type | Name | Description |
|---|---|---|
| MaterialInstance | material | The mesh. |
Add(Mesh)
Adds the specified mesh (for collection Initializers).
public void Add(Mesh mesh)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | mesh | The mesh. |
Add(Model)
Adds the specified model view (for collection Initializers).
public void Add(Model model)
Parameters
| Type | Name | Description |
|---|---|---|
| Model | model | The model view. |
Instantiate()
Create a clone with its own ParameterCollection. It allows reuse of a single Model for multiple ModelComponent.
public Model Instantiate()
Returns
| Type | Description |
|---|---|
| Model |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator |