Folder structure

From vcg Library

Jump to: navigation, search

This article describes the folder structure of the VCG lib. It can be used to find out what to look for where.


vcglib/

Here we will assume that the folder containing the entire library is named sf, but it can be named in any other way; only, make sure you include this folder is part the list of "include" directories of your compiler (where the precompiler will look for when including a file).

Inside this sf folder you will find 4 sub-folders:

  • vcglib/vcg/: the core library: basic algorithms and data-structures;
  • vcglib/wrap/: common tools (interface, import/export) and gap-filling toward other libraries (OpenGl, STL...);
  • vcglib/apps/: a few command line applications developed with the library;
  • vcglib/docs/: the documentation.

Important note: in the above list, each level is independent on the following ones. E.g. the files in first level only include other files in that level (as well as standard C++ libraries), and the wrap level includes only files from the vcg level.

vcglib/vcg/

This is the core part of the library. It entirely consists of header files (.h files).

It is subdivided in several sub-folders, each representing a conceptual layer:

  • vcglib/vcg/math/: pure math things: matrices (3x3 and 4x4), quaternions, linear systems, histograms, etc;
  • vcglib/vcg/space/: spatial entities: points (2D or 3D), segments, rays, triangles, etc;
  • vcglib/vcg/simplex/: simplicial entities (with attributes): edges, faces, tetrahedral cells;
  • vcglib/vcg/container/: helper classes implementing containers for collection of simplices;
  • vcglib/vcg/complex/: simplicial complexes, i.e. triangle meshes, tetra-meshes, vertex meshes (point clouds) and edge-meshes (wireframe meshes).

All of the above items (once again) are shown in cascade order, meaning that each item in the list is totally independent on any following one, and uses only items at the same level and on the previous ones.

Each folder in the above lists is devoted not only to the classes to represent the shown entities, but also to the methods and the functions that can be applied to them. For example, the space folder contains also computation for the intersections of spatial elements, and the complex folder contains mesh classes as well as algorithms to manipulate meshes (e.g. simplification).

Note the difference between space and simplex elements: spacial elements are just that, for example a triangle in space or a segment. A simplex is a structure with associated 'attributes', adjacency structures, pointers to other simplices, and so on. In the VCG lib, triangle is not a triangular face, and a segment is not an edge.

Personal tools