Commit Graph

308 Commits

Author SHA1 Message Date
granzuglia 6ec773c50a - added missing upper bound control on vector access by index 2013-10-17 17:22:16 +00:00
granzuglia 6b7ca162ce - fixed compile time errors with qt 5.0 2013-05-24 16:31:16 +00:00
Paolo Cignoni b473bebdd3 added another style of rendering to the opengl addon.
Imprpved customizability of arrows
2012-12-21 15:34:32 +00:00
Paolo Cignoni e04a37bf60 removed harmless warnings 2012-12-02 14:57:08 +00:00
Paolo Cignoni 7540b29cf5 Added a few missing const specifiers 2012-11-28 11:23:51 +00:00
Nico Pietroni 70b2cd1d25 removed several functions and moved to the gl wrapper of mixed integer 2012-11-18 18:07:39 +00:00
Nico Pietroni 52648c58ad used per vertex and per face optional attributes 2012-10-15 01:13:30 +00:00
Nico Pietroni 45633b841e added initial define to avoid multiple inclusions 2012-10-08 11:53:07 +00:00
Paolo Cignoni 194d9eb4d7 Removed two old useless wrong stupid functions that have been left into wrap/trimesh.h for unforgivable lazyness... 2012-10-08 05:30:34 +00:00
Paolo Cignoni 98fd61970e added missing par 2012-10-07 17:20:54 +00:00
Paolo Cignoni 1aa2c374e1 corrected useless test for an ancient opengl extension (glPointParameterfv). no more needed and creating problems to new compilers... 2012-10-05 16:45:25 +00:00
Nico Pietroni e6cc513cae minor changes in singularity drawing 2012-09-22 13:40:56 +00:00
Nico Pietroni 62b1a26ecf changes drawing of cross field to show the 2 main directions 2012-09-05 23:27:10 +00:00
Nico Pietroni a4ee21d5d7 added GLDrawSeams function 2012-09-03 15:58:38 +00:00
Nico Pietroni c469b5b948 major modifications 2012-05-25 13:22:07 +00:00
Paolo Cignoni 80363d2ff0 added to these two gl-related files the system independent inclusion of GLU.
IT is necessary since the last version of QT does not include anymore glu when including QGL stuff
2012-05-23 08:50:03 +00:00
Nico Pietroni 2413b12724 switched to the new version of tangent directions component per face 2012-03-29 16:35:15 +00:00
Nico Pietroni 9d37776dd6 first release version 2012-03-16 13:50:45 +00:00
Paolo Cignoni 8a8f48ac85 Changed all the MeshType::HasSomething() into the now standard tri::HasSomething(MeshType &m) 2012-01-25 10:21:59 +00:00
Nico Pietroni 36b4d6eeab added inclusion of point2.h 2012-01-23 13:13:24 +00:00
Paolo Cignoni fbe0b23839 corrected bug in the allocation of the result of multiple connected triangulations (poligons with holes, and added parameter to revert the order of outlines) 2012-01-18 16:48:06 +00:00
Paolo Cignoni 34cb93552c added glloadmatrix that takes in input a matrix44 (just like glmultmatrix) 2011-12-14 08:53:56 +00:00
Federico Ponchio 4400d8dd2d added multithreading 2011-12-09 16:06:08 +00:00
Massimiliano Corsini da98ec18f1 2011-10-12 07:52:07 +00:00
Paolo Cignoni 2fe129645b Rolled back 2011-10-05 15:04:40 +00:00
Paolo Cignoni ca28591e69 Made the boundary capper based on the glu tessellator interface more robust to deleted stuff 2011-05-31 08:40:02 +00:00
Paolo Cignoni 7ff3b08e5f updated to use pos instead explicit topology 2011-05-24 09:42:10 +00:00
Paolo Cignoni 2239cbd747 added simple boundary capper. Takes a edge mesh and caps its boundaries. 2011-05-11 10:04:33 +00:00
Paolo Cignoni f0a5d17759 Added a hint that you NEED opengl definition before including this file 2011-05-11 10:03:28 +00:00
Paolo Cignoni 384ea891dc added drawing of edges in wireframe if meshes has no faces 2011-05-10 21:57:01 +00:00
matteodelle 49a15ebd82 mozione ponchio per rimozione codice inutile 2011-04-27 13:02:30 +00:00
Paolo Cignoni 214904b312 Ongoing corrections of include paths to comply the new folder arrangement 2011-04-03 22:50:59 +00:00
ganovelli f7d8e31056 minor (missing include, left CMeshO) 2011-01-23 22:28:39 +00:00
Paolo Cignoni 71bdb18e07 Added more hints for better controlling point rendering (smoothnes and distance attenuation) 2011-01-18 11:11:19 +00:00
ganovelli bd03229989 patch to force immediate mode (bug with vbo to be solved)
bug in call glTexCoordPointer fixed
2010-11-08 11:03:18 +00:00
Paolo Cignoni 343493ef11 Moved the ORTHO, PERSPECTIVE enums from the vcg namespace to the camera class namespace. 2010-10-31 13:19:09 +00:00
ganovelli 42c69abccf first working commit for the apss (from Algebraic point set surfaces
Gaël Guennebaud and Markus Gross, SIG07)
2010-10-29 17:18:29 +00:00
Nico Pietroni ce779c0082 added if(tm==TMPerWedge) glEnable(GL_TEXTURE_2D); on line 543 2010-07-15 13:29:31 +00:00
Nico Pietroni 26709cae6c cahnged WIN32 define to _WIN32 2010-07-15 13:27:18 +00:00
granzuglia 8f2c1d543d fixed small visualization bugs (dereferenced empty vertex attributes) 2010-05-24 14:53:54 +00:00
Paolo Cignoni 4cfffc32f2 corrected managment of per-mesh color for point clouds 2010-04-28 15:02:05 +00:00
Paolo Cignoni aa04a96264 Never try to make a glwrap DrawFill over an empty mesh... 2010-04-27 09:50:55 +00:00
Paolo Cignoni c095f8efe6 added pushattrib/popattrib in the point rendering code of gl trimesh wrapper 2010-04-20 01:01:13 +00:00
Paolo Cignoni 0f221f2d99 added suppor for per vertex tex coord rendering 2010-04-08 16:52:23 +00:00
Nico Pietroni d32ed18e1d corrected one bug in FromTrackball function 2010-04-07 21:43:24 +00:00
Nico Pietroni 1438c44f5f - Allowed the usage of per vertex coordinate , uncommented tm==TMPerVert options
- corrected cast warning on line 721
2010-04-05 15:29:19 +00:00
Paolo Cignoni c2456526fd added vertex picking 2010-02-26 16:20:15 +00:00
Nico Pietroni 66ae917613 commented "int _t2=clock();" call in Crease function, it is unuseful and requires to include time.h 2009-07-17 17:44:40 +00:00
Paolo Cignoni 67ce5b52ce Added glColor and glClearColor for both Color4f (missing) and Color4d (just added) 2009-07-10 13:24:29 +00:00
Paolo Cignoni 2d3d9bd13f corrected wrong test on the use of faux edges when drawing in wireframe 2009-05-21 22:59:16 +00:00
granzuglia 5811240f92 added GPL incipit 2009-05-18 14:10:59 +00:00
granzuglia 9ef1804d3a added GPL incipit 2009-05-18 14:08:04 +00:00
Nico Pietroni 147817f6ea line 795 changed DrawWire<NMPerVert,CMNone>(); -> DrawWire<nm,CMNone>(); 2009-04-22 15:22:48 +00:00
Paolo Cignoni af6a963f41 corrected returned number of PickFaceVisible function 2009-04-22 10:28:52 +00:00
granzuglia 17d5caeed1 fixed compiler's errors 2009-04-21 05:58:08 +00:00
mtarini 97b5d83721 Now all wireframes mode hide "faux" edges
(those inside a polygon face), 
IFF you do SetHint(HNIsPolygonal).
2009-04-20 22:57:42 +00:00
mtarini 935b2e102b added a test on existence of glPointParameterfv before its use in point-based mesh rendering to avoid crashes. 2009-04-20 16:30:35 +00:00
Paolo Cignoni 3bf343c31b gcc compilation issue 2009-04-02 07:56:38 +00:00
Paolo Cignoni b22077f200 added picking of visible faces 2009-04-01 14:51:49 +00:00
Paolo Cignoni 7c9aa1c99f Crude, yet functional, custom attribute implementation 2009-01-23 09:22:38 +00:00
Paolo Cignoni 8627c95678 Added Attribute support 2009-01-12 13:57:48 +00:00
Federico Ponchio 6d2363d10a There was a bug in TransformGL for perspective matrix.
The function worked as intended only if near == focal.
2008-11-21 17:22:58 +00:00
Paolo Cignoni 818eb2b61d remove an ifdef for compiling with older apple compiler. no more needed under leopard (thanks to Iacopo Peri) 2008-11-18 09:37:23 +00:00
Federico Ponchio 01c0bc106f Added function to get near and far plane for a box (exact). 2008-11-07 15:15:06 +00:00
Paolo Cignoni dfc97ba1f2 fix Matrix44 infinite product, make glGetv not allocate temporary 2008-10-30 10:47:08 +00:00
Paolo Cignoni 3d43483497 one more fix gcc 4.0.1 issue in wrap/gl/math 2008-10-29 13:04:11 +00:00
Paolo Cignoni 0d9795d163 fix gcc 4.0.1 issue in wrap/gl 2008-10-29 12:56:32 +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
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 4db69febbe big replacement .Zero => .SetZero, and start of Eigen's compatibilities (currently disabled by default) 2008-10-27 14:48:14 +00:00
Federico Ponchio fe59b6ad4d Extrinsics.tra is now private, using Tra() 2008-10-24 16:37:24 +00:00
Paolo Cignoni 8f77d3cbaa removed non-portable inclusion of GL.h (on mac gl.h is in stupid places) 2008-10-15 10:11:39 +00:00
Paolo Cignoni a3dbc3168b fix a typo in Program::Uniform() 2008-10-15 09:28:15 +00:00
Paolo Cignoni 64ce68dac0 * make EmptyRadius::HasRadius returns false
* make gl/Shader and gl/Program* a bit easier to use:
 - automatic object creation
 - add Uniform() overloads for vcg::Point*f types
