Commit e1df1732 authored by hybrid's avatar hybrid

Minor code cleaning.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1362 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 1dac6b6c
......@@ -19,16 +19,7 @@ namespace scene
struct SAnimatedMesh : public IAnimatedMesh
{
//! constructor
SAnimatedMesh() : IAnimatedMesh(), Type(EAMT_UNKNOWN)
{
#ifdef _DEBUG
setDebugName("SAnimatedMesh");
#endif
}
//! constructor
SAnimatedMesh(scene::IMesh* mesh, scene::E_ANIMATED_MESH_TYPE type) : IAnimatedMesh(), Type(type)
SAnimatedMesh(scene::IMesh* mesh=0, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN) : IAnimatedMesh(), Type(type)
{
#ifdef _DEBUG
setDebugName("SAnimatedMesh");
......
......@@ -528,13 +528,13 @@ inline core::quaternion& quaternion::rotationFromTo(const vector3df& from, const
return makeIdentity();
}
const vector3df c = v0.crossProduct(v1);
const f32 s = sqrtf( (1+d)*2 ); // optimize inv_sqrt
const f32 invs = 1.f / s;
const vector3df c = v0.crossProduct(v1)*invs;
X = c.X * invs;
Y = c.Y * invs;
Z = c.Z * invs;
X = c.X;
Y = c.Y;
Z = c.Z;
W = s * 0.5f;
return *this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment