Subversion Repositories gelsvn

Rev

Rev 389 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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