2008-10-15 08:02:14 +00:00
Paolo Cignoni 117c2a06de New Parameter function to setup glsl programs that use geometry shaders 2008-10-09 08:58:57 +00:00
Paolo Cignoni 7722469c4f Public keyword missing 2008-10-08 14:30:56 +00:00
Paolo Cignoni 2da37bd5f7 Geometri shader, initial support 2008-10-08 14:00:32 +00:00
Paolo Cignoni b6d7e548b2 Commented out filename after final endif 2008-10-08 14:00:01 +00:00
ganovelli ca01052454 Chamged MatrixGL to comply renaming in wrap/gl/shot.h 2008-10-07 10:58:18 +00:00
ganovelli b4fa6b9c97 -missing template type added in CameraDistance
-bug in DrawPoints removed
2008-07-24 12:37:18 +00:00
Paolo Cignoni 700b8cd26e Removed annoying unsigned vs signed warnings.
Thanks to Alain Boyer for the kind bug submission!
2008-06-29 22:44:44 +00:00
Paolo Cignoni 17369b521b Matrix transformations corrected in glCylinder and glArrow. 2008-06-23 14:33:51 +00:00
Paolo Cignoni 67ce430991 Added point drawing using vertex arrays and distance attenuation for large points 2008-06-10 00:57:46 +00:00
Paolo Cignoni 7fe04d928d added newline at end of file 2008-03-02 15:50:20 +00:00
Paolo Cignoni 9607ee6107 made all static 2008-03-02 14:16:39 +00:00
Paolo Cignoni 0fdd22023e removed unused vars 2008-02-15 08:19:51 +00:00
Paolo Cignoni 0e283de929 added sanity checks when deleting buffers 2008-01-28 08:49:58 +00:00
Paolo Cignoni c80e50570b Renamed some unmeaningful variable names (b -> array_buffers ; h -> curr_hints) 2007-12-05 11:08:16 +00:00
Paolo Cignoni 63ee2004b6 - Fixed DrawFill method, which required the hint 'HNUseVArray' enabled in order to render the mesh with VBO. This was also causing extra overhead in the Update method since HNUseVArray has to be enabled and therefore extra calculation were done to copy vertices in VArrays even if the user was using only VBOs. 2007-12-04 17:59:41 +00:00
Marco Di Benedetto 2ea14ac83b Added cast to prevent pointer truncation warning/error messages. 2007-12-01 18:09:14 +00:00
Marco Di Benedetto 87b88070c1 Added a GLenum cast to suppress warning message. 2007-10-16 13:31:23 +00:00
Marco Di Benedetto fe22c31f2d *** empty log message *** 2007-09-12 16:20:24 +00:00
Marco Di Benedetto 5261480fc7 Corrected indexing for non textured faces. 2007-09-12 14:48:50 +00:00
Paolo Cignoni afdaa7e3db Added ifdef needed for mac gcc compilation 2007-08-28 05:43:56 +00:00
Paolo Cignoni 8b27c96df2 moved here callback def and added some needed opengl related casts 2007-08-25 08:43:33 +00:00
Paolo Cignoni c14e1511db added a missing typename 2007-08-17 07:00:00 +00:00
ganovelli 135951fd27 added gltetra, added normal gltriangle 2007-07-31 12:21:50 +00:00
Marco Di Benedetto 29febfdf25 First Commit. 2007-07-26 16:22:47 +00:00
ganovelli f2e35aaf0d precompiler directives 2007-07-05 16:35:29 +00:00
ganovelli 96adfb6f7c typenames 2007-07-05 16:35:14 +00:00
Paolo Cignoni f354a9f445 Small gcc compiling issues 2007-05-31 09:39:56 +00:00
Paolo Cignoni 3cf34fb91a Added std:: prefix to advance call 2007-05-28 07:35:21 +00:00
Paolo Cignoni 97d7baf66c Corrected gcc compiling issues 2007-05-21 13:22:40 +00:00
Marco Di Benedetto 1c2f0e7db7 First Commit. 2007-05-14 22:23:36 +00:00
ganovelli 1b72079489 change from Tetra.h to tetra.h 2007-05-08 18:56:51 +00:00
ganovelli e77e2dcf26 glTriangle added 2007-05-08 18:55:38 +00:00
ganovelli 9ff5b1a193 adde vf iterator 2007-05-08 18:55:14 +00:00
Paolo Cignoni 5d4900c29f Added cast for mac compiling 2007-02-22 09:17:56 +00:00
Paolo Cignoni 13a26e1b89 Added cast for mac compiling 2007-01-18 01:26:23 +00:00
matteodelle 17ebec98c6 minor eroor correction on variable names 2006-12-18 16:02:57 +00:00
Marco Callieri 02f23020fc added a function to approximate a far plane value given a shot and the mesh bbox 2006-12-18 15:26:24 +00:00
matteodelle 5360cc0977 *** empty log message *** 2006-12-18 14:28:07 +00:00
Marco Callieri a344d59446 camera+shot revamp: changed field names to something with more sense, cleaning of various functions, correction of minor bugs/incongruences, removal of the infamous reference in shot. 2006-12-18 09:46:39 +00:00
Paolo Cignoni 1cb21d78f1 Slightly changed the colormaterial mode for the flatwire 2006-12-12 11:06:58 +00:00
ganovelli ebfacd2db3 first draft of the class the draw a Pos 2006-12-10 19:59:28 +00:00
Paolo Cignoni 67007b3691 Added a class prototype for avoiding the inclusion of tetra.h 2006-12-07 00:39:22 +00:00
Paolo Cignoni aa10ac62be Removed useless include <tetra.h> 2006-12-04 09:27:13 +00:00
Paolo Cignoni 132ffb7d82 Added type cast (in order to remove warnings) 2006-10-27 08:55:15 +00:00
Federico Ponchio 4b46ed3c4e Aggiunti un paio di typename... al solito. 2006-10-14 16:26:26 +00:00
Paolo Cignoni b9b2725478 Removed the default use of the OpenGL transpose extension. Added two method for direct (non transposed) matrix multiplication and getting 2006-10-09 19:56:09 +00:00
Marco Di Benedetto d878081824 First Commit. 2006-10-05 18:34:13 +00:00
ganovelli 89c3034fd9 *** empty log message *** 2006-07-06 12:38:32 +00:00
Paolo Cignoni e7200db32e remove warning C4244 2006-07-03 13:46:34 +00:00
ganovelli a24e269ac4 Aggiunto namespace tetra, cambiato riferimento a puntatore 2006-06-29 13:25:46 +00:00
Paolo Cignoni 283834183d gcc dislike doubleline comments; removed. 2006-05-25 09:40:14 +00:00
Paolo Cignoni 47e62b3c6e Removed all GLUT dependencies! 2006-05-25 09:22:58 +00:00
Paolo Cignoni de11419338 Corrected bug in the pickface to comply deleted faces and to allow to have unsorted results. 2006-05-25 04:42:29 +00:00
Paolo Cignoni 309fa30451 Wrong matrix type in cone (thx Maarten) 2006-03-29 07:54:03 +00:00
Federico Ponchio cc73ff49c9 for(ii... -> for(int ii 2006-02-28 13:25:48 +00:00
Paolo Cignoni c01d03e1ee Removed glut. Added ifdef guards and namespace.
Added bool return value to the pick function
2006-02-13 13:06:34 +00:00
Paolo Cignoni 1f2ff388d2 Removed glew inclusion 2006-02-13 13:05:05 +00:00
Paolo Cignoni 287fd21a07 Switched from rough zoffset to glpolygonoffset for hiddenline and flatlines modes. Less zfighting... 2006-02-09 10:00:39 +00:00
matteodelle 060df82dd4 *** empty log message *** 2006-01-11 16:06:25 +00:00
Paolo Cignoni edc2f8532d add namespace vcg:: 2006-01-10 12:22:34 +00:00
Paolo Cignoni 20b3385c59 fix some bugs 2006-01-04 16:39:29 +00:00
Nico Pietroni e9b8ee44e1 unified use of float in drawing methods 2006-01-03 11:13:25 +00:00
Paolo Cignoni d32db6dd2a add test (tm==TMPerWedgeMulti) 2005-12-15 14:05:59 +00:00
Paolo Cignoni 67528dcf14 multiple texture support 2005-12-14 00:18:43 +00:00
Federico Ponchio d652973606 glut->GL/glut (for real this time) 2005-12-06 14:11:15 +00:00
ganovelli 03d96c24b2 *** empty log message *** 2005-12-03 09:36:28 +00:00
Paolo Cignoni b3abb3c44f Changed a wrong uppercase in the include 2005-12-02 10:38:07 +00:00
Paolo Cignoni 8ae47cd7c7 Added support for one texture mode (perwedge)
Changed texturemapid array into a safer vector
2005-12-02 00:03:22 +00:00
Paolo Cignoni 07d2259700 shot.camera -> shot.Camera()
shot.similarity.Matrix() -> shot.Similarity().Matrix()
2005-11-25 10:33:33 +00:00
Paolo Cignoni 6a04d281df Added bound checking in texture access 2005-11-24 08:06:50 +00:00
Paolo Cignoni 7bca532292 Added a missing colormaterial for flatwire. 2005-11-22 23:57:28 +00:00
Paolo Cignoni 50f4e33dcc add
#ifndef __PICK______H
#define __PICK______H
2005-10-27 14:46:26 +00:00
Paolo Cignoni 45583a69ae add namespace vcg:: to GetFrustum(...) 2005-10-24 14:42:57 +00:00
Paolo Cignoni 53f49b4784 Added glscale(scalar) and corrected bug in glscale(point2) 2005-10-13 08:32:26 +00:00