فهرست منبع

Update BVHLoader.cpp

Fix compiler warning: not handled enum in switch.
Kim Kulling 7 سال پیش
والد
کامیت
dd8cf73415
1فایلهای تغییر یافته به همراه23 افزوده شده و 8 حذف شده
  1. 23 8
      code/BVHLoader.cpp

+ 23 - 8
code/BVHLoader.cpp

@@ -490,11 +490,19 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
 						throw DeadlyImportError("Missing position channel in node " + nodeName);
 						throw DeadlyImportError("Missing position channel in node " + nodeName);
 					else {
 					else {
 						int channelIdx = mapIter->second;
 						int channelIdx = mapIter->second;
-						switch (channel)
-						{
-						case Channel_PositionX: poskey->mValue.x = node.mChannelValues[fr * node.mChannels.size() + channelIdx]; break;
-						case Channel_PositionY: poskey->mValue.y = node.mChannelValues[fr * node.mChannels.size() + channelIdx]; break;
-						case Channel_PositionZ: poskey->mValue.z = node.mChannelValues[fr * node.mChannels.size() + channelIdx]; break;
+						switch (channel) {
+						    case Channel_PositionX: 
+                                poskey->mValue.x = node.mChannelValues[fr * node.mChannels.size() + channelIdx]; 
+                                break;
+						    case Channel_PositionY: 
+                                poskey->mValue.y = node.mChannelValues[fr * node.mChannels.size() + channelIdx]; 
+                                break;
+						    case Channel_PositionZ: 
+                                poskey->mValue.z = node.mChannelValues[fr * node.mChannels.size() + channelIdx]; 
+                                break;
+                                
+                            default:
+                                break;
 						}
 						}
 
 
 					}
 					}
@@ -537,9 +545,16 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
 						// Compute rotation transformations in the right order
 						// Compute rotation transformations in the right order
 						switch (channel)
 						switch (channel)
 						{
 						{
-							case Channel_RotationX: aiMatrix4x4::RotationX(angle, temp); rotMatrix *= aiMatrix3x3(temp); break;
-							case Channel_RotationY: aiMatrix4x4::RotationY(angle, temp); rotMatrix *= aiMatrix3x3(temp);  break;
-							case Channel_RotationZ: aiMatrix4x4::RotationZ(angle, temp); rotMatrix *= aiMatrix3x3(temp); break;
+							case Channel_RotationX: 
+                                aiMatrix4x4::RotationX(angle, temp); rotMatrix *= aiMatrix3x3(temp); 
+                                break;
+							case Channel_RotationY: 
+                                aiMatrix4x4::RotationY(angle, temp); rotMatrix *= aiMatrix3x3(temp);  
+                                break;
+							case Channel_RotationZ: aiMatrix4x4::RotationZ(angle, temp); rotMatrix *= aiMatrix3x3(temp); 
+                                break;
+                            default:
+                                break;
 						}
 						}
 					}
 					}
                 }
                 }