Browse Source

Fixed typo in enum value

Jorrit Rouwe 1 year ago
parent
commit
5df24378b1

+ 4 - 4
Jolt/Physics/Constraints/PathConstraint.cpp

@@ -168,7 +168,7 @@ void PathConstraint::CalculateConstraintProperties(float inDeltaTime)
 		mHingeConstraintPart.CalculateConstraintProperties(*mBody1, transform1.GetRotation(), mPathBinormal, *mBody2, transform2.GetRotation(), path_to_world_2.GetAxisY());
 		mHingeConstraintPart.CalculateConstraintProperties(*mBody1, transform1.GetRotation(), mPathBinormal, *mBody2, transform2.GetRotation(), path_to_world_2.GetAxisY());
 		break;
 		break;
 
 
-	case EPathRotationConstraintType::ConstaintToPath:
+	case EPathRotationConstraintType::ConstainToPath:
 		// We need to calculate the inverse of the rotation from body 1 to body 2 for the current path position (see: RotationEulerConstraintPart::sGetInvInitialOrientation)
 		// We need to calculate the inverse of the rotation from body 1 to body 2 for the current path position (see: RotationEulerConstraintPart::sGetInvInitialOrientation)
 		// RotationBody2 = RotationBody1 * InitialOrientation <=> InitialOrientation^-1 = RotationBody2^-1 * RotationBody1
 		// RotationBody2 = RotationBody1 * InitialOrientation <=> InitialOrientation^-1 = RotationBody2^-1 * RotationBody1
 		// We can express RotationBody2 in terms of RotationBody1: RotationBody2 = RotationBody1 * PathToBody1 * RotationClosestPointOnPath * PathToBody2^-1
 		// We can express RotationBody2 in terms of RotationBody1: RotationBody2 = RotationBody1 * PathToBody1 * RotationClosestPointOnPath * PathToBody2^-1
@@ -244,7 +244,7 @@ void PathConstraint::WarmStartVelocityConstraint(float inWarmStartImpulseRatio)
 		mHingeConstraintPart.WarmStart(*mBody1, *mBody2, inWarmStartImpulseRatio);
 		mHingeConstraintPart.WarmStart(*mBody1, *mBody2, inWarmStartImpulseRatio);
 		break;
 		break;
 
 
-	case EPathRotationConstraintType::ConstaintToPath:
+	case EPathRotationConstraintType::ConstainToPath:
 	case EPathRotationConstraintType::FullyConstrained:
 	case EPathRotationConstraintType::FullyConstrained:
 		mRotationConstraintPart.WarmStart(*mBody1, *mBody2, inWarmStartImpulseRatio);
 		mRotationConstraintPart.WarmStart(*mBody1, *mBody2, inWarmStartImpulseRatio);
 		break;
 		break;
@@ -306,7 +306,7 @@ bool PathConstraint::SolveVelocityConstraint(float inDeltaTime)
 		rot = mHingeConstraintPart.SolveVelocityConstraint(*mBody1, *mBody2);
 		rot = mHingeConstraintPart.SolveVelocityConstraint(*mBody1, *mBody2);
 		break;
 		break;
 
 
-	case EPathRotationConstraintType::ConstaintToPath:
+	case EPathRotationConstraintType::ConstainToPath:
 	case EPathRotationConstraintType::FullyConstrained:
 	case EPathRotationConstraintType::FullyConstrained:
 		rot = mRotationConstraintPart.SolveVelocityConstraint(*mBody1, *mBody2);
 		rot = mRotationConstraintPart.SolveVelocityConstraint(*mBody1, *mBody2);
 		break;
 		break;
@@ -350,7 +350,7 @@ bool PathConstraint::SolvePositionConstraint(float inDeltaTime, float inBaumgart
 		rot = mHingeConstraintPart.SolvePositionConstraint(*mBody1, *mBody2, inBaumgarte);
 		rot = mHingeConstraintPart.SolvePositionConstraint(*mBody1, *mBody2, inBaumgarte);
 		break;
 		break;
 
 
-	case EPathRotationConstraintType::ConstaintToPath:
+	case EPathRotationConstraintType::ConstainToPath:
 	case EPathRotationConstraintType::FullyConstrained:
 	case EPathRotationConstraintType::FullyConstrained:
 		rot = mRotationConstraintPart.SolvePositionConstraint(*mBody1, *mBody2, mInvInitialOrientation, inBaumgarte);
 		rot = mRotationConstraintPart.SolvePositionConstraint(*mBody1, *mBody2, mInvInitialOrientation, inBaumgarte);
 		break;
 		break;

+ 1 - 1
Jolt/Physics/Constraints/PathConstraint.h

@@ -21,7 +21,7 @@ enum class EPathRotationConstraintType
 	ConstrainAroundTangent,			///< Only allow rotation around the tangent vector (following the path)
 	ConstrainAroundTangent,			///< Only allow rotation around the tangent vector (following the path)
 	ConstrainAroundNormal,			///< Only allow rotation around the normal vector (perpendicular to the path)
 	ConstrainAroundNormal,			///< Only allow rotation around the normal vector (perpendicular to the path)
 	ConstrainAroundBinormal,		///< Only allow rotation around the binormal vector (perpendicular to the path)
 	ConstrainAroundBinormal,		///< Only allow rotation around the binormal vector (perpendicular to the path)
-	ConstaintToPath,				///< Fully constrain the rotation of body 2 to the path (follwing the tangent and normal of the path)
+	ConstainToPath,					///< Fully constrain the rotation of body 2 to the path (follwing the tangent and normal of the path)
 	FullyConstrained,				///< Fully constrain the rotation of the body 2 to the rotation of body 1
 	FullyConstrained,				///< Fully constrain the rotation of the body 2 to the rotation of body 1
 };
 };