- Timestamp:
- Nov 21, 2005, 4:02:23 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/Makefile.am
r5634 r5673 17 17 shell/libORXshell.a 18 18 19 #libORXlibs_a_LIBDADD = 19 #libORXlibs_a_LIBDADD = gui/gtk_gui/libORXgui.a \ 20 20 gui/gl_gui/libORXglgui.a \ 21 21 graphics/importer/libORXimporter.a \ … … 42 42 util/executor/executor.cc \ 43 43 math/vector.cc \ 44 math/matrix.cc \ 44 45 math/curve.cc 45 46 … … 59 60 util/multi_type.h \ 60 61 util/executor/executor.h \ 62 math/matrix.h \ 61 63 math/vector.h \ 62 64 math/curve.h -
trunk/src/lib/Makefile.in
r5672 r5673 58 58 ini_parser.$(OBJEXT) substring.$(OBJEXT) color.$(OBJEXT) \ 59 59 helper_functions.$(OBJEXT) multi_type.$(OBJEXT) \ 60 executor.$(OBJEXT) vector.$(OBJEXT) curve.$(OBJEXT) 60 executor.$(OBJEXT) vector.$(OBJEXT) matrix.$(OBJEXT) \ 61 curve.$(OBJEXT) 61 62 libORXlibs_a_OBJECTS = $(am_libORXlibs_a_OBJECTS) 62 63 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) … … 215 216 # shell/libORXshell.a 216 217 217 #libORXlibs_a_LIBDADD = 218 #libORXlibs_a_LIBDADD = gui/gtk_gui/libORXgui.a \ 218 219 # gui/gl_gui/libORXglgui.a \ 219 220 # graphics/importer/libORXimporter.a \ … … 239 240 util/executor/executor.cc \ 240 241 math/vector.cc \ 242 math/matrix.cc \ 241 243 math/curve.cc 242 244 … … 256 258 util/multi_type.h \ 257 259 util/executor/executor.h \ 260 math/matrix.h \ 258 261 math/vector.h \ 259 262 math/curve.h … … 324 327 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper_functions.Po@am__quote@ 325 328 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_parser.Po@am__quote@ 329 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Po@am__quote@ 326 330 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_type.Po@am__quote@ 327 331 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@ … … 521 525 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 522 526 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.obj `if test -f 'math/vector.cc'; then $(CYGPATH_W) 'math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/math/vector.cc'; fi` 527 528 matrix.o: math/matrix.cc 529 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matrix.o -MD -MP -MF "$(DEPDIR)/matrix.Tpo" -c -o matrix.o `test -f 'math/matrix.cc' || echo '$(srcdir)/'`math/matrix.cc; \ 530 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/matrix.Tpo" "$(DEPDIR)/matrix.Po"; else rm -f "$(DEPDIR)/matrix.Tpo"; exit 1; fi 531 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='math/matrix.cc' object='matrix.o' libtool=no @AMDEPBACKSLASH@ 532 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 533 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matrix.o `test -f 'math/matrix.cc' || echo '$(srcdir)/'`math/matrix.cc 534 535 matrix.obj: math/matrix.cc 536 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matrix.obj -MD -MP -MF "$(DEPDIR)/matrix.Tpo" -c -o matrix.obj `if test -f 'math/matrix.cc'; then $(CYGPATH_W) 'math/matrix.cc'; else $(CYGPATH_W) '$(srcdir)/math/matrix.cc'; fi`; \ 537 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/matrix.Tpo" "$(DEPDIR)/matrix.Po"; else rm -f "$(DEPDIR)/matrix.Tpo"; exit 1; fi 538 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='math/matrix.cc' object='matrix.obj' libtool=no @AMDEPBACKSLASH@ 539 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 540 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matrix.obj `if test -f 'math/matrix.cc'; then $(CYGPATH_W) 'math/matrix.cc'; else $(CYGPATH_W) '$(srcdir)/math/matrix.cc'; fi` 523 541 524 542 curve.o: math/curve.cc -
trunk/src/lib/math/matrix.cc
r5670 r5673 1 /* 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific: 12 main-programmer: Benjamin Grauer 13 co-programmer: Patrick Boenzli 14 */ 15 #include "matrix.h" 1 16 2 17 #include <stdio.h> 3 18 #include <math.h> 4 #include "matrix.h"5 19 6 20 -
trunk/src/lib/math/matrix.h
r5668 r5673 1 /*! 2 * @file matrix.h 3 * @brief Definition of a 3x3 matrix. 4 */ 5 1 6 #include <math.h> 2 3 /// @todo TAKE THIS OUT 4 class Vector 5 { 6 public: 7 Vector() {this->x = this->y = this->z = 0; }; 8 Vector (float x, float y, float z) { this->x=x; this->y = y; this->z = z; }; 9 inline const Vector& operator/= (float f) {if ((f == 0.0)) {this->x=0;this->y=0;this->z=0;} else {this->x /= f; this->y /= f; this->z /= f;} return *this; }; 10 11 float x, y, z; 12 inline Vector cross (const Vector& v) const { return Vector(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); } 13 inline float len() const { return sqrt (x*x+y*y+z*z); } 14 }; 15 7 #include "vector.h" 16 8 17 9
Note: See TracChangeset
for help on using the changeset viewer.