Subversion Repositories gelsvn

Rev

Rev 182 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 182 Rev 211
1
/** \mainpage GEL: GEometric and Linear algebra tools.
1
/** \mainpage GEL: GEometric and Linear algebra tools.
2
 
2
 
3
GEL is a framwork for computer graphics and 3D vision.
3
GEL is a framwork for computer graphics and 3D vision.
4
 
4
 
5
There are a good many tools for computational geometry processing: A
5
There are a good many tools for computational geometry processing: A
6
voxel grid and a simple triangle mesh data structure. There is also a
6
voxel grid and a simple triangle mesh data structure. There is also 
7
more advanced triangle mesh data structure called IMesh and a halfedge
-
 
8
based polygonal mesh data structure called HMesh. There is a very
7
a halfedge based polygonal mesh data structure called HMesh. There is a very
9
useful data structure known as a k-D tree and many other things. 
8
useful data structure known as a k-D tree and many other things. 
10
 
9
 
11
Also found are two packages for linear algebra: CGLA is strictly for small
10
Also found are two packages for linear algebra: CGLA is strictly for small
12
vectors and matrices. LinAlg is a Lapack wrapper for slightly larger 
11
vectors and matrices. LinAlg is a Lapack wrapper for slightly larger 
13
problems. At this point, it is fairly simple.
12
problems. At this point, it is fairly simple.
14
 
13
 
15
Finally there are some utilities in Util: Getting command line arguments,
14
Finally there are some utilities in Util: Getting command line arguments,
16
hash table classes, a 2D grid class, a resource manager and other 
15
hash table classes, a 2D grid class, a resource manager and other 
17
miscellany.
16
miscellany.
18
*/
17
*/
19
 
18
 
20
/** \namespace CGLA
19
/** \namespace CGLA
21
\brief Computer Graphics Linear Algebra.
20
\brief Computer Graphics Linear Algebra.
22
 
21
 
23
CGLA is a set of numerical C++ vector and matrix classes and class
22
CGLA is a set of numerical C++ vector and matrix classes and class
24
templates designed with computer graphics in mind. CGLA stands for
23
templates designed with computer graphics in mind. CGLA stands for
25
``Computer Graphics Linear Algebra''.
24
``Computer Graphics Linear Algebra''.
26
 
25
 
27
Let us get right down to the obvious question: Why create another
26
Let us get right down to the obvious question: Why create another
28
linear algebra package?
27
linear algebra package?
29
Well, CGLA evolved from a few matrix and vector classes because I
28
Well, CGLA evolved from a few matrix and vector classes because I
30
didn't have anything better. Also, I created CGLA to experiment with
29
didn't have anything better. Also, I created CGLA to experiment with
31
some template programming techniques. This led to the most important
30
some template programming techniques. This led to the most important
32
feature of CGLA, namely the fact that all vector types are derived
31
feature of CGLA, namely the fact that all vector types are derived
33
from the same template. 
32
from the same template. 
34
 
33
 
35
This makes it easy to ensure identical semantics: Since all vectors
34
This makes it easy to ensure identical semantics: Since all vectors
36
have inherited, say, the * operator from a common ancestor, it works
35
have inherited, say, the * operator from a common ancestor, it works
37
the same for all of them.
36
the same for all of them.
38
 
37
 
39
It is important to note that CGLA was designed for Computer Graphics 
38
It is important to note that CGLA was designed for Computer Graphics 
40
(not numerical computations) and this had a number of
39
(not numerical computations) and this had a number of
41
implications. Since, in computer graphics we mainly need small vectors
40
implications. Since, in computer graphics we mainly need small vectors
42
of dimension 2,3, or 4 CGLA was designed for vectors of low
41
of dimension 2,3, or 4 CGLA was designed for vectors of low
43
dimensionality. Moreover, the amount of memory allocated for a vector
42
dimensionality. Moreover, the amount of memory allocated for a vector
44
is decided by its type at compile time. CGLA does not use dynamic
43
is decided by its type at compile time. CGLA does not use dynamic
45
memory. CGLA also does not use virtual functions, and most functions
44
memory. CGLA also does not use virtual functions, and most functions
46
are inline. These features all help making CGLA relatively fast. 
45
are inline. These features all help making CGLA relatively fast. 
47
 
46
 
48
Of course, other libraries of vector templates for computer graphics
47
Of course, other libraries of vector templates for computer graphics
49
exist, but to my knowledge none where the fundamental templates are
48
exist, but to my knowledge none where the fundamental templates are
50
parametrized w.r.t. dimension as well as type. In other words, we have
49
parametrized w.r.t. dimension as well as type. In other words, we have
51
a template (ArithVec) that gets both type
50
a template (ArithVec) that gets both type
52
(e.g. float) and dimension 
51
(e.g. float) and dimension 
53
(e.g. 3) as arguments. the intended use of this template is as
52
(e.g. 3) as arguments. the intended use of this template is as
54
ancestor of concrete types such as Vec3f - a 3D floating
53
ancestor of concrete types such as Vec3f - a 3D floating
55
point type. 
54
point type. 
56
 
55
 
57
The use of just one template as basis is very important, I believe,
56
The use of just one template as basis is very important, I believe,
58
since it makes it extremely simple to add new types of
57
since it makes it extremely simple to add new types of
59
vectors. Another very generic template is ArithMat which is a
58
vectors. Another very generic template is ArithMat which is a
60
template for matrix classes. (and not necessarily NxN matrices). 
59
template for matrix classes. (and not necessarily NxN matrices). 
61
 
60
 
62
From a users perspective CGLA contains a number of vector and matrix
61
From a users perspective CGLA contains a number of vector and matrix
63
classes, a quaternion and some utility classes. In summary, the most
62
classes, a quaternion and some utility classes. In summary, the most
64
important features are
63
important features are
65
 
64
 
66
- A number of 2, 3 and 4 d vector classes.
65
- A number of 2, 3 and 4 d vector classes.
67
- A number of Matrix classes.
66
- A number of Matrix classes.
68
- A Quaternion class.
67
- A Quaternion class.
69
- Some test programs.
68
- Some test programs.
70
- Works well with OpenGL.
69
- Works well with OpenGL.
71
 
70
 
72
 
71
 
73
There is a document on CGLA in the GEL documentation. The introduction
72
There is a document on CGLA in the GEL documentation. The introduction
74
above was taken from that text.
73
above was taken from that text.
75
*/
74
*/
76
 
