Subversion Repositories gelsvn

Rev

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

Rev 89 Rev 113
1
/** \mainpage GEL: Geometric and linear algebra tools.
1
/** \mainpage GEL: GEometric and Linear algebra tools.
2
 
2
 
3
GEL is a framwork for working with graphics and certain vision related
3
GEL is a framwork for computer graphics and 3D vision.
-
 
4
 
4
tasks. There is a good deal of tools for processing Geometry and
5
There are a good many tools for computational geometry processing: A
5
some tools for computer Graphics. There is a halfedge based mesh class in the
6
voxel grid and a simple triangle mesh data structure. There is also a
6
HMesh namespace, and an indexed face set based mesh class IMesh.
7
more advanced triangle mesh data structure called IMesh and a halfedge
-
 
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. 
7
 
10
 
8
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
9
vectors and matrices. LinAlg is a lapack wrapper for slightly larger 
12
vectors and matrices. LinAlg is a Lapack wrapper for slightly larger 
10
problems. Finally there are some utilities in Util.
13
problems. At this point, it is fairly simple.
-
 
14
 
-
 
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 
-
 
17
miscellany.
11
*/
18
*/
12
 
19
 
13
/** \namespace CGLA
20
/** \namespace CGLA
14
\brief Computer Graphics Linear Algebra
21
\brief Computer Graphics Linear Algebra.
-
 
22
 
-
 
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
-
 
25
``Computer Graphics Linear Algebra''.
-
 
26
 
-
 
27
Let us get right down to the obvious question: Why create another
-
 
28
linear algebra package?
-
 
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
-
 
31
some template programming techniques. This led to the most important
-
 
32
feature of CGLA, namely the fact that all vector types are derived
-
 
33
from the same template. 
-
 
34
 
-
 
35
This makes it easy to ensure identical semantics: Since all vectors
-
 
36
have inherited, say, the * operator from a common ancestor, it works
-
 
37
the same for all of them.
-
 
38
 
-
 
39
It is important to note that CGLA was designed for Computer Graphics 
-
 
40
(not numerical computations) and this had a number of
-
 
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
-
 
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
-
 
45
memory. CGLA also does not use virtual functions, and most functions
-
 
46
are inline. These features all help making CGLA relatively fast. 
-
 
47
 
-
 
48
Of course, other libraries of vector templates for computer graphics
-
 
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
-
 
51
a template (ArithVec) that gets both type
-
 
52
(e.g. float) and dimension 
-
 
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
-
 
55
point type. 
-
 
56
 
-
 
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
-
 
59
vectors. Another very generic template is ArithMat which is a
-
 
60
template for matrix classes. (and not necessarily NxN matrices). 
-
 
61
 
-
 
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
-
 
64
important features are
-
 
65
 
-
 
66
- A number of 2, 3 and 4 d vector classes.
-
 
67
- A number of Matrix classes.
-
 
68
- A Quaternion class.
-
 
69
- Some test programs.
-
 
70
- Works well with OpenGL.
15
 
71
 
16
CGLA is a collection of classes for linear algebra. All vectors and matrices 
-
 
17
are allocated on the static not using dynamic memory. Only dimensions 2,3,4 
-
 
18
are supported. There is also a quaternion class and other components. 
-
 
19
 
72
 
20
There is an introductory document discussing how to use CGLA.
73
There is a document on CGLA in the GEL documentation. The introduction
-
 
74
above was taken from that text.
21
*/
75
*/
22
 
76
 
23
/** \namespace Graphics
77
/** \namespace Graphics
24
		\brief The namespace for things related to (real time) rendering
78
		\brief The namespace for things related to (real time) rendering
25
 
79
 
26
		Right now this namespace contains mostly trackball and viewing related
80
		Right now this namespace contains mostly trackball and viewing related
27
		things.
81
		things.
28
*/
82
*/
29
 
83
 
30
/** \namespace Geometry
84
/** \namespace Geometry
31
		\brief A namespace for utilities related to geometry.
85
		\brief A namespace for utilities related to geometry.
32
 
86
 
33
		This namespace contains a wide range of stuff: Spatial datastructures
87
		This namespace contains a wide range of stuff: Spatial datastructures
34
		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.
35
*/
89
*/
36
 
