Ejemplo n.º 1
0
 public Human(uint version)
 {
     m_RootX = version < AssetCabinet.VERSION_5_4_1
                         ? new xform(Vector4.Zero, Quaternion.Identity, Vector4.Zero)
                         : new xform(Vector3.Zero, Quaternion.Identity, Vector3.Zero);
     m_Skeleton       = new Skeleton();
     m_SkeletonPose   = new SkeletonPose();
     m_LeftHand       = new Hand();
     m_RightHand      = new Hand();
     m_Handles        = new List <Handle>();
     m_ColliderArray  = new List <Collider>();
     m_HumanBoneIndex = new List <int>();
     m_HumanBoneMass  = new List <float>();
     m_ColliderIndex  = new List <int>();
 }
Ejemplo n.º 2
0
 public AvatarConstant(uint version)
 {
     m_AvatarSkeleton      = new Skeleton();
     m_AvatarSkeletonPose  = new SkeletonPose();
     m_DefaultPose         = new SkeletonPose();
     m_SkeletonNameIDArray = new List <uint>();
     m_Human = new Human(version);
     m_HumanSkeletonIndexArray        = new List <int>();
     m_HumanSkeletonReverseIndexArray = new List <int>();
     m_RootMotionBoneX = version < AssetCabinet.VERSION_5_4_1
                         ? new xform(Vector4.Zero, Quaternion.Identity, Vector4.Zero)
                         : new xform(Vector3.Zero, Quaternion.Identity, Vector3.Zero);
     m_RootMotionSkeleton           = new Skeleton();
     m_RootMotionSkeletonPose       = new SkeletonPose();
     m_RootMotionSkeletonIndexArray = new List <int>();
 }
Ejemplo n.º 3
0
        public AvatarConstant(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            m_AvatarSkeleton     = new Skeleton(stream);
            m_AvatarSkeletonPose = new SkeletonPose(stream);
            m_DefaultPose        = new SkeletonPose(stream);

            int numIDs = reader.ReadInt32();

            m_SkeletonNameIDArray = new List <uint>(numIDs);
            for (int i = 0; i < numIDs; i++)
            {
                m_SkeletonNameIDArray.Add(reader.ReadUInt32());
            }

            m_Human = new Human(stream);

            int numIndexes = reader.ReadInt32();

            m_HumanSkeletonIndexArray = new List <int>(numIndexes);
            for (int i = 0; i < numIndexes; i++)
            {
                m_HumanSkeletonIndexArray.Add(reader.ReadInt32());
            }

            int numReverseIndexes = reader.ReadInt32();

            m_HumanSkeletonReverseIndexArray = new List <int>(numReverseIndexes);
            for (int i = 0; i < numReverseIndexes; i++)
            {
                m_HumanSkeletonReverseIndexArray.Add(reader.ReadInt32());
            }

            m_RootMotionBoneIndex    = reader.ReadInt32();
            m_RootMotionBoneX        = new xform(stream);
            m_RootMotionSkeleton     = new Skeleton(stream);
            m_RootMotionSkeletonPose = new SkeletonPose(stream);

            int numMotionIndexes = reader.ReadInt32();

            m_RootMotionSkeletonIndexArray = new List <int>(numMotionIndexes);
            for (int i = 0; i < numMotionIndexes; i++)
            {
                m_RootMotionSkeletonIndexArray.Add(reader.ReadInt32());
            }
        }
Ejemplo n.º 4
0
        public Human(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            m_RootX        = new xform(stream);
            m_Skeleton     = new Skeleton(stream);
            m_SkeletonPose = new SkeletonPose(stream);
            m_LeftHand     = new Hand(stream);
            m_RightHand    = new Hand(stream);

            int numHandles = reader.ReadInt32();

            m_Handles = new List <Handle>(numHandles);
            for (int i = 0; i < numHandles; i++)
            {
                m_Handles.Add(new Handle(stream));
            }

            int numColliders = reader.ReadInt32();

            m_ColliderArray = new List <Collider>(numColliders);
            for (int i = 0; i < numColliders; i++)
            {
                m_ColliderArray.Add(new Collider(stream));
            }

            int numIndexes = reader.ReadInt32();

            m_HumanBoneIndex = new List <int>(numIndexes);
            for (int i = 0; i < numIndexes; i++)
            {
                m_HumanBoneIndex.Add(reader.ReadInt32());
            }

            int numMasses = reader.ReadInt32();

            m_HumanBoneMass = new List <float>(numMasses);
            for (int i = 0; i < numMasses; i++)
            {
                m_HumanBoneMass.Add(reader.ReadSingle());
            }

            int numColliderIndexes = reader.ReadInt32();

            m_ColliderIndex = new List <int>(numColliderIndexes);
            for (int i = 0; i < numColliderIndexes; i++)
            {
                m_ColliderIndex.Add(reader.ReadInt32());
            }

            m_Scale         = reader.ReadSingle();
            m_ArmTwist      = reader.ReadSingle();
            m_ForeArmTwist  = reader.ReadSingle();
            m_UpperLegTwist = reader.ReadSingle();
            m_LegTwist      = reader.ReadSingle();
            m_ArmStretch    = reader.ReadSingle();
            m_LegStretch    = reader.ReadSingle();
            m_FeetSpacing   = reader.ReadSingle();
            m_HasLeftHand   = reader.ReadBoolean();
            m_HasRightHand  = reader.ReadBoolean();
            reader.ReadBytes(2);
        }
