Ejemplo n.º 1
0
        /// <summary>
        /// Decode network data.
        /// </summary>
        /// <param name="h"></param>
        /// <param name="br"></param>
        public virtual void Decode(Header h, BinaryReader br)
        {
            // Copy header values.
            Clone(h);

            entityID.Decode(br);
            forceID = ( ForceID )br.ReadByte();
            byte numOfArticulationParams = br.ReadByte();

            entityType.Decode(br);
            alternateEntityType.Decode(br);
            linearVelocity.Set(br.ReadSingle(), br.ReadSingle(), br.ReadSingle());
            location.Decode(br);
            orientation.Set(br.ReadSingle(), br.ReadSingle(), br.ReadSingle());
            appearance.Decode(br);
            deadReckoningParameter.Decode(br);
            marking.Decode(br);
            capabilities.Decode(br);
            variableParameters.Decode(br, numOfArticulationParams);
        }