mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
tweak root/Mainpage.dox to make it compatible with kde's doxygen.sh script
plus some hacks to compile the examples from doxygen... Hopefully, api.kde.org/eigen2 will be beautiful by tomorrow....
This commit is contained in:
@@ -768,8 +768,7 @@ HTML_FILE_EXTENSION = .html
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard header.
|
||||
|
||||
# ${CMAKE_BINARY_DIR}/doc/eigendoxy_header.html
|
||||
HTML_HEADER =
|
||||
HTML_HEADER = ${CMAKE_BINARY_DIR}/doc/eigendoxy_header.html
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
@@ -777,7 +776,7 @@ HTML_HEADER =
|
||||
|
||||
# the footer has not been customized yet, so let's use the default one
|
||||
# ${CMAKE_BINARY_DIR}/doc/eigendoxy_footer.html
|
||||
HTML_FOOTER =
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
@@ -786,8 +785,7 @@ HTML_FOOTER =
|
||||
# the style sheet file to the HTML output directory, so don't put your own
|
||||
# stylesheet in the HTML output directory as well, or it will be erased!
|
||||
|
||||
# ${CMAKE_SOURCE_DIR}/doc/eigendoxy.css
|
||||
HTML_STYLESHEET =
|
||||
HTML_STYLESHEET = ${CMAKE_SOURCE_DIR}/doc/eigendoxy.css
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
|
||||
@@ -590,8 +590,14 @@ Vector3f v1, v2;
|
||||
v2 = t.linear() * v1;\endcode</td><td>\code
|
||||
Vector2f v1, v2;
|
||||
v2 = t.linear() * v1;\endcode</td></tr>
|
||||
<tr><td>Concatenate two transformations</td><td>\code
|
||||
t3 = t1 * t2;\endcode</td><td>\code
|
||||
<tr><td>Apply a \em general transformation \n to a \b normal \b vector
|
||||
(<a href="http://www.cgafaq.info/wiki/Transforming_normals">explanations</a>)</td><td colspan="2">\code
|
||||
Matrix{3,2}f normalMatrix = t.linear().inverse().transpose();
|
||||
n2 = (normalMatrix * n1).normalize();\endcode</td></tr>
|
||||
<tr><td>Apply a transformation with \em pure \em rotation \n to a \b normal \b vector
|
||||
(no scaling, no shear)</td><td colspan="2">\code
|
||||
n2 = t.linear() * n1;\endcode</td></tr>
|
||||
<tr><td>Concatenate two transformations</td><td colspan="2">\code
|
||||
t3 = t1 * t2;\endcode</td></tr>
|
||||
<tr><td>OpenGL compatibility</td><td>\code
|
||||
glLoadMatrixf(t.data());\endcode</td><td>\code
|
||||
@@ -634,9 +640,9 @@ t.scale(Vector3f(sx, sy, sz));
|
||||
t.scale(Vector3f::Constant(s));
|
||||
t.prescale(Vector3f(sx, sy, sz));
|
||||
\endcode</td><td>\code
|
||||
t.scale(Vector2f(tx, ty));
|
||||
t.scale(Vector2f(sx, sy));
|
||||
t.scale(Vector2f::Constant(s));
|
||||
t.prescale(Vector2f(tx, ty));
|
||||
t.prescale(Vector2f(sx, sy));
|
||||
\endcode</td></tr>
|
||||
<tr><td>Applies a shear transformation \n(2D only)</td><td></td><td>\code
|
||||
t.shear(sx,sy);
|
||||
|
||||
44
doc/apidox_preprocessing.sh
Executable file
44
doc/apidox_preprocessing.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
CXX=`which g++`
|
||||
SRC=$1
|
||||
mkdir -p eigen2/out
|
||||
|
||||
if expr match $SRC ".*\/examples\/.*" > /dev/null ; then
|
||||
|
||||
# DST=`echo $SRC | sed 's/examples/out/' | sed 's/cpp$/out/'`
|
||||
DST=`echo $SRC | sed 's/.*\/examples/eigen2\/out/' | sed 's/cpp$/out/'`
|
||||
INC=`echo $SRC | sed 's/\/doc\/examples\/.*/\//'`
|
||||
|
||||
if ! test -e $DST || test $SRC -nt $DST ; then
|
||||
$CXX $SRC -I. -I$INC -o eitmp_example && ./eitmp_example > $DST
|
||||
rm eitmp_example
|
||||
fi
|
||||
|
||||
elif expr match $SRC ".*\/snippets\/.*" > /dev/null ; then
|
||||
|
||||
# DST=`echo $SRC | sed 's/snippets/out/' | sed 's/cpp$/out/'`
|
||||
DST=`echo $SRC | sed 's/.*\/snippets/eigen2\/out/' | sed 's/cpp$/out/'`
|
||||
INC=`echo $SRC | sed 's/\/doc\/snippets\/.*/\//'`
|
||||
|
||||
if ! test -e $DST || test $SRC -nt $DST ; then
|
||||
echo "#include <Eigen/Core>" > .ei_in.cpp
|
||||
echo "#include <Eigen/Array>" >> .ei_in.cpp
|
||||
echo "#include <Eigen/LU>" >> .ei_in.cpp
|
||||
echo "#include <Eigen/Cholesky>" >> .ei_in.cpp
|
||||
echo "#include <Eigen/Geometry>" >> .ei_in.cpp
|
||||
echo "using namespace Eigen; using namespace std;" >> .ei_in.cpp
|
||||
echo "int main(int, char**){cout.precision(3);" >> .ei_in.cpp
|
||||
cat $SRC >> .ei_in.cpp
|
||||
echo "return 0;}" >> .ei_in.cpp
|
||||
echo " " >> .ei_in.cpp
|
||||
|
||||
$CXX .ei_in.cpp -I. -I$INC -o eitmp_example && ./eitmp_example > $DST
|
||||
rm eitmp_example
|
||||
rm .ei_in.cpp
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
cat $SRC
|
||||
exit 0
|
||||
@@ -1,3 +1,3 @@
|
||||
Matrix3d m = Matrix3d::Random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here is the square norm of each row:" << endl << m.rowwise().norm2() << endl;
|
||||
cout << "Here is the square norm of each row:" << endl << m.rowwise().norm2() << endl;
|
||||
|
||||
Reference in New Issue
Block a user