- implemented ModelBone properties
- implemented ModelMesh properties - implemented ModelMeshPart properties - implemented Model properties - implemented ModelReader
This commit is contained in:
parent
4105de3c1a
commit
5be5be2c84
@ -64,6 +64,7 @@
|
|||||||
<Compile Include="Content\Decompressor.cs" />
|
<Compile Include="Content\Decompressor.cs" />
|
||||||
<Compile Include="Content\GraphicTypeReaders\EffectReader.cs" />
|
<Compile Include="Content\GraphicTypeReaders\EffectReader.cs" />
|
||||||
<Compile Include="Content\GraphicTypeReaders\IndexBufferReader.cs" />
|
<Compile Include="Content\GraphicTypeReaders\IndexBufferReader.cs" />
|
||||||
|
<Compile Include="Content\GraphicTypeReaders\ModelReader.cs" />
|
||||||
<Compile Include="Content\GraphicTypeReaders\SpriteFontReader.cs" />
|
<Compile Include="Content\GraphicTypeReaders\SpriteFontReader.cs" />
|
||||||
<Compile Include="Content\GraphicTypeReaders\Texture2DReader.cs" />
|
<Compile Include="Content\GraphicTypeReaders\Texture2DReader.cs" />
|
||||||
<Compile Include="Content\GraphicTypeReaders\Texture3DReader.cs" />
|
<Compile Include="Content\GraphicTypeReaders\Texture3DReader.cs" />
|
||||||
|
@ -54,6 +54,43 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
public sealed class Model
|
public sealed class Model
|
||||||
{
|
{
|
||||||
|
private ModelBoneCollection bones;
|
||||||
|
|
||||||
|
public ModelBoneCollection Bones
|
||||||
|
{
|
||||||
|
get { return bones; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private ModelMeshCollection meshes;
|
||||||
|
|
||||||
|
public ModelMeshCollection Meshes
|
||||||
|
{
|
||||||
|
get { return meshes; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private ModelBone root;
|
||||||
|
|
||||||
|
public ModelBone Root
|
||||||
|
{
|
||||||
|
get { return root; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Object tag;
|
||||||
|
|
||||||
|
public Object Tag
|
||||||
|
{
|
||||||
|
get { return tag; }
|
||||||
|
set { tag = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Model(ModelBoneCollection bones, ModelMeshCollection meshes, ModelBone rootBone, Object tag)
|
||||||
|
{
|
||||||
|
this.bones = bones;
|
||||||
|
this.meshes = meshes;
|
||||||
|
this.root = rootBone;
|
||||||
|
this.tag = tag;
|
||||||
|
}
|
||||||
|
|
||||||
public void CopyAbsoluteBoneTransformsTo(Matrix[] destinationBoneTransforms)
|
public void CopyAbsoluteBoneTransformsTo(Matrix[] destinationBoneTransforms)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
@ -73,36 +110,5 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ModelBoneCollection Bones
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ModelMeshCollection Meshes
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ModelBone Root
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object Tag
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,49 +54,44 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
public sealed class ModelBone
|
public sealed class ModelBone
|
||||||
{
|
{
|
||||||
|
private ModelBoneCollection children;
|
||||||
public ModelBoneCollection Children
|
public ModelBoneCollection Children
|
||||||
{
|
{
|
||||||
get
|
get { return children; }
|
||||||
{
|
internal set { children = value; }
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int index;
|
||||||
public int Index
|
public int Index
|
||||||
{
|
{
|
||||||
get
|
get { return index; }
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string name;
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get
|
get { return name; }
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ModelBone parent;
|
||||||
public ModelBone Parent
|
public ModelBone Parent
|
||||||
{
|
{
|
||||||
get
|
get { return parent; }
|
||||||
{
|
internal set { parent = value; }
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Matrix transform;
|
||||||
public Matrix Transform
|
public Matrix Transform
|
||||||
{
|
{
|
||||||
get
|
get { return transform; }
|
||||||
{
|
set { transform = value; }
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ModelBone(string name, Matrix transform, int index)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
this.transform = transform;
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
#region License
|
#region License
|
||||||
@ -54,62 +55,61 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
public sealed class ModelMesh
|
public sealed class ModelMesh
|
||||||
{
|
{
|
||||||
|
private BoundingSphere boundingSphere;
|
||||||
|
|
||||||
|
public BoundingSphere BoundingSphere
|
||||||
|
{
|
||||||
|
get { return boundingSphere; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private ModelEffectCollection effects;
|
||||||
|
|
||||||
|
public ModelEffectCollection Effects
|
||||||
|
{
|
||||||
|
get { return effects; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private ModelMeshPartCollection meshParts;
|
||||||
|
|
||||||
|
public ModelMeshPartCollection MeshParts
|
||||||
|
{
|
||||||
|
get { return meshParts; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private string name;
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get { return name; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private ModelBone parentBone;
|
||||||
|
|
||||||
|
public ModelBone ParentBone
|
||||||
|
{
|
||||||
|
get { return parentBone; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Object tag;
|
||||||
|
|
||||||
|
public Object Tag
|
||||||
|
{
|
||||||
|
get { return tag; }
|
||||||
|
set { this.tag = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public ModelMesh(string name, ModelBone bone, BoundingSphere sphere, ModelMeshPart[] meshParts, Object tag)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
this.parentBone = bone;
|
||||||
|
this.boundingSphere = sphere;
|
||||||
|
this.tag = tag;
|
||||||
|
this.meshParts = new ModelMeshPartCollection(meshParts);
|
||||||
|
}
|
||||||
|
|
||||||
public void Draw()
|
public void Draw()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BoundingSphere BoundingSphere
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ModelEffectCollection Effects
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ModelMeshPartCollection MeshParts
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ModelBone ParentBone
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object Tag
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,76 +54,73 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
public sealed class ModelMeshPart
|
public sealed class ModelMeshPart
|
||||||
{
|
{
|
||||||
|
private Effect effect;
|
||||||
|
|
||||||
public Effect Effect
|
public Effect Effect
|
||||||
{
|
{
|
||||||
get
|
get { return effect; }
|
||||||
{
|
set { this.effect = value; }
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IndexBuffer IndexBuffer
|
private IndexBuffer indexBufer;
|
||||||
|
|
||||||
|
public IndexBuffer IndexBufer
|
||||||
{
|
{
|
||||||
get
|
get { return indexBufer; }
|
||||||
{
|
internal set { this.indexBufer = value; }
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int numVertices;
|
||||||
|
|
||||||
public int NumVertices
|
public int NumVertices
|
||||||
{
|
{
|
||||||
get
|
get { return numVertices; }
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int primitiveCount;
|
||||||
|
|
||||||
public int PrimitiveCount
|
public int PrimitiveCount
|
||||||
{
|
{
|
||||||
get
|
get { return primitiveCount; }
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int startIndex;
|
||||||
|
|
||||||
public int StartIndex
|
public int StartIndex
|
||||||
{
|
{
|
||||||
get
|
get { return startIndex; }
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object Tag
|
private Object tag;
|
||||||
|
|
||||||
|
public Object Tag
|
||||||
{
|
{
|
||||||
get
|
get { return tag; }
|
||||||
{
|
set { tag = value; }
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private VertexBuffer vertexBuffer;
|
||||||
|
|
||||||
public VertexBuffer VertexBuffer
|
public VertexBuffer VertexBuffer
|
||||||
{
|
{
|
||||||
get
|
get { return vertexBuffer; }
|
||||||
{
|
internal set { this.vertexBuffer = value; }
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int vertexOffset;
|
||||||
|
|
||||||
public int VertexOffset
|
public int VertexOffset
|
||||||
{
|
{
|
||||||
get
|
get { return vertexOffset; }
|
||||||
{
|
}
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
internal ModelMeshPart(int vertexOffset, int numVertices, int startIndex, int primitiveCount, object tag)
|
||||||
|
{
|
||||||
|
this.vertexOffset = vertexOffset;
|
||||||
|
this.numVertices = numVertices;
|
||||||
|
this.startIndex = startIndex;
|
||||||
|
this.primitiveCount = primitiveCount;
|
||||||
|
this.tag = tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user