ScaleProcess overhauled to improve compatibility with animations and unit conversion.
./assimp Added arguments --gs to assimp command line option to enable global scaling. No scaling for mScale of 1.0. Co-Authored-By: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
This commit is contained in:
@@ -39,7 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef SCALE_PROCESS_H_
|
||||
#define SCALE_PROCESS_H_
|
||||
|
||||
#include "Common/BaseProcess.h"
|
||||
|
||||
@@ -53,6 +54,11 @@ namespace Assimp {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
/** ScaleProcess: Class to rescale the whole model.
|
||||
* Now rescales animations, bones, and blend shapes properly.
|
||||
* Please note this will not write to 'scale' transform it will rewrite mesh
|
||||
* and matrixes so that your scale values
|
||||
* from your model package are preserved, so this is completely intentional
|
||||
* bugs should be reported as soon as they are found.
|
||||
*/
|
||||
class ASSIMP_API ScaleProcess : public BaseProcess {
|
||||
public:
|
||||
@@ -78,7 +84,7 @@ public:
|
||||
virtual void Execute( aiScene* pScene );
|
||||
|
||||
private:
|
||||
void traverseNodes( aiNode *currentNode );
|
||||
void traverseNodes( aiNode *currentNode, unsigned int nested_node_id = 0 );
|
||||
void applyScaling( aiNode *currentNode );
|
||||
|
||||
private:
|
||||
@@ -86,3 +92,6 @@ private:
|
||||
};
|
||||
|
||||
} // Namespace Assimp
|
||||
|
||||
|
||||
#endif // SCALE_PROCESS_H_
|
||||
Reference in New Issue
Block a user