2011-02-18 13:58:08 +00:00
|
|
|
/*
|
2009-11-09 22:42:41 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-09 22:42:41 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
2021-01-20 15:15:38 +11:00
|
|
|
*/
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
* \ingroup bli
|
2009-11-09 22:42:41 +00:00
|
|
|
*
|
2018-11-14 12:53:15 +11:00
|
|
|
* \section mathabbrev Abbreviations
|
|
|
|
*
|
2021-07-20 22:52:31 +10:00
|
|
|
* - `fl` = float
|
|
|
|
* - `db` = double
|
|
|
|
* - `v2` = vec2 = vector 2
|
|
|
|
* - `v3` = vec3 = vector 3
|
|
|
|
* - `v4` = vec4 = vector 4
|
|
|
|
* - `vn` = vec4 = vector N dimensions, *passed as an arg, after the vector*.
|
|
|
|
* - `qt` = quat = quaternion
|
|
|
|
* - `dq` = dquat = dual quaternion
|
|
|
|
* - `m2` = mat2 = matrix 2x2
|
|
|
|
* - `m3` = mat3 = matrix 3x3
|
|
|
|
* - `m4` = mat4 = matrix 4x4
|
|
|
|
* - `eul` = euler rotation
|
|
|
|
* - `eulO` = euler with order
|
|
|
|
* - `plane` = plane 4, (vec3, distance)
|
|
|
|
* - `plane3` = plane 3 (same as a `plane` with a zero 4th component)
|
2015-05-22 18:38:13 +10:00
|
|
|
*
|
|
|
|
* \subsection mathabbrev_all Function Type Abbreviations
|
|
|
|
*
|
|
|
|
* For non float versions of functions (which typically operate on floats),
|
|
|
|
* use single suffix abbreviations.
|
|
|
|
*
|
2021-07-20 22:52:31 +10:00
|
|
|
* - `_d` = double
|
|
|
|
* - `_i` = int
|
|
|
|
* - `_u` = unsigned int
|
|
|
|
* - `_char` = char
|
|
|
|
* - `_uchar` = unsigned char
|
2009-11-09 22:42:41 +00:00
|
|
|
*
|
2018-11-14 12:53:15 +11:00
|
|
|
* \section mathvarnames Variable Names
|
2009-11-09 22:42:41 +00:00
|
|
|
*
|
2018-11-14 12:53:15 +11:00
|
|
|
* - f = single value
|
|
|
|
* - a, b, c = vectors
|
|
|
|
* - r = result vector
|
|
|
|
* - A, B, C = matrices
|
|
|
|
* - R = result matrix
|
2009-11-09 22:42:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "BLI_math_base.h"
|
|
|
|
#include "BLI_math_color.h"
|
2010-04-15 10:28:32 +00:00
|
|
|
#include "BLI_math_geom.h"
|
2012-11-10 19:11:25 +00:00
|
|
|
#include "BLI_math_interp.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BLI_math_matrix.h"
|
|
|
|
#include "BLI_math_rotation.h"
|
2015-07-13 17:48:13 +02:00
|
|
|
#include "BLI_math_solvers.h"
|
2015-07-13 17:53:22 +02:00
|
|
|
#include "BLI_math_statistics.h"
|
2021-06-22 17:00:18 +02:00
|
|
|
#include "BLI_math_time.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BLI_math_vector.h"
|