Download Latest Version mymath.7z (13.6 kB)
Email in envelope

Get an email when there's a new version of libmymath

Home / libmymath v1.1.1
Name Modified Size InfoDownloads / Week
Parent folder
vec4f.h 2011-03-27 1.0 kB
vec3f.h 2011-03-27 1.0 kB
vec4f.cpp 2011-03-27 2.1 kB
vec2f.cpp 2011-03-27 1.7 kB
vec2f.h 2011-03-27 974 Bytes
vec3f.cpp 2011-03-27 1.9 kB
mymath_main.h 2011-03-27 2.8 kB
readme.txt 2011-03-27 2.3 kB
mymath_main.cpp 2011-03-27 19.5 kB
matrix_stack.cpp 2011-03-27 4.1 kB
matrix_stack.h 2011-03-27 940 Bytes
m4x4.cpp 2011-03-27 8.2 kB
m4x4.h 2011-03-27 1.1 kB
main.cpp 2011-03-27 1.9 kB
m3x3.cpp 2011-03-27 3.6 kB
m3x3.h 2011-03-27 929 Bytes
Legal notes.txt 2011-03-27 1.5 kB
Licence.txt 2011-03-27 439 Bytes
Changelog.txt 2011-03-27 1.7 kB
CMakeLists.txt 2011-03-27 963 Bytes
camera.h 2011-03-27 1.8 kB
camera.cpp 2011-03-27 10.8 kB
Totals: 22 Items   71.2 kB 0
--- Readme of mymath library ---

Welcome!

Let me introduce the mymath library. 
Mymath is a 3d maths library created with the intention to modernize 3d maths libraries, and meanwhile preserve simplicity and flexibility. 
Mymath is written in C++, it uses a modern object-oriented approach. 
It includes a camera class, which you can use for camera handling. 
It also includes a matrix stack class, which you can use as a replacement for the OpenGL functions. 
Mymath contains 2, 3, and 4 component vector classes and many functions using these classes. Mymath also contains 3x3 and 4x4 matrix classes. 
Mymath is based on the math3d library and contains similar functions. However these functions are modernized, and even some new functions are included.

Some important things to mention:
 -matrices are stored in row-major order see: http://en.wikipedia.org/wiki/Row-major_order
 -you can access matrices by using the “[]” operator (with value 0-8, and 0-15), and also by using the “get_2d_m3x3” function (and there is also a 4x4 version), 
  with which you can access matrices in a 2 dimensional manner
 -vectors are generally treated as row vectors, however in some cases they might be used as column ones
 -the “get_angle_bw_2_vec3f” requires the input vectors to be unit length, you can make them unit length with the “normalize_vec3f” function

You can find some examples in the “main.cpp” file.

How can I link this library to my project?
 -Well in cmake all you have to do is:
  1. build the mymath library using the CMakeLists.txt provided
  2. copy the header files to [your project's source dir]/mymath/include, and the .dll/.so files to [your project's source dir]/mymath/lib
  3. put the following lines in your project's CMakeLists.txt at the beginning (after specifying the project's name)
	 #including the header files
     include_directories(${CMAKE_SOURCE_DIR}/mymath/include/)
     #linking in the .dll/.so files
     link_directories(${CMAKE_SOURCE_DIR}/mymath/lib/)
  4. put the following lines to the end of your project's CMakeLists.txt
	 #getting the mymath library
     set(libmymath mymath_main m3x3 m4x4 vec2f vec3f vec4f camera matrix_stack)
     #linking against the mymath library
     target_link_libraries(proba2 ${libmymath})
Source: readme.txt, updated 2011-03-27