Commit Graph

112 Commits

Author SHA1 Message Date
Paolo Cignoni 0c5aefb278 Added ClearModes() method to trackball to avoid leaking and corruptions due to double deletion of modes. 2009-04-01 14:53:20 +00:00
Paolo Cignoni efde1babe5 Sorry, corrected a mistake in the Matrix() method due to a temporary local library change. Won't do that again. 2009-03-31 09:23:20 +00:00
Paolo Cignoni a353708f16 Added Matrix)() and InverseMatrix() methods, which respectively return the direct and inverse matrices that describe how the trackball similarity is applied with respect to the trackball center.
Corrected ToAscii() and SetFromAscii() methods, which should work with 8 values instead of 9 (well, in effect they are implemantation dependent methods, so...).
2009-03-31 09:03:18 +00:00
Paolo Cignoni 946ae834b8 Changed the include guard. Added comment to remember that the View class is used only by the trackball 2009-03-11 09:32:12 +00:00
Paolo Cignoni 8a53c7a836 Fixed memory leak 2009-01-23 13:58:20 +00:00
Paolo Cignoni 928c8dd997 Removed harmless warnings 2008-11-28 14:55:45 +00:00
Paolo Cignoni 16e51c9d75 Corrected long standing bug of double deletion of trackmodes. New safer destructor 2008-11-13 09:33:43 +00:00
mtarini 80f1fa2396 Added NavigatorWasdMode: doom-like navigation around/inside objects (see samples/SDL_trackball for an example) 2008-11-12 16:36:55 +00:00
mtarini 1ad548c24c Added animations and keys (so far, only used by the Navigator Mode) 2008-11-12 16:33:40 +00:00
Paolo Cignoni 0f2d864e05 remove a trailing print() 2008-10-30 11:31:28 +00:00
Paolo Cignoni e587581275 add transposeInPlace and duplicate V(int) 2008-10-29 11:17:11 +00:00
Paolo Cignoni 07f2e976ea * change all remaining Transpose to transpose,
* update the gl/math wrappers to make them more Eigen friendly
  (and remove the useless, and not used, and somehow dangerous
   *Direct and *E functions)
* add automatic reinterpret_casting from Eigen::Matrix to vcg
  specialized types
2008-10-29 00:05:44 +00:00
Federico Ponchio 632f4842f1 Polar mode now working. 2008-10-28 16:43:56 +00:00
Paolo Cignoni c0c76bc5b8 added Polarmode prototype (doesn't work yet) 2008-10-28 15:55:40 +00:00
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
Paolo Cignoni dcbb7456ac Added by default rotation on middle + alt, (almost a standard on various 3d packages). Kind patch submitted by Sebastian Herholz. 2008-09-22 23:10:00 +00:00
Paolo Cignoni d3ac368bd5 Updated references of SetRotate to the new SetRotateDeg/SetRotateRad interface 2008-07-13 07:41:20 +00:00
Paolo Cignoni bafcd1768e remove harmless warnings 2008-07-02 13:26:25 +00:00
Paolo Cignoni 5fa10cda23 made generic functions static 2008-04-10 11:09:34 +00:00
Paolo Cignoni 4bd2caa2e6 improved comments 2008-03-21 16:09:02 +00:00
Paolo Cignoni 0af424701d Added doxygen documentation 2008-03-21 16:08:43 +00:00
Paolo Cignoni 35848b0a77 improved comments 2008-03-14 17:15:59 +00:00
Paolo Cignoni b768cce86c Added doxygen documentation 2008-03-14 16:54:34 +00:00
Paolo Cignoni 7ea4ad85a0 Added doxygen documentation 2008-03-11 09:08:46 +00:00
Paolo Cignoni 14dee656f3 moved ActiveCoordinateFrame to its own files 2008-03-02 16:44:18 +00:00
Federico Ponchio de91366540 removed some garbage. 2008-02-26 18:55:55 +00:00
Federico Ponchio 86bf1f6d7b Fixed bug in drawing position of the trackball when changin center. 2008-02-26 18:46:55 +00:00
Paolo Cignoni d8c479c0fe corrected after quaternion/similarity/trackball changes 2008-02-26 18:22:42 +00:00
Paolo Cignoni 38a5850163 corrected CylinderMode::Apply 2008-02-26 18:00:41 +00:00
Federico Ponchio e4bed07afa Fixed scale behaviour. 2008-02-24 18:10:54 +00:00
Federico Ponchio 654452b177 Should work as before. I didn't test cylinder and other exotic modes. 2008-02-24 18:05:08 +00:00
Federico Ponchio 7006d170be Restored trackball functionality. Not very much tested, and code will need some
cleanup.
2008-02-24 14:37:00 +00:00
Paolo Cignoni 69c5890467 corrected typo 2008-02-22 20:34:35 +00:00
Paolo Cignoni b2d39163ac many user interface improvements, cleaned up a little 2008-02-22 20:04:02 +00:00
Paolo Cignoni 228db666c3 first attempt to correct after quaternion ToMatrix() inversion (does not work yet) 2008-02-22 18:57:47 +00:00
Paolo Cignoni b71c11a0f7 some generalization made 2008-02-17 20:52:53 +00:00
Paolo Cignoni 0758b0b32d first version 2008-02-16 14:12:30 +00:00
Paolo Cignoni f027791ab4 removing wrong committed files 2008-02-16 12:03:59 +00:00
Paolo Cignoni f93857dbb0 first version, adapted from meshlab's editmeasure plugin 2008-02-16 12:00:35 +00:00
Paolo Cignoni 45b9624e73 added snap to CylinderMode 2008-02-15 20:57:22 +00:00
Paolo Cignoni e69c1d166b removed some variable initialization related warning, added snap to CylinderMode 2008-02-15 20:56:41 +00:00
Paolo Cignoni 77415bc213 removed some variable initialization related warning 2008-02-15 20:54:45 +00:00
mtarini 44260d6c42 *** empty log message *** 2007-12-21 12:29:34 +00:00
Federico Ponchio 5552afc7d1 #include <gl/glew.h> -> #include <GL/glew.h>
(it is case sensitive under linux...)
2007-10-24 10:39:07 +00:00
Paolo Cignoni f30329419b corrected bug into the drawsphere (thanks to nico and guido!) 2007-10-22 14:39:54 +00:00
Massimiliano Corsini 63b27cb1b5 solve memory leak in dtor 2007-10-12 14:02:39 +00:00
Paolo Cignoni 95b2d87cc3 glEnable (GL_LINE_SMOOTH) should go before changing the linewidth. 2007-08-17 09:19:40 +00:00
Paolo Cignoni c63ba58a30 Minor edits in Doxygen documentation. 2007-07-14 12:44:40 +00:00
Paolo Cignoni b2e7a9e03b Added Doxygen documentation. 2007-07-14 12:43:44 +00:00