Explorar o código

Updating enums

TheComet %!s(int64=8) %!d(string=hai) anos
pai
achega
b5ded0814a
Modificáronse 2 ficheiros con 12 adicións e 5 borrados
  1. 8 1
      Source/Urho3D/IK/IK.h
  2. 4 4
      Source/Urho3D/IK/IKSolver.cpp

+ 8 - 1
Source/Urho3D/IK/IK.h

@@ -22,10 +22,17 @@
 
 /*
  * TODO IK todo
+ *  - Actually implement tolerance.
  *  - Target angle in addition to target position -> use weighted angles
  *    approach
- *  - Pole targets?
+ *  - Nlerp weighted effectors using total chain length + root node as axis
+ *    of rotation (so arm moves in a circle, for example)
+ *  - Fix rotation issue with shared sub-base nodes -> rotations need to be
+ *    averaged.
  *  - Add support for manually updating initial pose.
+ *  - Pole targets?
+ *  - Support for "stretchiness" with min/max lengths.
+ *  - Support for "stiffness" factor, describes how well a bone rotates.
  *  - Apply bullet constraints to joints.
  *  - Script bindings.
  *  - Optimise.

+ 4 - 4
Source/Urho3D/IK/IKSolver.cpp

@@ -140,7 +140,7 @@ void IKSolver::SetAlgorithm(IKSolver::Algorithm algorithm)
         case FABRIK: solver_ = ik_solver_create(SOLVER_FABRIK); break;
     }
 
-    solver_->flags = SOLVER_CALCULATE_FINAL_ANGLES;
+    solver_->flags = SOLVER_CALCULATE_FINAL_ROTATIONS;
 
     ik_log_register_listener(HandleIKLog);
 }
@@ -174,15 +174,15 @@ void IKSolver::SetTolerance(float tolerance)
 // ----------------------------------------------------------------------------
 bool IKSolver::DoCalculateFinalAngles() const
 {
-    return solver_->flags & SOLVER_CALCULATE_FINAL_ANGLES;
+    return solver_->flags & SOLVER_CALCULATE_FINAL_ROTATIONS;
 }
 
 // ----------------------------------------------------------------------------
 void IKSolver::SetCalculateFinalAngles(bool enable)
 {
-    solver_->flags &= ~SOLVER_CALCULATE_FINAL_ANGLES;
+    solver_->flags &= ~SOLVER_CALCULATE_FINAL_ROTATIONS;
     if (enable)
-        solver_->flags |= SOLVER_CALCULATE_FINAL_ANGLES;
+        solver_->flags |= SOLVER_CALCULATE_FINAL_ROTATIONS;
 }
 
 // ----------------------------------------------------------------------------