Is this because you want to be able to position the TrianlgeMesh somewhere specific, and you can't do that?

it took me a while to figure that out myself…….

The magic NEEDS to happen inside **ExtractData(vertexList, indexList, model);**

I rewrote the method, just a little to support positioning, rotating and scaling (interesting that the library didn't already support this, but oh well)……..

I'll explain:

First, you need to take the position, rotation, and scale, and wrap it up in a WORLD Matrix.

That's done by:

..

..

..

**1. CREATE A WORLD MATRIX FOR YOUR DESIRED TRANSFORM**

`Matrix worldPosition = Matrix.CreateScale(_scale) * Matrix.CreateFromQuaternion(_rotation) * Matrix.CreateTranslation(_position);`

So, you should know that part already, because you need it to simply draw a model in your game where you want it.

Now that you know the WORLD Matrix, you need to transform EVERY vertex of your TriangleMesh using that world matrix, and more importantly, the 'translation' part of it.

..

..

..

This chunk of code in my rewritten method is what is responsible for putting your triangle mesh EXACTLY where you want it, with rotation and scale (the scale can be 3 dimensional too, so you can make it skinny or fat or tall or whatever)

**2. GO THROUGH ALL THE VERTICES THAT TRIANGLE MESH CREATES, AND TRANSLATE THEM TO YOUR WORLD MATRIX**

```
for (int i = 0; i != a.Length; ++i)
{
Vector3.Transform(ref a[i], ref xform, out a[i]);
// move the vertice point from 0-space to our desired world position
Vector3 p = a[i];
Matrix m = (Matrix.CreateTranslation(a[i]) * this.model.World);
a[i] = m.Translation;
}
```

..

..

Let's highlight a part of that code above…….

`Matrix m = (Matrix.CreateTranslation(a[i]) * this.model.World);`

Now, you might be wondering "what is **model.World** ?". Well, i have my own object, that wraps models and blah blah, so for you, you would change that one line to:

`Matrix m = (Matrix.CreateTranslation(a[i]) * My_World_Matrix_That_I_Use_To_Draw_My_Model);`

..

..

..

..

and finally, the complete method that you should use (don't forget to replace the **this.model.World** with what ever world matrix you make)

**3. OR, JUST BE LAZY AND COPY THIS CODE, HA**

```
public void ExtractData(List<Vector3> vertices, List<TriangleVertexIndices> indices, Model modelArg)
{
Matrix[] bones_ = new Matrix[modelArg.Bones.Count];
modelArg.CopyAbsoluteBoneTransformsTo(bones_);
foreach (ModelMesh mm in modelArg.Meshes)
{
Matrix xform = bones_[mm.ParentBone.Index];
foreach (ModelMeshPart mmp in mm.MeshParts)
{
int offset = vertices.Count;
Vector3[] a = new Vector3[mmp.NumVertices];
mm.VertexBuffer.GetData<Vector3>(mmp.StreamOffset + mmp.BaseVertex * mmp.VertexStride,
a, 0, mmp.NumVertices, mmp.VertexStride);
for (int i = 0; i != a.Length; ++i)
{
Vector3.Transform(ref a[i], ref xform, out a[i]);
// move the vertex from 0-space to our desired world position
Vector3 p = a[i];
Matrix m = (Matrix.CreateTranslation(a[i]) * this.model.World);
a[i] = m.Translation;
}
vertices.AddRange(a);
if (mm.IndexBuffer.IndexElementSize != IndexElementSize.SixteenBits)
throw new Exception(
String.Format("Model uses 32-bit indices, which are not supported."));
short[] s = new short[mmp.PrimitiveCount * 3];
mm.IndexBuffer.GetData<short>(mmp.StartIndex * 2, s, 0, mmp.PrimitiveCount * 3);
JigLibX.Geometry.TriangleVertexIndices[] tvi = new JigLibX.Geometry.TriangleVertexIndices[mmp.PrimitiveCount];
for (int i = 0; i != tvi.Length; ++i)
{
tvi[i].I0 = s[i * 3 + 2] + offset;
tvi[i].I1 = s[i * 3 + 1] + offset;
tvi[i].I2 = s[i * 3 + 0] + offset;
}
indices.AddRange(tvi);
}
}
}
```