Commit Graph

38 Commits

Author SHA1 Message Date
Paolo Cignoni 7befff7bec make point2 derived Eigen's Matrix, and a set of minimal fixes to make meshlab compile
with both old and new version. The fixes include:
- dot product: vec0 * vec1 => vec0.dot(vec1) (I added .dot() to the old Point classes too)
- Transpose: Transpose is an Eigen type, so we cannot keep it if Eigen is used. Therefore
  I added a .tranpose() to old matrix classes, and modified most of the Transpose() to transpose()
  both in vcg and meshlab. In fact, transpose() are free with Eigen, it simply returns a transpose
  expression without copies. On the other be carefull:  m = m.transpose() won't work as expected,
  here me must evaluate to a temporary: m = m.transpose().eval(); However, this operation in very
  rarely needed: you transpose at the same sime you set m, or you use m.transpose() directly.
- the last issue is Normalize which both modifies *this and return a ref to it. This behavior
  don't make sense anymore when using expression template, e.g., in (a+b).Normalize(), the type
  of a+b if not a Point (or whatever Vector types), it an expression of the addition of 2 points,
  so we cannot modify the value of *this, since there is no value. Therefore I've already changed
  all those .Normalize() of expressions to the Eigen's version .normalized().
- Finally I've changed the Zero to SetZero in the old Point classes too.
2008-10-28 00:59:46 +00:00
Paolo Cignoni ab200fc950 Port to eigen2: state of the mess:
* curently nothing change if you don't define VCG_USE_EIGEN
* make Matrix*, Point3 and Point4 derive Eigen::Matrix (still ugly)
* now catching all the dot products to replace them by .dot()
  note that most of meshlab already compile
2008-10-27 19:35:17 +00:00
ganovelli 1185e2ab96 minor type changes to compile with gcc 2008-08-19 11:03:39 +00:00
ganovelli 3cb29c805b changed template from vcg::Triangle to generic class to allow to pass a vcg::FaceSimpX (recall: the disambiguation was done in the function name exactly for this reason) 2008-08-19 10:21:01 +00:00
Paolo Cignoni 279306b9f7 Corrected error in the comment to method IntersectionSphereTriangle 2007-06-08 07:40:40 +00:00
Paolo Cignoni 9105a551cd Added IntersectionSphereTriangle 2007-06-07 15:16:39 +00:00
Paolo Cignoni 1e2f4c1a80 Added IntersectionSegmentSphere 2007-05-29 14:33:29 +00:00
Paolo Cignoni e5d3f05580 commented out non compiling intersectionSpherePlane 2007-04-16 09:08:15 +00:00
Nico Pietroni 5644153c35 IntersectionPlanePlane first parameter is a const 2007-04-10 22:26:47 +00:00
Nico Pietroni 477c03ffd1 - Changed name of intersection function between plane and triangle from Intersection to IntersectionPlaneTriangle.
- Added Intersection_Plane_Sphere function.
2007-04-04 23:19:40 +00:00
Marco Di Benedetto 50ed5305a4 Added const qualifier to bbox parameter in Intersection_Triangle_Box(). 2007-02-21 02:40:52 +00:00
Nico Pietroni ad5a634220 added intersection control between bounding boxes for intersection between segment and triangle function 2006-10-25 16:04:32 +00:00
ganovelli cba93abba3 Intersection_sphere_sphere added 2006-09-14 08:39:07 +00:00
Paolo Cignoni 8bfbf1111d Changes for compilation on linux AMD64. Some remarks: Linux filenames are case-sensitive. _fileno and _filelength do not exist on linux 2006-06-06 14:35:32 +00:00
Nico Pietroni f949a83faf Added functions:
- Intersection_Segment_Triangle
- Intersection_Plane_Box
- Intersection_Triangle_Box
2006-06-01 08:38:02 +00:00
Paolo Cignoni a1d3e8a371 Missing ';' (thx Maarten) 2006-03-29 07:53:36 +00:00
Nico Pietroni b2879b7333 IntersectionSegmentPlane and Intersection_Segment_Box functions Added 2006-03-20 14:42:49 +00:00
Nico Pietroni 31512102ed added Intersection_Segment_Box function 2006-01-20 16:35:51 +00:00
Federico Ponchio e9583c5020 Changed order of functions intersection_line_box and
intersectuion_ray_box
2005-10-03 16:07:50 +00:00
Nico Pietroni f3dd988af6 corrected 1 compiling error on Ray_Box_Intersection function 2005-09-30 13:11:39 +00:00
Nico Pietroni 7bf24066b2 Added function RayBoxIntersection, renamed intersection line box from "Intersection" to "Intersection_Line_Box" 2005-09-29 15:30:10 +00:00
Marco Di Benedetto 342c06717b Added functor RayTriangleIntersectionFunctor. 2005-09-29 11:48:00 +00:00
Marco Di Benedetto 1de3d80e9b Added intersection for ray-triangle (with Ray3 type). 2005-09-28 19:40:55 +00:00
Marco Callieri 1b05420d2a changed intersection names to more specific to avoid ambiguity 2005-06-29 15:28:31 +00:00
ganovelli 41945cf2d5 added intersection between tow planes (porting from old vcg lib) 2005-03-15 11:22:39 +00:00
Paolo Cignoni 0251d89f11 aggiunta intersect ray-box 2005-01-26 10:03:08 +00:00
Paolo Cignoni 2d18591782 Better Doxygen documentation 2004-10-13 12:45:51 +00:00
Federico Ponchio dedf484388 forgotten typename SEGMENTTYPE::... 2004-09-09 14:41:32 +00:00
Nico Pietroni d18f2f9f39 correcter .dir to .Direction and .ori in .Origin() 2004-08-09 09:48:43 +00:00
Nico Pietroni f610bf209c added rey triangle intersections funtions 2004-08-04 20:55:02 +00:00
Paolo Cignoni 398a5a60cc Added a cast to remove a warning 2004-07-11 22:08:04 +00:00
Federico Ponchio 99b51766f6 Fixed some minor bugs 2004-05-14 03:14:29 +00:00
Federico Ponchio ee86220f5c minor bug 2004-05-13 23:43:54 +00:00
Paolo Cignoni ff948edd54 syntax errors in inersection plane line. 2004-05-05 08:21:55 +00:00
ganovelli bd4dad797c Triangle3<T> replaced by TRIANGLE
Segment<T> replaced by EDGETYPE
2004-05-04 02:37:58 +00:00
ganovelli 6524344684 error in plane segment corrected 2004-04-29 10:48:44 +00:00
ganovelli cbbb1cd0ff plane line
plane segment
triangle triangle added
2004-04-26 12:34:50 +00:00
Paolo Cignoni f1ea75bbe8 Initial Commit 2004-04-21 14:22:27 +00:00