75
 
77
/** \namespace Graphics
76
/** \namespace Graphics
78
		\brief The namespace for things related to (real time) rendering
77
		\brief The namespace for things related to (real time) rendering
79
 
78
 
80
		Right now this namespace contains mostly trackball and viewing related
79
		Right now this namespace contains mostly trackball and viewing related
81
		things.
80
		things.
82
*/
81
*/
83
 
82
 
84
/** \namespace Geometry
83
/** \namespace Geometry
85
		\brief A namespace for utilities related to geometry.
84
		\brief A namespace for utilities related to geometry.
86
 
85
 
87
		This namespace contains a wide range of stuff: Spatial datastructures
86
		This namespace contains a wide range of stuff: Spatial datastructures
88
		voxel grids and related classes as well as a simple triangle mesh class.
87
		voxel grids and related classes as well as a simple triangle mesh class.
89
*/
88
*/
90
 
89
 
91
/** \namespace HMesh
90
/** \namespace HMesh
92
		\brief The HMesh namespace contains the Manifold class which is a halfedge
91
		\brief The HMesh namespace contains the Manifold class which is a halfedge
93
		based mesh.
92
		based mesh.
94
 
93
 
95
		Apart from manifold there are also face and vertex circulators in this 
94
		Apart from manifold there are also face and vertex circulators in this 
96
		namespace. More advanced things are relegated to the HMeshUtil namespace.
95
		namespace. More advanced things are relegated to the HMeshUtil namespace.
97
 
96
 
98
		Some applications are also found here. For instance an isosurface 
97
		Some applications are also found here. For instance an isosurface 
99
		polygonizer and Garland Heckbert simplification has been implemented
98
		polygonizer and Garland Heckbert simplification has been implemented
100
	  on top of HMesh.
99
	  on top of HMesh.
101
*/
100
*/
102
 
