← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2213: 1. Add forgotten ctor with kwargs to classes with static attrs (such as GL functors)

 

------------------------------------------------------------
revno: 2213
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-05-11 12:25:49 +0200
message:
  1. Add forgotten ctor with kwargs to classes with static attrs (such as GL functors)
  2. Update scripts/test/Dem3DofGeom.py
modified:
  lib/serialization/Serializable.hpp
  py/_utils.cpp
  py/mathWrap/miniEigen.cpp
  py/mathWrap/miniWm3Wrap.cpp
  py/tests/wrapper.py
  scripts/test/Dem3DofGeom.py


--
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 'lib/serialization/Serializable.hpp'
--- lib/serialization/Serializable.hpp	2010-05-03 12:17:44 +0000
+++ lib/serialization/Serializable.hpp	2010-05-11 10:25:49 +0000
@@ -209,7 +209,7 @@
 	/* called only at class registration, to set initial values; storage still has to be alocated in the cpp file! */ \
 	void initSetStaticAttributesValue(void){ BOOST_PP_SEQ_FOR_EACH(_STATATTR_SET,thisClass,attrs); } \
 	virtual void pyRegisterClass(python::object _scope) { if(!checkPyClassRegistersItself(#thisClass)) return; initSetStaticAttributesValue(); boost::python::scope thisScope(_scope); YADE_SET_DOCSTRING_OPTS; \
-		boost::python::class_<thisClass,shared_ptr<thisClass>,boost::python::bases<baseClass>,boost::noncopyable> _classObj(#thisClass,docString); \
+		boost::python::class_<thisClass,shared_ptr<thisClass>,boost::python::bases<baseClass>,boost::noncopyable> _classObj(#thisClass,docString); _classObj.def("__init__",python::raw_constructor(Serializable_ctor_kwAttrs<thisClass>)); \
 		BOOST_PP_SEQ_FOR_EACH(_STATATTR_PY,thisClass,attrs);  \
 	}
 

=== modified file 'py/_utils.cpp'
--- py/_utils.cpp	2010-05-07 10:47:16 +0000
+++ py/_utils.cpp	2010-05-11 10:25:49 +0000
@@ -85,7 +85,7 @@
 	FOREACH(const shared_ptr<Interaction>&i, *rb->interactions){
 		if(!i->interactionPhysics) continue;
 		shared_ptr<NormShearPhys> bc=dynamic_pointer_cast<NormShearPhys>(i->interactionPhysics); if(!bc) continue;
-		shared_ptr<Dem3DofGeom> geom=dynamic_pointer_cast<Dem3DofGeom>(i->interactionGeometry); if(!bc){LOG_ERROR("NormShearPhys contact doesn't have SpheresContactGeomety associated?!"); continue;}
+		shared_ptr<Dem3DofGeom> geom=dynamic_pointer_cast<Dem3DofGeom>(i->interactionGeometry); if(!geom){LOG_ERROR("NormShearPhys contact doesn't have Dem3DofGeom associated?!"); continue;}
 		const shared_ptr<Body>& b1=Body::byId(i->getId1(),rb), b2=Body::byId(i->getId2(),rb);
 		bool isIn1=isInBB(b1->state->pos,bbMin,bbMax), isIn2=isInBB(b2->state->pos,bbMin,bbMax);
 		if(!isIn1 && !isIn2) continue;
@@ -195,7 +195,6 @@
 /*!Sum moments acting on given bodies
  *
  * @param ids is the calculated bodies ids
- * param mask is Body::groupMask that must match for a body to be taken in account.
  * @param axis is the direction of axis with respect to which the moment is calculated.
  * @param axisPt is a point on the axis.
  *
@@ -431,9 +430,9 @@
 	py::def("inscribedCircleCenter",inscribedCircleCenter,(py::arg("v1"),py::arg("v2"),py::arg("v3")),"Return center of inscribed circle for triangle given by its vertices *v1*, *v2*, *v3*.");
 	py::def("unbalancedForce",&Shop__unbalancedForce,(py::args("useMaxForce")=false),"Compute the ratio of mean (or maximum, if *useMaxForce*) summary force on bodies and maximum force magnitude on interactions. For perfectly static equilibrium, summary force on all bodies is zero (since forces from interactions cancel out and induce no acceleration of particles); this ratio will tend to zero as simulation stabilizes, though zero is never reached because of finite precision computation. Sufficiently small value can be e.g. 1e-2 or smaller, depending on how much equilibrium it should be.");
 	py::def("kineticEnergy",Shop__kineticEnergy,"Compute overall kinetic energy of the simulation as\n\n.. math:: \\sum\\frac{1}{2}\\left(m_i\\vec{v}_i^2+\\vec{\\omega}(\\mat{I}\\vec{\\omega}^T)\\right).\n\n.. warning::\n\n\tNo transformation of inertia tensor (in local frame) $\\mat{I}$ is done, although it is multiplied by angular velocity $\\vec{\\omega}$ (in global frame); the value will not be accurate for aspherical particles.\n");
-	py::def("sumForces",sumForces);
-	py::def("sumTorques",sumTorques);
-	py::def("sumFacetNormalForces",sumFacetNormalForces,(py::arg("axis")=-1));
+	py::def("sumForces",sumForces,(py::arg("ids"),py::arg("direction")),"Return summary force on bodies with given *ids*, projected on the *direction* vector.");
+	py::def("sumTorques",sumTorques,(py::arg("ids"),py::arg("axis"),py::arg("axisPt")),"Sum forces and torques on bodies given in *ids* with respect to axis specified by a point *axisPt* and its direction *axis*.");
+	py::def("sumFacetNormalForces",sumFacetNormalForces,(py::arg("ids"),py::arg("axis")=-1),"Sum force magnitudes on given bodies (must have :yref:`shape<Body.shape>` of the :yref:`Facet` type), considering only part of forces perpendicular to each :yref:`facet's<Facet>` face; if *axis* has positive value, then the specified axis (0=x, 1=y, 2=z) will be used instead of facet's normals.");
 	py::def("forcesOnPlane",forcesOnPlane,(py::arg("planePt"),py::arg("normal")),"Find all interactions deriving from :yref:`NormShearPhys` that cross given plane and sum forces (both normal and shear) on them.\n\n:param Vector3 planePt: a point on the plane\n:param Vector3 normal: plane normal (will be normalized).\n");
 	py::def("forcesOnCoordPlane",forcesOnCoordPlane);
 	py::def("totalForceInVolume",Shop__totalForceInVolume,"Return summed forces on all interactions and average isotropic stiffness, as tuple (Vector3,float)");

=== modified file 'py/mathWrap/miniEigen.cpp'
--- py/mathWrap/miniEigen.cpp	2010-05-08 14:53:54 +0000
+++ py/mathWrap/miniEigen.cpp	2010-05-11 10:25:49 +0000
@@ -156,7 +156,7 @@
 	WM3_OLD_METH1(Vector2r,SquaredLength,squaredNorm,Real)
 	WM3_OLD_METH2(Vector2r,Vector2r,Dot,dot,Real)
 
-	static void Matrix3r_fromAxisAngle(Matrix3r& self, const Vector3r& axis, const Real angle){ std::cerr<<"Matrix3.fromAxisAngle is deprecated, use constructor from Quaternion instead"<<std::endl; self=AngleAxisr(angle,axis).toRotationMatrix(); }
+	static void Matrix3r_fromAxisAngle(Matrix3r& self, const Vector3r& axis, const Real angle){ std::cerr<<"Matrix3.fromAxisAngle is deprecated, use Quaternion.toRotationMatrix instead"<<std::endl; self=AngleAxisr(angle,axis).toRotationMatrix(); }
 #endif
 
 #define EIG_WRAP_METH1(klass,meth) static klass klass##_##meth(const klass& self){ return self.meth(); }

=== modified file 'py/mathWrap/miniWm3Wrap.cpp'
--- py/mathWrap/miniWm3Wrap.cpp	2010-05-08 14:53:54 +0000
+++ py/mathWrap/miniWm3Wrap.cpp	2010-05-11 10:25:49 +0000
@@ -52,15 +52,14 @@
                 , Determinant_function_type( &Matrix3< double >::Determinant ) );
         
         }
-        { //Matrix3< double >::DiagonalTimes
+        { //Matrix3< double >::Determinant
         
             typedef Matrix3< double > exported_class_t;
-            typedef Matrix3< double > ( exported_class_t::*DiagonalTimes_function_type )( Vector3< double > const & ) const;
+            typedef double ( exported_class_t::*Determinant_function_type )(  ) const;
             
             Matrix3_exposer.def( 
-                "DiagonalTimes"
-                , DiagonalTimes_function_type( &Matrix3< double >::DiagonalTimes )
-                , ( bp::arg("rkDiag") ) );
+                "determinant"
+                , Determinant_function_type( &Matrix3< double >::Determinant ) );
         
         }
         { //Matrix3< double >::EigenDecomposition
@@ -86,39 +85,6 @@
                 , bp::return_self< >() );
         
         }
-        { //Matrix3< double >::GetColumn
-        
-            typedef Matrix3< double > exported_class_t;
-            typedef Vector3< double > ( exported_class_t::*GetColumn_function_type )( int ) const;
-            
-            Matrix3_exposer.def( 
-                "GetColumn"
-                , GetColumn_function_type( &Matrix3< double >::GetColumn )
-                , ( bp::arg("iCol") ) );
-        
-        }
-        { //Matrix3< double >::GetColumnMajor
-        
-            typedef Matrix3< double > exported_class_t;
-            typedef void ( exported_class_t::*GetColumnMajor_function_type )( double * ) const;
-            
-            Matrix3_exposer.def( 
-                "GetColumnMajor"
-                , GetColumnMajor_function_type( &Matrix3< double >::GetColumnMajor )
-                , ( bp::arg("afCMajor") ) );
-        
-        }
-        { //Matrix3< double >::GetRow
-        
-            typedef Matrix3< double > exported_class_t;
-            typedef Vector3< double > ( exported_class_t::*GetRow_function_type )( int ) const;
-            
-            Matrix3_exposer.def( 
-                "GetRow"
-                , GetRow_function_type( &Matrix3< double >::GetRow )
-                , ( bp::arg("iRow") ) );
-        
-        }
         { //Matrix3< double >::Inverse
         
             typedef Matrix3< double > exported_class_t;
@@ -129,60 +95,14 @@
                 , Inverse_function_type( &Matrix3< double >::Inverse ) );
         
         }
-        { //Matrix3< double >::MakeDiagonal
-        
-            typedef Matrix3< double > exported_class_t;
-            typedef Matrix3< double > & ( exported_class_t::*MakeDiagonal_function_type )( double,double,double ) ;
-            
-            Matrix3_exposer.def( 
-                "MakeDiagonal"
-                , MakeDiagonal_function_type( &Matrix3< double >::MakeDiagonal )
-                , ( bp::arg("fM00"), bp::arg("fM11"), bp::arg("fM22") )
-                , bp::return_self< >() );
-        
-        }
-        { //Matrix3< double >::MakeTensorProduct
-        
-            typedef Matrix3< double > exported_class_t;
-            typedef Matrix3< double > & ( exported_class_t::*MakeTensorProduct_function_type )( Vector3< double > const &,Vector3< double > const & ) ;
-            
-            Matrix3_exposer.def( 
-                "MakeTensorProduct"
-                , MakeTensorProduct_function_type( &Matrix3< double >::MakeTensorProduct )
-                , ( bp::arg("rkU"), bp::arg("rkV") )
-                , bp::return_self< >() );
-        
-        }
-        { //Matrix3< double >::Orthonormalize
-        
-            typedef Matrix3< double > exported_class_t;
-            typedef void ( exported_class_t::*Orthonormalize_function_type )(  ) ;
-            
-            Matrix3_exposer.def( 
-                "Orthonormalize"
-                , Orthonormalize_function_type( &Matrix3< double >::Orthonormalize ) );
-        
-        }
-        { //Matrix3< double >::TimesDiagonal
-        
-            typedef Matrix3< double > exported_class_t;
-            typedef Matrix3< double > ( exported_class_t::*TimesDiagonal_function_type )( Vector3< double > const & ) const;
-            
-            Matrix3_exposer.def( 
-                "TimesDiagonal"
-                , TimesDiagonal_function_type( &Matrix3< double >::TimesDiagonal )
-                , ( bp::arg("rkDiag") ) );
-        
-        }
-        { //Matrix3< double >::TimesTranspose
-        
-            typedef Matrix3< double > exported_class_t;
-            typedef Matrix3< double > ( exported_class_t::*TimesTranspose_function_type )( Matrix3< double > const & ) const;
-            
-            Matrix3_exposer.def( 
-                "TimesTranspose"
-                , TimesTranspose_function_type( &Matrix3< double >::TimesTranspose )
-                , ( bp::arg("rkM") ) );
+        { //Matrix3< double >::Inverse
+        
+            typedef Matrix3< double > exported_class_t;
+            typedef Matrix3< double > ( exported_class_t::*Inverse_function_type )(  ) const;
+            
+            Matrix3_exposer.def( 
+                "inverse"
+                , Inverse_function_type( &Matrix3< double >::Inverse ) );
         
         }
         { //Matrix3< double >::Transpose
@@ -195,15 +115,14 @@
                 , Transpose_function_type( &Matrix3< double >::Transpose ) );
         
         }
-        { //Matrix3< double >::TransposeTimes
+        { //Matrix3< double >::Transpose
         
             typedef Matrix3< double > exported_class_t;
-            typedef Matrix3< double > ( exported_class_t::*TransposeTimes_function_type )( Matrix3< double > const & ) const;
+            typedef Matrix3< double > ( exported_class_t::*Transpose_function_type )(  ) const;
             
             Matrix3_exposer.def( 
-                "TransposeTimes"
-                , TransposeTimes_function_type( &Matrix3< double >::TransposeTimes )
-                , ( bp::arg("rkM") ) );
+                "transpose"
+                , Transpose_function_type( &Matrix3< double >::Transpose ) );
         
         }
         Matrix3_exposer.def( bp::self != bp::self );
@@ -275,6 +194,18 @@
                 , bp::return_self< >() );
         
         }
+        { //Quaternion< double >::Align
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef Quaternion< double > & ( exported_class_t::*Align_function_type )( Vector3< double > const &,Vector3< double > const & ) ;
+            
+            Quaternion_exposer.def( 
+                "setFromTwoVectors"
+                , Align_function_type( &Quaternion< double >::Align )
+                , ( bp::arg("rkV1"), bp::arg("rkV2") )
+                , bp::return_self< >() );
+        
+        }
         { //Quaternion< double >::Conjugate
         
             typedef Quaternion< double > exported_class_t;
@@ -285,47 +216,34 @@
                 , Conjugate_function_type( &Quaternion< double >::Conjugate ) );
         
         }
-        { //Quaternion< double >::DecomposeSwingTimesTwist
-        
-            typedef Quaternion< double > exported_class_t;
-            typedef void ( exported_class_t::*DecomposeSwingTimesTwist_function_type )( Vector3< double > const &,Quaternion< double > &,Quaternion< double > & ) ;
-            
-            Quaternion_exposer.def( 
-                "DecomposeSwingTimesTwist"
-                , DecomposeSwingTimesTwist_function_type( &Quaternion< double >::DecomposeSwingTimesTwist )
-                , ( bp::arg("rkV1"), bp::arg("rkSwing"), bp::arg("rkTwist") ) );
-        
-        }
-        { //Quaternion< double >::DecomposeTwistTimesSwing
-        
-            typedef Quaternion< double > exported_class_t;
-            typedef void ( exported_class_t::*DecomposeTwistTimesSwing_function_type )( Vector3< double > const &,Quaternion< double > &,Quaternion< double > & ) ;
-            
-            Quaternion_exposer.def( 
-                "DecomposeTwistTimesSwing"
-                , DecomposeTwistTimesSwing_function_type( &Quaternion< double >::DecomposeTwistTimesSwing )
-                , ( bp::arg("rkV1"), bp::arg("rkTwist"), bp::arg("rkSwing") ) );
-        
-        }
-        { //Quaternion< double >::Dot
-        
-            typedef Quaternion< double > exported_class_t;
-            typedef double ( exported_class_t::*Dot_function_type )( Quaternion< double > const & ) const;
-            
-            Quaternion_exposer.def( 
-                "Dot"
-                , Dot_function_type( &Quaternion< double >::Dot )
-                , ( bp::arg("rkQ") ) );
-        
-        }
-        { //Quaternion< double >::Exp
-        
-            typedef Quaternion< double > exported_class_t;
-            typedef Quaternion< double > ( exported_class_t::*Exp_function_type )(  ) const;
-            
-            Quaternion_exposer.def( 
-                "Exp"
-                , Exp_function_type( &Quaternion< double >::Exp ) );
+        { //Quaternion< double >::ToRotationMatrix
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef Quaternion< double > ( exported_class_t::*ToRotationMatrix_function_type )(  ) const;
+            
+            Quaternion_exposer.def( 
+                "ToRotationMatrix"
+                , ToRotationMatrix_function_type( &Quaternion< double >::toRotationMatrix ) );
+        
+        }
+        { //Quaternion< double >::ToRotationMatrix
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef Quaternion< double > ( exported_class_t::*ToRotationMatrix_function_type )(  ) const;
+            
+            Quaternion_exposer.def( 
+                "toRotationMatrix"
+                , ToRotationMatrix_function_type( &Quaternion< double >::toRotationMatrix ) );
+        
+        }
+        { //Quaternion< double >::Conjugate
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef Quaternion< double > ( exported_class_t::*Conjugate_function_type )(  ) const;
+            
+            Quaternion_exposer.def( 
+                "conjugate"
+                , Conjugate_function_type( &Quaternion< double >::Conjugate ) );
         
         }
         { //Quaternion< double >::FromAxisAngle
@@ -340,30 +258,6 @@
                 , bp::return_self< >() );
         
         }
-        { //Quaternion< double >::FromRotationMatrix
-        
-            typedef Quaternion< double > exported_class_t;
-            typedef Quaternion< double > & ( exported_class_t::*FromRotationMatrix_function_type )( Matrix3< double > const & ) ;
-            
-            Quaternion_exposer.def( 
-                "FromRotationMatrix"
-                , FromRotationMatrix_function_type( &Quaternion< double >::FromRotationMatrix )
-                , ( bp::arg("rkRot") )
-                , bp::return_self< >() );
-        
-        }
-        { //Quaternion< double >::FromRotationMatrix
-        
-            typedef Quaternion< double > exported_class_t;
-            typedef Quaternion< double > & ( exported_class_t::*FromRotationMatrix_function_type )( Vector3< double > const * ) ;
-            
-            Quaternion_exposer.def( 
-                "FromRotationMatrix"
-                , FromRotationMatrix_function_type( &Quaternion< double >::FromRotationMatrix )
-                , ( bp::arg("akRotColumn") )
-                , bp::return_self< >() );
-        
-        }
         { //Quaternion< double >::Inverse
         
             typedef Quaternion< double > exported_class_t;
@@ -384,6 +278,26 @@
                 , Normalize_function_type( &Quaternion< double >::Normalize ) );
         
         }
+        { //Quaternion< double >::Inverse
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef Quaternion< double > ( exported_class_t::*Inverse_function_type )(  ) const;
+            
+            Quaternion_exposer.def( 
+                "inverse"
+                , Inverse_function_type( &Quaternion< double >::Inverse ) );
+        
+        }
+        { //Quaternion< double >::Normalize
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef double ( exported_class_t::*Normalize_function_type )(  ) ;
+            
+            Quaternion_exposer.def( 
+                "normalize"
+                , Normalize_function_type( &Quaternion< double >::Normalize ) );
+        
+        }
         { //Quaternion< double >::Rotate
         
             typedef Quaternion< double > exported_class_t;
@@ -406,6 +320,17 @@
                 , ( bp::arg("inst") ) );
         
         }
+        { //Quaternion< double >::ToAxisAngle
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef boost::python::tuple ( *ToAxisAngle_function_type )( Quaternion<double> const & );
+            
+            Quaternion_exposer.def( 
+                "toAxisAngle"
+                , ToAxisAngle_function_type( &ToAxisAngle_2c4febac34e606b4a98de72d9f8161c9 )
+                , ( bp::arg("inst") ) );
+        
+        }
         { //Quaternion< double >::W
         
             typedef Quaternion< double > exported_class_t;
@@ -446,6 +371,46 @@
                 , Z_function_type( &Quaternion< double >::Z ) );
         
         }
+        { //Quaternion< double >::W
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef double ( exported_class_t::*W_function_type )(  ) const;
+            
+            Quaternion_exposer.def( 
+                "w"
+                , W_function_type( &Quaternion< double >::W ) );
+        
+        }
+        { //Quaternion< double >::X
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef double ( exported_class_t::*X_function_type )(  ) const;
+            
+            Quaternion_exposer.def( 
+                "x"
+                , X_function_type( &Quaternion< double >::X ) );
+        
+        }
+        { //Quaternion< double >::Y
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef double ( exported_class_t::*Y_function_type )(  ) const;
+            
+            Quaternion_exposer.def( 
+                "y"
+                , Y_function_type( &Quaternion< double >::Y ) );
+        
+        }
+        { //Quaternion< double >::Z
+        
+            typedef Quaternion< double > exported_class_t;
+            typedef double ( exported_class_t::*Z_function_type )(  ) const;
+            
+            Quaternion_exposer.def( 
+                "z"
+                , Z_function_type( &Quaternion< double >::Z ) );
+        
+        }
         Quaternion_exposer.def( bp::self != bp::self );
         Quaternion_exposer.def( bp::self * bp::self );
         Quaternion_exposer.def( bp::self * bp::other< double >() );
@@ -530,6 +495,47 @@
                 , SquaredLength_function_type( &Vector2< double >::SquaredLength ) );
         
         }
+        { //Vector2< double >::Dot
+        
+            typedef Vector2< double > exported_class_t;
+            typedef double ( exported_class_t::*Dot_function_type )( Vector2< double > const & ) const;
+            
+            Vector2_exposer.def( 
+                "dot"
+                , Dot_function_type( &Vector2< double >::Dot )
+                , ( bp::arg("rkV") ) );
+        
+        }
+        { //Vector2< double >::Length
+        
+            typedef Vector2< double > exported_class_t;
+            typedef double ( exported_class_t::*Length_function_type )(  ) const;
+            
+            Vector2_exposer.def( 
+                "norm"
+                , Length_function_type( &Vector2< double >::Length ) );
+        
+        }
+        { //Vector2< double >::Normalize
+        
+            typedef Vector2< double > exported_class_t;
+            typedef double ( exported_class_t::*Normalize_function_type )(  ) ;
+            
+            Vector2_exposer.def( 
+                "normalize"
+                , Normalize_function_type( &Vector2< double >::Normalize ) );
+        
+        }
+        { //Vector2< double >::SquaredLength
+        
+            typedef Vector2< double > exported_class_t;
+            typedef double ( exported_class_t::*SquaredLength_function_type )(  ) const;
+            
+            Vector2_exposer.def( 
+                "squaredNorm"
+                , SquaredLength_function_type( &Vector2< double >::SquaredLength ) );
+        
+        }
         { //Vector2< double >::X
         
             typedef Vector2< double > exported_class_t;
@@ -550,6 +556,26 @@
                 , Y_function_type( &Vector2< double >::Y ) );
         
         }
+        { //Vector2< double >::X
+        
+            typedef Vector2< double > exported_class_t;
+            typedef double ( exported_class_t::*X_function_type )(  ) const;
+            
+            Vector2_exposer.def( 
+                "x"
+                , X_function_type( &Vector2< double >::X ) );
+        
+        }
+        { //Vector2< double >::Y
+        
+            typedef Vector2< double > exported_class_t;
+            typedef double ( exported_class_t::*Y_function_type )(  ) const;
+            
+            Vector2_exposer.def( 
+                "y"
+                , Y_function_type( &Vector2< double >::Y ) );
+        
+        }
         Vector2_exposer.def( bp::self != bp::self );
         Vector2_exposer.def( bp::self * bp::other< double >() );
         Vector2_exposer.def( bp::self *= bp::other< double >() );
@@ -675,6 +701,88 @@
                 , Z_function_type( &Vector3< double >::Z ) );
         
         }
+        { //Vector3< double >::Cross
+        
+            typedef Vector3< double > exported_class_t;
+            typedef Vector3< double > ( exported_class_t::*Cross_function_type )( Vector3< double > const & ) const;
+            
+            Vector3_exposer.def( 
+                "cross"
+                , Cross_function_type( &Vector3< double >::Cross )
+                , ( bp::arg("rkV") ) );
+        
+        }
+        { //Vector3< double >::Dot
+        
+            typedef Vector3< double > exported_class_t;
+            typedef double ( exported_class_t::*Dot_function_type )( Vector3< double > const & ) const;
+            
+            Vector3_exposer.def( 
+                "dot"
+                , Dot_function_type( &Vector3< double >::Dot )
+                , ( bp::arg("rkV") ) );
+        
+        }
+        { //Vector3< double >::Length
+        
+            typedef Vector3< double > exported_class_t;
+            typedef double ( exported_class_t::*Length_function_type )(  ) const;
+            
+            Vector3_exposer.def( 
+                "norm"
+                , Length_function_type( &Vector3< double >::Length ) );
+        
+        }
+        { //Vector3< double >::Normalize
+        
+            typedef Vector3< double > exported_class_t;
+            typedef double ( exported_class_t::*Normalize_function_type )(  ) ;
+            
+            Vector3_exposer.def( 
+                "normalize"
+                , Normalize_function_type( &Vector3< double >::Normalize ) );
+        
+        }
+        { //Vector3< double >::SquaredLength
+        
+            typedef Vector3< double > exported_class_t;
+            typedef double ( exported_class_t::*SquaredLength_function_type )(  ) const;
+            
+            Vector3_exposer.def( 
+                "squaredNorm"
+                , SquaredLength_function_type( &Vector3< double >::SquaredLength ) );
+        
+        }
+        { //Vector3< double >::X
+        
+            typedef Vector3< double > exported_class_t;
+            typedef double ( exported_class_t::*X_function_type )(  ) const;
+            
+            Vector3_exposer.def( 
+                "x"
+                , X_function_type( &Vector3< double >::X ) );
+        
+        }
+        { //Vector3< double >::Y
+        
+            typedef Vector3< double > exported_class_t;
+            typedef double ( exported_class_t::*Y_function_type )(  ) const;
+            
+            Vector3_exposer.def( 
+                "y"
+                , Y_function_type( &Vector3< double >::Y ) );
+        
+        }
+        { //Vector3< double >::Z
+        
+            typedef Vector3< double > exported_class_t;
+            typedef double ( exported_class_t::*Z_function_type )(  ) const;
+            
+            Vector3_exposer.def( 
+                "z"
+                , Z_function_type( &Vector3< double >::Z ) );
+        
+        }
         Vector3_exposer.def( bp::self != bp::self );
         Vector3_exposer.def( bp::self * bp::other< double >() );
         Vector3_exposer.def( bp::self *= bp::other< double >() );

=== modified file 'py/tests/wrapper.py'
--- py/tests/wrapper.py	2010-05-06 10:11:20 +0000
+++ py/tests/wrapper.py	2010-05-11 10:25:49 +0000
@@ -74,65 +74,64 @@
 	def testVector2(self):
 		v=Vector2(1,2); v2=Vector2(3,4)
 		self.assert_(v+v2==Vector2(4,6))
-		self.assert_(Vector2().UNIT_X.Dot(Vector2().UNIT_Y)==0)
-		self.assert_(Vector2().ZERO.Length()==0)
+		self.assert_(Vector2().UnitX.dot(Vector2().UnitY)==0)
+		self.assert_(Vector2().Zero.norm()==0)
 	def testVector3(self):
 		v=Vector3(3,4,5); v2=Vector3(3,4,5)
 		self.assert_(v[0]==3 and v[1]==4 and v[2]==5)
-		self.assert_(v.SquaredLength()==50)
+		self.assert_(v.squaredNorm()==50)
 		self.assert_(v==(3,4,5)) # comparison with list/tuple
 		self.assert_(v==[3,4,5])
 		self.assert_(v==v2)
-		x,y,z,one=Vector3().UNIT_X,Vector3().UNIT_Y,Vector3().UNIT_Z,Vector3().ONE
+		x,y,z,one=Vector3().UnitX,Vector3().UnitY,Vector3().UnitZ,Vector3().Ones
 		self.assert_(x+y+z==one)
-		self.assert_(x.Dot(y)==0)
-		self.assert_(x.Cross(y)==z)
+		self.assert_(x.dot(y)==0)
+		self.assert_(x.cross(y)==z)
 	def testQuaternion(self):
 		# construction
 		q1=Quaternion((0,0,1),pi/2)
 		q2=Quaternion(Vector3(0,0,1),pi/2)
 		q1==q2
-		x,y,z,one=Vector3().UNIT_X,Vector3().UNIT_Y,Vector3().UNIT_Z,Vector3().ONE
+		x,y,z,one=Vector3().UnitX,Vector3().UnitY,Vector3().UnitZ,Vector3().Ones
 		self.assertSeqAlmostEqual(q1*x,y)
 		self.assertSeqAlmostEqual(q1*q1*x,-x)
-		self.assertSeqAlmostEqual(q1*q1.Conjugate(),Quaternion().IDENTITY)
-		self.assertSeqAlmostEqual(q1.ToAxisAngle()[0],(0,0,1))
-		self.assertAlmostEqual(q1.ToAxisAngle()[1],pi/2)
+		self.assertSeqAlmostEqual(q1*q1.conjugate(),Quaternion().Identity)
+		self.assertSeqAlmostEqual(q1.toAxisAngle()[0],(0,0,1))
+		self.assertAlmostEqual(q1.toAxisAngle()[1],pi/2)
 	def testMatrix3(self):
 		#construction
 		m1=Matrix3(1,0,0,0,1,0,0,0,1)
 		# comparison
-		self.assert_(m1==Matrix3().IDENTITY)
+		self.assert_(m1==Matrix3().Identity)
 		# rotation matrix from quaternion
-		m1.FromAxisAngle(Vector3(0,0,1),pi/2)
+		m1=Matrix3(Quaternion(Vector3(0,0,1),pi/2).toRotationMatrix())
 		# multiplication with vectors
-		self.assertSeqAlmostEqual(m1*Vector3().UNIT_X,Vector3().UNIT_Y)
+		self.assertSeqAlmostEqual(m1*Vector3().UnitX,Vector3().UnitY)
 		# determinant
 		m2=Matrix3(-2,2,-3,-1,1,3,2,0,-1)
-		self.assertEqual(m2.Determinant(),18)
+		self.assertEqual(m2.determinant(),18)
 		# inverse 
 		inv=Matrix3(-0.055555555555556,0.111111111111111,0.5,0.277777777777778,0.444444444444444,0.5,-0.111111111111111,0.222222222222222,0.0)
-		m2inv=m2.Inverse()
+		m2inv=m2.inverse()
 		self.assertSeqAlmostEqual(m2inv,inv)
 		# matrix-matrix multiplication
-		self.assertSeqAlmostEqual(Matrix3().IDENTITY*Matrix3().IDENTITY,Matrix3().IDENTITY)
+		self.assertSeqAlmostEqual(Matrix3().Identity*Matrix3().Identity,Matrix3().Identity)
 		m3=Matrix3(1,2,3,4,5,6,-1,0,3)
 		m33=m3*m3
 		self.assertSeqAlmostEqual(m33,Matrix3(6,12,24,18,33,60,-4,-2,6))
 		
 	# not really wm3 thing, but closely related
 	# no way to test this currently, as State::se3 is not serialized (State::pos and State::ori are serialized instead...)
-	# remove the '_' from the method name to re-enable
-	def _testSe3Conversion(self):
-		return
-		pp=State()
-		pp['se3']=(Vector3().ZERO,Quaternion().IDENTITY)
-		self.assert_(pp['se3'][0]==Vector3().ZERO)
-		self.assert_(pp['se3'][1]==Quaternion().IDENTITY)
-		pp['se3']=((1,2,3),Quaternion((1,1,1),pi/4))
-		self.assert_(pp['se3'][0]==(1,2,3))
-		self.assert_(pp['se3'][0]==pp.pos)
-		self.assert_(pp['se3'][1]==Quaternion((1,1,1),pi/4))
-		self.assert_(pp['se3'][1]==pp.ori)
+	#def testSe3Conversion(self):
+	#	return
+	#	pp=State()
+	#	pp.se3=(Vector3().Zero,Quaternion().Identity)
+	#	self.assert_(pp['se3'][0]==Vector3().Zero)
+	#	self.assert_(pp['se3'][1]==Quaternion().Identity)
+	#	pp.se3=((1,2,3),Quaternion((1,1,1),pi/4))
+	#	self.assert_(pp['se3'][0]==(1,2,3))
+	#	self.assert_(pp['se3'][0]==pp.pos)
+	#	self.assert_(pp['se3'][1]==Quaternion((1,1,1),pi/4))
+	#	self.assert_(pp['se3'][1]==pp.ori)
 		
 	

=== modified file 'scripts/test/Dem3DofGeom.py'
--- scripts/test/Dem3DofGeom.py	2010-03-22 17:39:33 +0000
+++ scripts/test/Dem3DofGeom.py	2010-05-11 10:25:49 +0000
@@ -30,8 +30,8 @@
 try:
 	from yade import qt
 	renderer=qt.Renderer()
-	renderer['Body_wire']=True
-	renderer['Interaction_geometry']=True
+	renderer.wire=True
+	renderer.intrGeom=True
 	qt.Controller()
 	qt.View()
 except ImportError: pass