Esempio n. 1
0
 public void SetChangingOptions(
     PoseCostType poseCostType,
     TrajectoryCostType trajectoryCostType,
     ContactPointCostType contactCostType,
     ContactStateMovemetType movementType,
     NativeArray <BoneData> currentPose,
     NativeArray <TrajectoryPoint> currentTrajectory,
     NativeArray <FrameContact> currentContacts,
     NativeArray <float2> whereWeCanFindingPos,
     float trajectoryWeight,
     float poseWeight,
     float contactWeight
     )
 {
     this.poseCostType         = poseCostType;
     this.trajectoryCostType   = trajectoryCostType;
     this.contactCostType      = contactCostType;
     this.cntactMovmentType    = movementType;
     this.currentPose          = currentPose;
     this.currentTrajectory    = currentTrajectory;
     this.currentContactPoints = currentContacts;
     this.whereWeCanFindingPos = whereWeCanFindingPos;
     this.trajectoryWeight     = trajectoryWeight;
     this.poseWeight           = poseWeight;
     this.contactWeight        = contactWeight;
 }
Esempio n. 2
0
 public ContactStateFeatures()
 {
     contactMovementType = ContactStateMovemetType.ContactLand;
     contactCostType     = ContactPointCostType.PositionNormal_OR_Direction;
     adapt = false;
     contactPointsWeight = 1f;
     rotateToStart       = true;
     postionCorrection   = ContactPointPositionCorrectionType.MovePosition;
 }
        private void OnCreate()
        {
            currentMotionDataGroupIndex = 0;

            this.contactType = dataState.csFeatures.contactMovementType;
            this.contactCost = dataState.csFeatures.contactCostType;
            csJobs           = new MotionMatchingContactEnterJob[dataState.maxJobsCount];
            logicLayer.adaptedContactPoints = new List <MotionMatchingContact>();
            targetContactPointIndex         = 0;

            for (int i = 0; i < dataState.maxJobsCount; i++)
            {
                csJobs[i] = new MotionMatchingContactEnterJob();
                csJobs[i].SetBasicOptions(
                    this.dataState.motionDataGroups[currentMotionDataGroupIndex].framesInfoPerJob[i],
                    this.dataState.motionDataGroups[currentMotionDataGroupIndex].bonesPerJob[i],
                    this.dataState.motionDataGroups[currentMotionDataGroupIndex].trajectoryPointsPerJob[i],
                    this.dataState.motionDataGroups[currentMotionDataGroupIndex].contactPointsPerJob[i],
                    bestInfosFromJob[i],
                    this.dataState.csFeatures.middleContactsCount
                    );
            }
        }
Esempio n. 4
0
        public void DrawNormalContactStateFeatures()
        {
            //GUILayout.BeginHorizontal();
            //GUILayout.Space(10);
            //features.adapt = EditorGUILayout.Toggle(new GUIContent("Adapt movemet"), features.adapt);
            //GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Space(10);
            rotateToStart = EditorGUILayout.Toggle(new GUIContent("Rotate to start"), rotateToStart);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Space(10);
            rotateToContacts = EditorGUILayout.Toggle(new GUIContent("Rotate to contacts"), rotateToContacts);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Space(10);
            rotateOnContacts = EditorGUILayout.Toggle(new GUIContent("Rotate on contacts"), rotateOnContacts);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Space(10);
            postionCorrection = (ContactPointPositionCorrectionType)EditorGUILayout.EnumPopup(new GUIContent("Position correction"), postionCorrection);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Space(10);
            contactMovementType = (ContactStateMovemetType)EditorGUILayout.EnumPopup(new GUIContent("Contact type"), contactMovementType);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Space(10);
            middleContactsCount = EditorGUILayout.IntField(new GUIContent("Contacts count"), middleContactsCount);
            GUILayout.EndHorizontal();
        }