Ejemplo n.º 5
0
        public Human(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            m_RootX = new xform(stream);
            m_Skeleton = new Skeleton(stream);
            m_SkeletonPose = new SkeletonPose(stream);
            m_LeftHand = new Hand(stream);
            m_RightHand = new Hand(stream);

            int numHandles = reader.ReadInt32();
            m_Handles = new List<Handle>(numHandles);
            for (int i = 0; i < numHandles; i++)
            {
                m_Handles.Add(new Handle(stream));
            }

            int numColliders = reader.ReadInt32();
            m_ColliderArray = new List<Collider>(numColliders);
            for (int i = 0; i < numColliders; i++)
            {
                m_ColliderArray.Add(new Collider(stream));
            }

            int numIndexes = reader.ReadInt32();
            m_HumanBoneIndex = new List<int>(numIndexes);
            for (int i = 0; i < numIndexes; i++)
            {
                m_HumanBoneIndex.Add(reader.ReadInt32());
            }

            int numMasses = reader.ReadInt32();
            m_HumanBoneMass = new List<float>(numMasses);
            for (int i = 0; i < numMasses; i++)
            {
                m_HumanBoneMass.Add(reader.ReadSingle());
            }

            int numColliderIndexes = reader.ReadInt32();
            m_ColliderIndex = new List<int>(numColliderIndexes);
            for (int i = 0; i < numColliderIndexes; i++)
            {
                m_ColliderIndex.Add(reader.ReadInt32());
            }

            m_Scale = reader.ReadSingle();
            m_ArmTwist = reader.ReadSingle();
            m_ForeArmTwist = reader.ReadSingle();
            m_UpperLegTwist = reader.ReadSingle();
            m_LegTwist = reader.ReadSingle();
            m_ArmStretch = reader.ReadSingle();
            m_LegStretch = reader.ReadSingle();
            m_FeetSpacing = reader.ReadSingle();
            m_HasLeftHand = reader.ReadBoolean();
            m_HasRightHand = reader.ReadBoolean();
            reader.ReadBytes(2);
        }
Ejemplo n.º 6
0
        public AvatarConstant(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            m_AvatarSkeleton = new Skeleton(stream);
            m_AvatarSkeletonPose = new SkeletonPose(stream);
            m_DefaultPose = new SkeletonPose(stream);

            int numIDs = reader.ReadInt32();
            m_SkeletonNameIDArray = new List<uint>(numIDs);
            for (int i = 0; i < numIDs; i++)
            {
                m_SkeletonNameIDArray.Add(reader.ReadUInt32());
            }

            m_Human = new Human(stream);

            int numIndexes = reader.ReadInt32();
            m_HumanSkeletonIndexArray = new List<int>(numIndexes);
            for (int i = 0; i < numIndexes; i++)
            {
                m_HumanSkeletonIndexArray.Add(reader.ReadInt32());
            }

            int numReverseIndexes = reader.ReadInt32();
            m_HumanSkeletonReverseIndexArray = new List<int>(numReverseIndexes);
            for (int i = 0; i < numReverseIndexes; i++)
            {
                m_HumanSkeletonReverseIndexArray.Add(reader.ReadInt32());
            }

            m_RootMotionBoneIndex = reader.ReadInt32();
            m_RootMotionBoneX = new xform(stream);
            m_RootMotionSkeleton = new Skeleton(stream);
            m_RootMotionSkeletonPose = new SkeletonPose(stream);

            int numMotionIndexes = reader.ReadInt32();
            m_RootMotionSkeletonIndexArray = new List<int>(numMotionIndexes);
            for (int i = 0; i < numMotionIndexes; i++)
            {
                m_RootMotionSkeletonIndexArray.Add(reader.ReadInt32());
            }
        }