Subversion Repositories gelsvn

Rev

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

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