← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2497: 1. Yade now compiles with Eigen3 and with OpenGL feature enabled

 

------------------------------------------------------------
revno: 2497
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Sun 2010-10-17 21:43:48 +0200
message:
  1. Yade now compiles with Eigen3 and with OpenGL feature enabled
modified:
  pkg/common/Gl1_NormPhys.cpp
  pkg/dem/DomainLimiter.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/common/Gl1_NormPhys.cpp'
--- pkg/common/Gl1_NormPhys.cpp	2010-10-13 16:23:08 +0000
+++ pkg/common/Gl1_NormPhys.cpp	2010-10-17 19:43:48 +0000
@@ -64,7 +64,11 @@
 		glTranslatef(p1[0],p1[1],p1[2]);
 		Quaternionr q(Quaternionr().setFromTwoVectors(Vector3r(0,0,1),relPos/dist /* normalized */));
 		// using Transform with OpenGL: http://eigen.tuxfamily.org/dox/TutorialGeometry.html
-		glMultMatrixd(Eigen::Transform3d(q).data());
+		#if EIGEN_MAJOR_VERSION<20              //Eigen3 definition, while it is not realized
+			glMultMatrixd(Eigen::Transform3d(q).data());
+		#else
+			glMultMatrixd(Eigen::Affine3d(q).data());
+		#endif
 		glColor3v(color);
 		gluCylinder(gluQuadric,radius,radius,dist,slices,stacks);
 	glPopMatrix();

=== modified file 'pkg/dem/DomainLimiter.cpp'
--- pkg/dem/DomainLimiter.cpp	2010-10-16 18:31:17 +0000
+++ pkg/dem/DomainLimiter.cpp	2010-10-17 19:43:48 +0000
@@ -223,7 +223,11 @@
 
 	// switch to local coordinates
 	glTranslatev(tester->contPt);
-	glMultMatrixd(Eigen::Transform3d(tester->trsf).data());
+	#if EIGEN_MAJOR_VERSION<20              //Eigen3 definition, while it is not realized
+ 		glMultMatrixd(Eigen::Transform3d(tester->trsf).data());
+        #else
+ 		glMultMatrixd(Eigen::Affine3d(tester->trsf).data());
+        #endif
 
 
 	glDisable(GL_LIGHTING);