Table of Contents

Class ModelMesh

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

Represents a mesh that is part of a Model.

public sealed class ModelMesh
Inheritance
ModelMesh
Inherited Members

Constructors

ModelMesh(GraphicsDevice, List<ModelMeshPart>)

Creates a new instance of ModelMesh.

public ModelMesh(GraphicsDevice graphicsDevice, List<ModelMeshPart> parts)

Parameters

graphicsDevice GraphicsDevice

The graphicss device.

parts List<ModelMeshPart>

Parts of this mesh.

Properties

BoundingSphere

Gets the BoundingSphere that encompasses this mesh.

public BoundingSphere BoundingSphere { get; set; }

Property Value

BoundingSphere

Effects

Gets a collection of effects associated with this mesh.

public ModelEffectCollection Effects { get; }

Property Value

ModelEffectCollection

MeshParts

Gets the collection of ModelMeshPart objects that make up this mesh. Each part of a mesh is composed of a set of primitives that share the same material.

public ModelMeshPartCollection MeshParts { get; set; }

Property Value

ModelMeshPartCollection

Name

Gets the name of this mesh.

public string Name { get; set; }

Property Value

string

ParentBone

Gets the parent bone for this mesh.

The parent bone of a mesh contains a transformation matrix that describes how the mesh is located relative to any parent meshes in a model.
public ModelBone ParentBone { get; set; }

Property Value

ModelBone

Tag

Gets or sets an object identifying this mesh.

public object Tag { get; set; }

Property Value

object

Methods

Draw()

Draws all of the ModelMeshPart objects in this mesh, using their current Effect settings.

public void Draw()