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.4.1
Name Modified Size InfoDownloads / Week
Parent folder
readme.txt 2011-09-28 2.7 kB
mymath.7z 2011-09-28 14.1 kB
example-opengl-sphere-worlds.7z 2011-09-28 166.0 kB
Totals: 3 Items   182.8 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 COLUMN-MAJOR order (compatible with OpenGL) see: http://en.wikipedia.org/wiki/Column-major_order#Column-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 COLUMN-MAJOR vectors
 -the “get_angle_bw_2_vec3f” requires the input vectors to be unit length (normalized), you can make them unit length with the “normalize_vec3f” function
 -most of the functions require angle input in radians for conversion use mymath_main::deg_to_rad()

You can find some examples in the “main.cpp” file.
You can also find an example borrowed form OpenGL Suberbible 5th edition, in which it is shown how you can you it in your OpenGL project.

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 pipeline)
     #linking against the mymath library
     target_link_libraries(project_name ${libmymath})
	
How do I unrar/unzip/decompress the files?
 -you can do it easily by using a free compressing tool called "7z" (http://www.7-zip.org/)
Source: readme.txt, updated 2011-09-28