inlined functions for avoid multiple linking errors

This commit is contained in:
Paolo Cignoni 2004-04-07 10:47:03 +00:00
parent 7ea2f49da5
commit 30227aff07
1 changed files with 9 additions and 7 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.1 2004/03/31 15:27:17 ponchio
*** empty log message ***
****************************************************************************/ ****************************************************************************/
@ -37,15 +40,15 @@ $Log: not supported by cvs2svn $
namespace vcg { namespace vcg {
void glMultMatrix(const Matrix44f &matrix) { inline void glMultMatrix(const Matrix44f &matrix) {
glMultMatrixf((const GLfloat *)&(matrix[0])); glMultMatrixf((const GLfloat *)(matrix[0]));
} }
void glMultMatrix(const Matrix44d &matrix) { inline void glMultMatrix(const Matrix44d &matrix) {
glMultMatrixd((const GLdouble *)&(matrix[0])); glMultMatrixd((const GLdouble *)(matrix[0]));
} }
void glMultMatrix(const Similarityf &s) { inline void glMultMatrix(const Similarityf &s) {
glTranslatef(s.tra[0], s.tra[1], s.tra[2]); glTranslatef(s.tra[0], s.tra[1], s.tra[2]);
glScalef(s.sca, s.sca, s.sca); glScalef(s.sca, s.sca, s.sca);
float alpha; float alpha;
@ -55,14 +58,13 @@ void glMultMatrix(const Similarityf &s) {
} }
void glMultMatrix(const Similarityd &s) { inline void glMultMatrix(const Similarityd &s) {
glTranslated(s.tra[0], s.tra[1], s.tra[2]); glTranslated(s.tra[0], s.tra[1], s.tra[2]);
double alpha; double alpha;
Point3d axis; Point3d axis;
s.rot.ToAxis(alpha, axis); s.rot.ToAxis(alpha, axis);
glRotated(math::ToDeg(alpha), axis[0], axis[1], axis[2]); glRotated(math::ToDeg(alpha), axis[0], axis[1], axis[2]);
glScaled(s.sca, s.sca, s.sca); glScaled(s.sca, s.sca, s.sca);
} }
}//namespace }//namespace