90
 
37
/** \namespace HMesh
91
/** \namespace HMesh
38
		\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
39
		based mesh.
93
		based mesh.
40
 
94
 
41
		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 
42
		namespace. More advanced things are relegated to the HMeshUtil namespace.
96
		namespace. More advanced things are relegated to the HMeshUtil namespace.
43
*/
97
*/
44
 
98
 
45
/** \namespace HMeshUtil
99
/** \namespace HMeshUtil
46
		\brief The utility classes and functions for the halfedge based mesh.
100
		\brief The utility classes and functions for the halfedge based mesh.
47
 
101
 
48
		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
49
		halfedge based meshes.
103
		halfedge based meshes.
50
*/
104
*/
51
 
105
 
52
 
106
 
53
/** \namespace IMesh
107
/** \namespace IMesh
54
		\brief An indexed face set triangle mesh.
108
		\brief An indexed face set triangle mesh.
55
 
109
 
56
		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 
57
		mesh class for a mesh which is completely generic wrt attributes.
111
		mesh class for a mesh which is completely generic wrt attributes.
58
 
112
 
59
		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. */
60
 
114
 
61
/** \namespace IMeshUtil
115
/** \namespace IMeshUtil
62
		\brief Utilities for IMesh
116
		\brief Utilities for IMesh
63
 
117
 
64
		This namespace contains loaders and other utilities needed in conjunction
118
		This namespace contains loaders and other utilities needed in conjunction
65
		with IMesh. */
119
		with IMesh. */
66
 
120
 
67
/*!
121
/*!
68
	\namespace LinAlg
122
	\namespace LinAlg
69
	\brief The Linear Algebra Implementation/Module/Package. 
123
	\brief The Linear Algebra Implementation/Module/Package. 
70
 
124
 
71
  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 
72
  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 
73
  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 
74
  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 
75
  (CVec2 and CVec3) are included for improved performance. The more advanced 
129
  (CVec2 and CVec3) are included for improved performance. The more advanced 
76
  linear algebra functions are supplied by lincage to the LaPack package.
130
  linear algebra functions are supplied by lincage to the LaPack package.
77
 
131
 
78
  \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 
79
  been tested by making small functions utilizing the functions. The 
133
  been tested by making small functions utilizing the functions. The 
80
  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 
81
  their functional simplicity.
135
  their functional simplicity.
82
 
136
 
83
	A list of improvements in mind is:
137
	A list of improvements in mind is:
84
	- Lapack interface
138
	- Lapack interface
85
	- Vector and Matrix product and so on, with interface to _BLAS_
139
	- Vector and Matrix product and so on, with interface to _BLAS_
86
	- iterator thing
140
	- iterator thing
87
	- Memory leak check ? inline ?
141
	- Memory leak check ? inline ?
88
	- Element functor
142
	- Element functor
89
	- Identity matrixs
143
	- Identity matrixs
90
	- Compile and utilize the newer versions of the Lapack routines.
144
	- Compile and utilize the newer versions of the Lapack routines.
91
	- Have a nameing convention section in the documentaion
145
	- Have a nameing convention section in the documentaion
92
	- Integrate the design into the documentation
146
	- Integrate the design into the documentation
93
	- 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].
94
	- Have 3x3, 3x4 4x1 and 4x4 specialities.
148
	- Have 3x3, 3x4 4x1 and 4x4 specialities.
95
	- Look at casting e.g. vec2i=vec2l.
149
	- Look at casting e.g. vec2i=vec2l.
96
	- Error handling in From/To matrix
150
	- Error handling in From/To matrix
97
	- Has error handling in Lapack been made ?
151
	- Has error handling in Lapack been made ?
98
 
152
 
99
	\author Henrik Aanæs
153
	\author Henrik Aanæs
100
	\version Aug 2001
154
	\version Aug 2001
101
*/
155
*/
102
 
156
 
103
/** \namespace Util
157
/** \namespace Util
104
		\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.
105
 
159
 
106
*/
160
*/
107
 
161
 
108
 
162