← Back to team overview

yade-dev team mailing list archive

[svn] r1544 - trunk/extra

 

Author: eudoxos
Date: 2008-10-14 10:52:46 +0200 (Tue, 14 Oct 2008)
New Revision: 1544

Modified:
   trunk/extra/Brefcom.cpp
Log:
Fix stupid sign mistake when applying contact force in brefcom.


Modified: trunk/extra/Brefcom.cpp
===================================================================
--- trunk/extra/Brefcom.cpp	2008-10-13 07:38:23 UTC (rev 1543)
+++ trunk/extra/Brefcom.cpp	2008-10-14 08:52:46 UTC (rev 1544)
@@ -128,7 +128,7 @@
 	Shop::Bex::force(id1,rootBody)+=force;
 	Shop::Bex::force(id2,rootBody)-=force;
 	Shop::Bex::momentum(id1,rootBody)+=(contGeom->contactPoint-contGeom->pos1).Cross(force);
-	Shop::Bex::momentum(id2,rootBody)-=(contGeom->contactPoint-contGeom->pos2).Cross(force);
+	Shop::Bex::momentum(id2,rootBody)+=(contGeom->contactPoint-contGeom->pos2).Cross(-force);
 }
 
 void BrefcomLaw::action(MetaBody* _rootBody){