Просмотр исходного кода

Re-enabled scaling in skeletal animation, removed debug printfs from Image

Ivan Safrin 11 лет назад
Родитель
Сommit
445d4069e9
2 измененных файлов с 4 добавлено и 5 удалено
  1. 1 5
      Core/Contents/Source/PolyImage.cpp
  2. 3 0
      Core/Contents/Source/PolySkeleton.cpp

+ 1 - 5
Core/Contents/Source/PolyImage.cpp

@@ -598,9 +598,7 @@ void Image::freeTokens(TokenArray tokens) {
 }
 }
 
 
 bool Image::loadHDR(const String &fileName) {
 bool Image::loadHDR(const String &fileName) {
-    
-    printf("Loading HDR image\n");
-    
+        
     setPixelType(IMAGE_FP16);
     setPixelType(IMAGE_FP16);
 
 
     FILE *file = fopen (fileName.c_str(), "rb");
     FILE *file = fopen (fileName.c_str(), "rb");
@@ -641,8 +639,6 @@ bool Image::loadHDR(const String &fileName) {
     
     
     float *data = (float *)malloc(sizeof(float)*3*width*height);
     float *data = (float *)malloc(sizeof(float)*3*width*height);
     
     
-    printf("Reading fp pixels (%d x %d)\n", width, height);
-    
     RGBE_ReadPixels_RLE(file, data, width, height);
     RGBE_ReadPixels_RLE(file, data, width, height);
 
 
     float *hFloatImageData = (float*) malloc(sizeof(float)*3*width*height);
     float *hFloatImageData = (float*) malloc(sizeof(float)*3*width*height);

+ 3 - 0
Core/Contents/Source/PolySkeleton.cpp

@@ -442,6 +442,9 @@ void BoneTrack::Update(Number elapsed) {
     targetBone->setRotationByQuaternion(rotationQuat);
     targetBone->setRotationByQuaternion(rotationQuat);
 
 
     targetBone->setPosition((position * weight) + (targetBone->getPosition() * (1.0 - weight)));
     targetBone->setPosition((position * weight) + (targetBone->getPosition() * (1.0 - weight)));
+    
+    targetBone->setScale(scale);
+    
     Vector3 newScale = ((scale - Vector3(1.0, 1.0, 1.0)) * weight) + Vector3(1.0, 1.0, 1.0);
     Vector3 newScale = ((scale - Vector3(1.0, 1.0, 1.0)) * weight) + Vector3(1.0, 1.0, 1.0);
 }
 }