public unsafe void Test_StructLayout_ii ()
{
for( Int32 i = 0; i < 100; ++ i)
{
Vector3 vec = GetNextRandomVector3();
GCHandle h_vec = GCHandle.Alloc(vec, GCHandleType.Pinned);
IntPtr vecAddress = h_vec.AddrOfPinnedObject();
Single[] data = new Single[3];
// nb: when Fixed32 and Half are moved back into the main
// dev branch there will be need for an extension method for
// Marshal that will perform the copy for those types.
MarshalHelper.Copy(vecAddress, data, 0, 3);
Assert.That(data[0], Is.EqualTo(vec.X));
Assert.That(data[1], Is.EqualTo(vec.Y));
Assert.That(data[2], Is.EqualTo(vec.Z));
h_vec.Free();
}
}