Example #1
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();
 }
Example #2
0
        public             String[] childNames;               // Not part of read struct.  Contains the keys of the children to this bone

        public void ReadCompiledBone(BinaryReader b)
        {
            // Reads just a single 584 byte entry of a bone. At the end the seek position will be advanced, so keep that in mind.
            controllerID    = b.ReadUInt32();
            physicsGeometry = new PhysicsGeometry[2];
            physicsGeometry[0].ReadPhysicsGeometry(b);
            physicsGeometry[1].ReadPhysicsGeometry(b);
            mass        = b.ReadSingle();
            worldToBone = new WORLDTOBONE();
            worldToBone.GetWorldToBone(b);
            boneToWorld = new BONETOWORLD();
            boneToWorld.GetBoneToWorld(b);
            boneName     = b.ReadFString(256);
            limbID       = b.ReadUInt32();
            offsetParent = b.ReadInt32();
            numChildren  = b.ReadUInt32();
            offsetChild  = b.ReadInt32();
            childNames   = new String[numChildren];
        }