Exemplo n.º 1
0
        public void ReadCompiledBone_801(BinaryReader b)
        {
            // Reads just a single 3xx byte entry of a bone.
            ControllerID = b.ReadUInt32();                 // unique id of bone (generated from bone name)
            limbID       = b.ReadInt32();
            b.BaseStream.Seek(208, SeekOrigin.Current);
            boneName     = b.ReadFString(48);
            offsetParent = b.ReadInt32();
            numChildren  = b.ReadUInt32();
            offsetChild  = b.ReadInt32();
            // TODO:  This may be quaternion and translation vectors.
            boneToWorld = new BONETOWORLD();
            boneToWorld.ReadBoneToWorld(b);
            worldToBone                   = new WORLDTOBONE();
            worldToBone.worldToBone       = new double[3, 4];
            worldToBone.worldToBone[0, 0] = boneToWorld.boneToWorld[0, 0];
            worldToBone.worldToBone[0, 1] = boneToWorld.boneToWorld[0, 1];
            worldToBone.worldToBone[0, 2] = boneToWorld.boneToWorld[0, 2];
            worldToBone.worldToBone[0, 3] = boneToWorld.boneToWorld[0, 3];
            worldToBone.worldToBone[1, 0] = boneToWorld.boneToWorld[1, 0];
            worldToBone.worldToBone[1, 1] = boneToWorld.boneToWorld[1, 1];
            worldToBone.worldToBone[1, 2] = boneToWorld.boneToWorld[1, 2];
            worldToBone.worldToBone[1, 3] = boneToWorld.boneToWorld[1, 3];
            worldToBone.worldToBone[2, 0] = boneToWorld.boneToWorld[2, 0];
            worldToBone.worldToBone[2, 1] = boneToWorld.boneToWorld[2, 1];
            worldToBone.worldToBone[2, 2] = boneToWorld.boneToWorld[2, 2];
            worldToBone.worldToBone[2, 3] = boneToWorld.boneToWorld[2, 3];

            childIDs = new List <uint>();                    // Calculated
        }
Exemplo n.º 2
0
 public void ReadCompiledBone(BinaryReader b)
 {
     // Reads just a single 584 byte entry of a bone.
     ControllerID    = b.ReadUInt32();              // unique id of bone (generated from bone name)
     physicsGeometry = new PhysicsGeometry[2];
     physicsGeometry[0].ReadPhysicsGeometry(b);     // LOD 0 is the physics of alive body,
     physicsGeometry[1].ReadPhysicsGeometry(b);     // LOD 1 is the physics of a dead body
     mass        = b.ReadSingle();
     worldToBone = new WORLDTOBONE();
     worldToBone.GetWorldToBone(b);
     boneToWorld = new BONETOWORLD();
     boneToWorld.ReadBoneToWorld(b);
     boneName     = b.ReadFString(256);
     limbID       = b.ReadInt32();
     offsetParent = b.ReadInt32();
     numChildren  = b.ReadUInt32();
     offsetChild  = b.ReadInt32();
 }