2012-10-16 16:43:18 +00:00
|
|
|
#region Using Statements
|
2011-11-07 21:19:15 +00:00
|
|
|
using System;
|
2012-09-04 08:31:17 +00:00
|
|
|
using ANX.Framework.NonXNA.Development;
|
2011-11-07 21:19:15 +00:00
|
|
|
|
2012-10-16 16:43:18 +00:00
|
|
|
#endregion
|
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-11-07 21:19:15 +00:00
|
|
|
|
|
|
|
namespace ANX.Framework.Graphics
|
|
|
|
{
|
2012-09-04 08:31:17 +00:00
|
|
|
[PercentageComplete(100)]
|
2012-10-16 16:43:18 +00:00
|
|
|
[Developer("Glatzemann")]
|
2012-09-04 08:31:17 +00:00
|
|
|
[TestState(TestStateAttribute.TestState.Untested)]
|
|
|
|
public sealed class ModelMeshPart
|
|
|
|
{
|
|
|
|
#region Private
|
|
|
|
internal ModelMesh parentMesh;
|
|
|
|
private Effect effect;
|
2012-10-13 11:25:07 +00:00
|
|
|
#endregion
|
2012-09-04 08:31:17 +00:00
|
|
|
|
|
|
|
#region Public
|
|
|
|
public Effect Effect
|
|
|
|
{
|
|
|
|
get { return effect; }
|
|
|
|
set
|
|
|
|
{
|
|
|
|
if (this.effect != value)
|
|
|
|
{
|
|
|
|
var old = this.effect;
|
|
|
|
this.effect = value;
|
|
|
|
this.parentMesh.EffectChangedOnMeshPart(this, old, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-13 11:25:07 +00:00
|
|
|
public IndexBuffer IndexBuffer { get; internal set; }
|
|
|
|
public int NumVertices { get; private set; }
|
|
|
|
public int PrimitiveCount { get; private set; }
|
|
|
|
public int StartIndex { get; private set; }
|
|
|
|
public object Tag { get; set; }
|
|
|
|
public VertexBuffer VertexBuffer { get; internal set; }
|
|
|
|
public int VertexOffset { get; private set; }
|
|
|
|
#endregion
|
2012-09-04 08:31:17 +00:00
|
|
|
|
|
|
|
internal ModelMeshPart(int vertexOffset, int numVertices, int startIndex, int primitiveCount, object tag)
|
|
|
|
{
|
2012-10-13 11:25:07 +00:00
|
|
|
this.VertexOffset = vertexOffset;
|
|
|
|
this.NumVertices = numVertices;
|
|
|
|
this.StartIndex = startIndex;
|
|
|
|
this.PrimitiveCount = primitiveCount;
|
|
|
|
this.Tag = tag;
|
2012-09-04 08:31:17 +00:00
|
|
|
}
|
|
|
|
}
|
2011-11-07 21:19:15 +00:00
|
|
|
}
|