101
 
103
 
-
 
104
/** \namespace IMesh
-
 
105
		\brief An indexed face set triangle mesh.
-
 
106
 
-
 
107
		The classes in this namespace are part of an endeavour to create a 
-
 
108
		mesh class for a mesh which is completely generic wrt attributes.
-
 
109
 
-
 
110
		Any kind of face and vertex attribute can be added at run time. */
-
 
111
 
-
 
112
/** \namespace IMeshUtil
-
 
113
		\brief Utilities for IMesh
-
 
114
 
-
 
115
		This namespace contains loaders and other utilities needed in conjunction
-
 
116
		with IMesh. */
-
 
117
 
-
 
118
/*!
102
/*!
119
	\namespace LinAlg
103
	\namespace LinAlg
120
	\brief The Linear Algebra Implementation/Module/Package. 
104
	\brief The Linear Algebra Implementation/Module/Package. 
121
 
105
 
122
  This is the linear algebra package deal with vector and matrix types plus 
106
  This is the linear algebra package deal with vector and matrix types plus 
123
  the basic operation on them. The Vector and Matrix Types are templated such 
107
  the basic operation on them. The Vector and Matrix Types are templated such 
124
  that the precision of a given 'system' can be changen. Though the precision 
108
  that the precision of a given 'system' can be changen. Though the precision 
125
  or type in mind is the double. Special types for 2 and 3 vectors 
109
  or type in mind is the double. Special types for 2 and 3 vectors 
126
  (CVec2 and CVec3) are included for improved performance. The more advanced 
110
  (CVec2 and CVec3) are included for improved performance. The more advanced 
127
  linear algebra functions are supplied by lincage to the LaPack package.
111
  linear algebra functions are supplied by lincage to the LaPack package.
128
 
112
 
129
  \test The functionality in this pacage has if nothing else is mentioned 
113
  \test The functionality in this pacage has if nothing else is mentioned 
130
  been tested by making small functions utilizing the functions. The 
114
  been tested by making small functions utilizing the functions. The 
131
  reason being that the functions here are rather esay to validate due to 
115
  reason being that the functions here are rather esay to validate due to 
132
  their functional simplicity.
116
  their functional simplicity.
133
 
117
 
134
	A list of improvements in mind is:
118
	A list of improvements in mind is:
135
	- Lapack interface
119
	- Lapack interface
136
	- Vector and Matrix product and so on, with interface to _BLAS_
120
	- Vector and Matrix product and so on, with interface to _BLAS_
137
	- iterator thing
121
	- iterator thing
138
	- Memory leak check ? inline ?
122
	- Memory leak check ? inline ?
139
	- Element functor
123
	- Element functor
140
	- Identity matrixs
124
	- Identity matrixs
141
	- Compile and utilize the newer versions of the Lapack routines.
125
	- Compile and utilize the newer versions of the Lapack routines.
142
	- Have a nameing convention section in the documentaion
126
	- Have a nameing convention section in the documentaion
143
	- Integrate the design into the documentation
127
	- Integrate the design into the documentation
144
	- Have a get data in the matrix and vector instead of &A[0].
128
	- Have a get data in the matrix and vector instead of &A[0].
145
	- Have 3x3, 3x4 4x1 and 4x4 specialities.
129
	- Have 3x3, 3x4 4x1 and 4x4 specialities.
146
	- Look at casting e.g. vec2i=vec2l.
130
	- Look at casting e.g. vec2i=vec2l.
147
	- Error handling in From/To matrix
131
	- Error handling in From/To matrix
148
	- Has error handling in Lapack been made ?
132
	- Has error handling in Lapack been made ?
149
 
133
 
150
	\author Henrik Aanæs
134
	\author Henrik Aanæs
151
	\version Aug 2001
135
	\version Aug 2001
152
*/
136
*/
153
 
137
 
154
/** \namespace Util
138
/** \namespace Util
155
		\brief This namespace is for general utilities that do not fit elsewhere.
139
		\brief This namespace is for general utilities that do not fit elsewhere.
156
 
140
 
157
*/
141
*/
158
 
142
 
159
 
143