protected void ReadMorphKeyframe( BinaryReader reader, VertexAnimationTrack track )
{
float time = ReadFloat( reader );
VertexMorphKeyFrame mkf = track.CreateVertexMorphKeyFrame( time );
int vertexCount = track.TargetVertexData.vertexCount;
// create/populate vertex buffer
VertexDeclaration decl = HardwareBufferManager.Instance.CreateVertexDeclaration();
decl.AddElement( 0, 0, VertexElementType.Float3, VertexElementSemantic.Position );
HardwareVertexBuffer buffer = HardwareBufferManager.Instance.CreateVertexBuffer( decl, vertexCount, BufferUsage.Static, true );
// lock the buffer for editing
IntPtr vertices = buffer.Lock( BufferLocking.Discard );
// stuff the floats into the normal buffer
ReadFloats( reader, vertexCount * 3, vertices );
// unlock the buffer to commit
buffer.Unlock();
mkf.VertexBuffer = buffer;
}