瀏覽代碼

closes https://github.com/assimp/assimp/issues/1836: make documentation much more clear how to apply global scaling.

Kim Kulling 7 年之前
父節點
當前提交
4919d3da2f
共有 4 個文件被更改,包括 8 次插入11 次删除
  1. 2 2
      code/CMakeLists.txt
  2. 2 0
      code/FBXConverter.h
  3. 0 7
      code/ScaleProcess.cpp
  4. 4 2
      include/assimp/postprocess.h

+ 2 - 2
code/CMakeLists.txt

@@ -177,8 +177,6 @@ SET( Common_SRCS
   SkeletonMeshBuilder.cpp
   SplitByBoneCountProcess.cpp
   SplitByBoneCountProcess.h
-  ScaleProcess.cpp
-  ScaleProcess.h
   StandardShapes.cpp
   TargetAnimation.cpp
   TargetAnimation.h
@@ -586,6 +584,8 @@ SET( PostProcessing_SRCS
   PolyTools.h
   MakeVerboseFormat.cpp
   MakeVerboseFormat.h
+  ScaleProcess.cpp
+  ScaleProcess.h
 )
 SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
 

+ 2 - 0
code/FBXConverter.h

@@ -443,6 +443,8 @@ private:
 
     aiScene* const out;
     const FBX::Document& doc;
+
+    std::vector<std::string> mLightNames;
 };
 
 }

+ 0 - 7
code/ScaleProcess.cpp

@@ -88,13 +88,6 @@ void ScaleProcess::Execute( aiScene* pScene ) {
 
 void ScaleProcess::traverseNodes( aiNode *node ) {
     applyScaling( node );
-
-    /*for ( unsigned int i = 0; i < node->mNumChildren; ++i ) {
-        aiNode *currentNode = currentNode->mChildren[ i ];
-        if ( nullptr != currentNode ) {
-            traverseNodes( currentNode );
-        }
-    }*/
 }
 
 void ScaleProcess::applyScaling( aiNode *currentNode ) {

+ 4 - 2
include/assimp/postprocess.h

@@ -537,9 +537,11 @@ enum aiPostProcessSteps
     /** <hr>This step will perform a global scale of the model.
     *
     *  Some importers are providing a mechanism to define a scaling unit for the
-    *  model. This post processing step can be used to do so.
+    *  model. This post processing step can be used to do so. You need to get the
+    *  global scaling from your importer settings like in FBX. Use the flag
+    *  AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table to configure this.
     *
-    *  Use <tt>#AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY</tt> to control this.
+    *  Use <tt>#AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY</tt> to setup the global scaing factor.
     */
     aiProcess_GlobalScale = 0x8000000,