← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2079: Previous commit correction. Thanks to Vaclav.

 

------------------------------------------------------------
revno: 2079
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-03-15 12:24:35 +0100
message:
  Previous commit correction. Thanks to Vaclav.
modified:
  pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp'
--- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp	2010-03-12 21:20:32 +0000
+++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp	2010-03-15 11:24:35 +0000
@@ -45,9 +45,10 @@
 		Vector3r axis=planeNormal.Cross(planePt); axis.Normalize();
 		Real angle=planePt.Length()/radius;
 		normal2pt.FromAxisAngle(axis,angle);
+		Quaternionr ret; return ret.Align(Vector3r::UNIT_X,normal2pt*planeNormal);
+	} else {
+		return Quaternionr::IDENTITY;
 	}
-	Quaternionr ret; ret.Align(Vector3r::UNIT_X,normal2pt*planeNormal);
-	return ret;
 }
 
 


Follow ups