void UpdateVertexBuffer(byte[] data) { m_OldX = m_PosX; m_OldY = m_PosY; m_OldZ = m_PosZ; for (int i = 0; i < m_VertexBuffer.Length; i++) { Buffer.BlockCopy(m_VertexBuffer[i], 0, m_VertexBuffer_old[i], 0, m_VertexBuffer[i].Length * sizeof(float)); } int keyFrame; int result = m_VertexContainer.Decode( data, ref m_VertexBuffer, out m_PosX, out m_PosY, out m_PosZ, out keyFrame ); }
public bool VerticesReceived(byte[] data) { if (!isRequestComplete || data == null) { return(false); } old_x = pos_x; old_y = pos_y; old_z = pos_z; for (int i = 0; i < vertsBuf.Length; i++) { Buffer.BlockCopy(vertsBuf[i], 0, vertsBuf_old[i], 0, vertsBuf[i].Length * sizeof(float)); } int keyFrame; int result = vPack.Decode( data, ref vertsBuf, out pos_x, out pos_y, out pos_z, out keyFrame); timeWeight = 0.0f; return(keyFrame == 1); }