- BUGFIX : Fix aiQuaternion::nomalize method.
- UPDATE : Improve performance by avoiding multiple divisions. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@873 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
76a733e2f4
commit
bd92f15128
3
CREDITS
3
CREDITS
|
@ -97,3 +97,6 @@ Contributed updated and improved xcode workspaces
|
||||||
|
|
||||||
- drparallax
|
- drparallax
|
||||||
Contributed the /samples/SimpleAssimpViewX sample
|
Contributed the /samples/SimpleAssimpViewX sample
|
||||||
|
|
||||||
|
- Carsten Fuchs
|
||||||
|
Contributed a fix for the Normalize method in aiQuaternion.
|
||||||
|
|
|
@ -112,6 +112,8 @@ SOURCE_GROUP( Common FILES
|
||||||
ScenePreprocessor.h
|
ScenePreprocessor.h
|
||||||
SkeletonMeshBuilder.cpp
|
SkeletonMeshBuilder.cpp
|
||||||
SkeletonMeshBuilder.h
|
SkeletonMeshBuilder.h
|
||||||
|
SplitByBoneCountProcess.cpp
|
||||||
|
SplitByBoneCountProcess.h
|
||||||
SmoothingGroups.h
|
SmoothingGroups.h
|
||||||
StandardShapes.cpp
|
StandardShapes.cpp
|
||||||
StandardShapes.h
|
StandardShapes.h
|
||||||
|
@ -615,6 +617,8 @@ ADD_LIBRARY( assimp SHARED
|
||||||
SceneCombiner.h
|
SceneCombiner.h
|
||||||
ScenePreprocessor.cpp
|
ScenePreprocessor.cpp
|
||||||
ScenePreprocessor.h
|
ScenePreprocessor.h
|
||||||
|
SplitByBoneCountProcess.cpp
|
||||||
|
SplitByBoneCountProcess.h
|
||||||
SkeletonMeshBuilder.cpp
|
SkeletonMeshBuilder.cpp
|
||||||
SkeletonMeshBuilder.h
|
SkeletonMeshBuilder.h
|
||||||
SmoothingGroups.h
|
SmoothingGroups.h
|
||||||
|
|
|
@ -264,13 +264,14 @@ inline void aiQuaternion::Interpolate( aiQuaternion& pOut, const aiQuaternion& p
|
||||||
inline aiQuaternion& aiQuaternion::Normalize()
|
inline aiQuaternion& aiQuaternion::Normalize()
|
||||||
{
|
{
|
||||||
// compute the magnitude and divide through it
|
// compute the magnitude and divide through it
|
||||||
const float mag = x*x+y*y+z*z+w*w;
|
const float mag = sqrt(x*x + y*y + z*z + w*w);
|
||||||
if (mag)
|
if (mag)
|
||||||
{
|
{
|
||||||
x /= mag;
|
const float invMag = 1.0f/mag;
|
||||||
y /= mag;
|
x *= invMag;
|
||||||
z /= mag;
|
y *= invMag;
|
||||||
w /= mag;
|
z *= invMag;
|
||||||
|
w *= invMag;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue