From f7a3cb4755434670d53b7813f53c6021ae2b51ca Mon Sep 17 00:00:00 2001 From: ganovelli Date: Sat, 17 Mar 2007 13:22:55 +0000 Subject: [PATCH] some more comment added --- apps/sample/trimesh_SDL/trimesh_sdl.cpp | 28 +++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/apps/sample/trimesh_SDL/trimesh_sdl.cpp b/apps/sample/trimesh_SDL/trimesh_sdl.cpp index 539be7b7..789dbb99 100644 --- a/apps/sample/trimesh_SDL/trimesh_sdl.cpp +++ b/apps/sample/trimesh_SDL/trimesh_sdl.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.3 2006/11/21 17:44:06 cignoni +Update to the latest version of the trackball + Revision 1.2 2005/11/22 17:50:15 cignoni Refactored the sample code. Shortened a lot and removed all unused unnecessary stuff @@ -33,27 +36,48 @@ Initial Relase ****************************************************************************/ #include - #include #include -// mesh definition +/*include the base definition for the vertex */ #include + +/*include the base definition for the face */ #include + +/*include the base definition for the trimesh*/ #include + +/*include the algorihm that update bounding box and normals*/ #include #include + +/*include the importer from disk*/ #include + +/*include wrapping of the trimesh towards opengl*/ #include + +/*include the trackball: NOTE, you the implementation of the trackball is found in the files: +wrap/gui/trackball.cpp and wrap/gui/trackmode.cpp. You should include these files in your solution +otherwise you'll get linking errors */ #include using namespace vcg; using namespace std; + class CEdge; // dummy prototype never used class CFace; +/* define a vertex passing the attributes you want it to have. Each attributes has its own class. +Check vcg/simplex/vertexplus/component.h to find out the existing attributes. Note: then you could +also personalized attributes */ class CVertex : public VertexSimp2< CVertex, CEdge, CFace, vert::Coord3f, vert::Normal3f >{}; + +/*same as for the vertes */ class CFace : public FaceSimp2< CVertex, CEdge, CFace, face::VertexRef, face::Normal3f > {}; + +/*the mesh is a container of vertices and a container of faces */ class CMesh : public vcg::tri::TriMesh< vector, vector > {};