Revision: 8232
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8232&view=rev
Author:   hsujohnhsu
Date:     2009-08-26 17:30:15 +0000 (Wed, 26 Aug 2009)

Log Message:
-----------
set invalid quaternion to identity on construction.

Modified Paths:
--------------
    code/gazebo/trunk/server/Quatern.cc

Modified: code/gazebo/trunk/server/Quatern.cc
===================================================================
--- code/gazebo/trunk/server/Quatern.cc 2009-08-26 17:27:57 UTC (rev 8231)
+++ code/gazebo/trunk/server/Quatern.cc 2009-08-26 17:30:15 UTC (rev 8232)
@@ -33,7 +33,12 @@
 Quatern::Quatern()
     : u(1), x(0), y(0), z(0)
 {
-
+  if ( u == 0 && x == 0 && y == 0 && z == 0 )
+  {
+    /// @todo: give user warning
+    this->SetToIdentity();
+  }
+  this->Normalize();
 }
 
 
////////////////////////////////////////////////////////////////////////////////


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to