Subversion Repositories gelsvn

Rev

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

Rev 211 Rev 389
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.
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
-
 
14
for symmetric matrices.
-
 
15
 
-
 
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
-
 
18
SOIL a small open source library for image loading by Jonathan Dummer.
13
 
19
 
14
Finally there are some utilities in Util: Getting command line arguments,
20
Finally there are some utilities in Util: Getting command line argumens,
15
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 
16
miscellany.
22
miscellany.
17
*/
23
*/
18
 
24
 
19
/** \namespace CGLA
25
/** \namespace CGLA
20
\brief Computer Graphics Linear Algebra.
26
\brief Computer Graphics Linear Algebra.
21
 
27
 
22
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
23
templates designed with computer graphics in mind. CGLA stands for
29
templates designed with computer graphics in mind. CGLA stands for
24
``Computer Graphics Linear Algebra''.
30
``Computer Graphics Linear Algebra''.
25
 
31
 
26
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
27
linear algebra package?
33
linear algebra package?
28
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
29
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
30
some template programming techniques. This led to the most important
36
some template programming techniques. This led to the most important
31
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
32
from the same template. 
38
from the same template. 
33
 
39
 
34
This makes it easy to ensure identical semantics: Since all vectors
40
This makes it easy to ensure identical semantics: Since all vectors
35
have inherited, say, the * operator from a common ancestor, it works
41
have inherited, say, the * operator from a common ancestor, it works
36
the same for all of them.
42
the same for all of them.
37
 
43
 
38
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 
39
(not numerical computations) and this had a number of
45
(not numerical computations) and this had a number of
40
implications. Since, in computer graphics we mainly need small vectors
46
implications. Since, in computer graphics we mainly need small vectors
41
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
42
dimensionality. Moreover, the amount of memory allocated for a vector
48
dimensionality. Moreover, the amount of memory allocated for a vector
43
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
44
memory. CGLA also does not use virtual functions, and most functions
50
memory. CGLA also does not use virtual functions, and most functions
45
are inline. These features all help making CGLA relatively fast. 
51
are inline. These features all help making CGLA relatively fast. 
46
 
52
 
47
Of course, other libraries of vector templates for computer graphics
53
Of course, other libraries of vector templates for computer graphics
48
exist, but to my knowledge none where the fundamental templates are
54
exist, but to my knowledge none where the fundamental templates are
49
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
50
a template (ArithVec) that gets both type
56
a template (ArithVec) that gets both type
51
(e.g. float) and dimension 
57
(e.g. float) and dimension 
52
(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
53
ancestor of concrete types such as Vec3f - a 3D floating
59
ancestor of concrete types such as Vec3f - a 3D floating
54
point type. 
60
point type. 
55
 
61
 
56
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,
57
since it makes it extremely simple to add new types of
63
since it makes it extremely simple to add new types of
58
vectors. Another very generic template is ArithMat which is a
64
vectors. Another very generic template is ArithMat which is a
59
template for matrix classes. (and not necessarily NxN matrices). 
65
template for matrix classes. (and not necessarily NxN matrices). 
60
 
66
 
61
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
62
classes, a quaternion and some utility classes. In summary, the most
68
classes, a quaternion and some utility classes. In summary, the most
63
important features are
69
important features are
64
 
70
 
65
- A number of 2, 3 and 4 d vector classes.
71
- A number of 2, 3 and 4 d vector classes.
66
- A number of Matrix classes.
72
- A number of Matrix classes.
67
- A Quaternion class.
73
- A Quaternion class.
68
- Some test programs.
74
- Some test programs.
69
- Works well with OpenGL.
75
- Works well with OpenGL.
70
 
76
 
71
 
77
 
72
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
73
above was taken from that text.
79
above was taken from that text.
74
*/
80
*/
75
 
81
 
76
/** \namespace Graphics
82
/** \namespace GLGraphics
77
		\brief The namespace for things related to (real time) rendering
83
	\brief The namespace for things related to (real time) rendering
78
 
84
	
79
		Right now this namespace contains mostly trackball and viewing related
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
80
		things.
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.
81
*/
89
*/
82
 
90
 
83
/** \namespace Geometry
91
/** \namespace Geometry
84
		\brief A namespace for utilities related to geometry.
92
		\brief A namespace for utilities related to geometry.
85
 
93
 
86
		This namespace contains a wide range of stuff: Spatial datastructures
94
		This namespace contains a wide range of stuff: Spatial datastructures
87
		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.
88
*/
96
*/
89
 
97
 
90
/** \namespace HMesh
98
/** \namespace HMesh
91
		\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
92
		based mesh.
100
		based mesh.
93
 
101
 
94
		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 
95
		namespace. More advanced things are relegated to the HMeshUtil namespace.
103
		namespace. More advanced things are relegated to the HMeshUtil namespace.
96
 
104
 
97
		Some applications are also found here. For instance an isosurface 
105
		Some applications are also found here. For instance an isosurface 
98
		polygonizer and Garland Heckbert simplification has been implemented
106
		polygonizer and Garland Heckbert simplification has been implemented
99
	  on top of HMesh.
107
	  on top of HMesh.
100
*/
108
*/
101
 
109
 
102
/*!
110
/*!
103
	\namespace LinAlg
111
	\namespace LinAlg
104
	\brief The Linear Algebra Implementation/Module/Package. 
112
	\brief The Linear Algebra Implementation/Module/Package. 
105
 
113
 
106
  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 
107
  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 
108
  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 
109
  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 
110
  (CVec2 and CVec3) are included for improved performance. The more advanced 
118
  (CVec2 and CVec3) are included for improved performance. The more advanced 
111
  linear algebra functions are supplied by lincage to the LaPack package.
119
  linear algebra functions are supplied by lincage to the LaPack package.
112
 
120
 
113
  \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 
114
  been tested by making small functions utilizing the functions. The 
122
  been tested by making small functions utilizing the functions. The 
115
  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 
116
  their functional simplicity.
124
  their functional simplicity.
117
 
125
 
118
	A list of improvements in mind is:
126
	A list of improvements in mind is:
119
	- Lapack interface
127
	- Lapack interface
120
	- Vector and Matrix product and so on, with interface to _BLAS_
128
	- Vector and Matrix product and so on, with interface to _BLAS_
121
	- iterator thing
129
	- iterator thing
122
	- Memory leak check ? inline ?
130
	- Memory leak check ? inline ?
123
	- Element functor
131
	- Element functor
124
	- Identity matrixs
132
	- Identity matrixs
125
	- Compile and utilize the newer versions of the Lapack routines.
133
	- Compile and utilize the newer versions of the Lapack routines.
126
	- Have a nameing convention section in the documentaion
134
	- Have a nameing convention section in the documentaion
127
	- Integrate the design into the documentation
135
	- Integrate the design into the documentation
128
	- 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].
129
	- Have 3x3, 3x4 4x1 and 4x4 specialities.
137
	- Have 3x3, 3x4 4x1 and 4x4 specialities.
130
	- Look at casting e.g. vec2i=vec2l.
138
	- Look at casting e.g. vec2i=vec2l.
131
	- Error handling in From/To matrix
139
	- Error handling in From/To matrix
132
	- Has error handling in Lapack been made ?
140
	- Has error handling in Lapack been made ?
133
 
141
 
134
	\author Henrik Aanæs
142
	\author Henrik Aanæs
135
	\version Aug 2001
143
	\version Aug 2001
136
*/
144
*/
137
 
145
 
138
/** \namespace Util
146
/** \namespace Util
139
		\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.
140
 
148
 
141
*/
149
*/
142
 
150
 
143
 
151