From de2738a7c37b71a4c9c8f0aa39e10bb371a74ac3 Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 10 Sep 2013 10:56:23 +0000 Subject: [PATCH] Updated to the recent changes --- .../trimesh_pointmatching/trimesh_pointmatching.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/sample/trimesh_pointmatching/trimesh_pointmatching.cpp b/apps/sample/trimesh_pointmatching/trimesh_pointmatching.cpp index 323d2435..c478c139 100644 --- a/apps/sample/trimesh_pointmatching/trimesh_pointmatching.cpp +++ b/apps/sample/trimesh_pointmatching/trimesh_pointmatching.cpp @@ -54,7 +54,7 @@ class MyFace : public vcg::Face< MyUsedTypes, vcg::face::FFAdj, vcg::face::V class MyEdge : public vcg::Edge{}; class MyMesh : public vcg::tri::TriMesh< std::vector, std::vector , std::vector > {}; -float EvalPlane(vcg::Plane3f &pl, vcg::Point3f &dir, std::vector posVec) +float EvalPlane(vcg::Plane3f &pl, std::vector posVec) { float off=0; for(size_t i=0;i p } -int main( int argc, char **argv ) +int main( ) { MyMesh m; vcg::tri::Icosahedron(m); @@ -83,12 +83,15 @@ int main( int argc, char **argv ) Matrix44f RotM; Matrix44f TraM; - vcg::tri::SurfaceSampling::RandomPoint3fBall01(); - RotM.SetRotateDeg(rand()%360,vcg::tri::SurfaceSampling::RandomPoint3fBall01()); + Point3f dir; + vcg::math::MarsenneTwisterRNG rnd; + + vcg::math::GeneratePointInUnitBallUniform(rnd); + RotM.SetRotateDeg(rand()%360,dir); TraM.SetTranslate(1,2,3); Matrix44f RigidM = RotM*TraM; - for(int i=0;i