2011-02-18 13:58:08 +00:00
|
|
|
/*
|
2009-11-09 22:42:41 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
|
|
|
|
* The Original Code is: some of this file.
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
* */
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __BLI_MATH_MATRIX_H__
|
|
|
|
#define __BLI_MATH_MATRIX_H__
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2011-02-18 13:58:08 +00:00
|
|
|
/** \file BLI_math_matrix.h
|
|
|
|
* \ingroup bli
|
|
|
|
*/
|
|
|
|
|
2009-11-09 22:42:41 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-07-20 14:01:42 +10:00
|
|
|
#include "BLI_compiler_attrs.h"
|
|
|
|
|
2009-11-09 22:42:41 +00:00
|
|
|
/********************************* Init **************************************/
|
|
|
|
|
2014-09-06 11:19:34 +10:00
|
|
|
void zero_m2(float R[2][2]);
|
2009-11-10 19:13:05 +00:00
|
|
|
void zero_m3(float R[3][3]);
|
|
|
|
void zero_m4(float R[4][4]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2014-09-06 11:19:34 +10:00
|
|
|
void unit_m2(float R[2][2]);
|
2009-11-09 22:42:41 +00:00
|
|
|
void unit_m3(float R[3][3]);
|
|
|
|
void unit_m4(float R[4][4]);
|
|
|
|
|
2014-09-06 11:19:34 +10:00
|
|
|
void copy_m2_m2(float R[2][2], float A[2][2]);
|
2009-11-09 22:42:41 +00:00
|
|
|
void copy_m3_m3(float R[3][3], float A[3][3]);
|
|
|
|
void copy_m4_m4(float R[4][4], float A[4][4]);
|
|
|
|
void copy_m3_m4(float R[3][3], float A[4][4]);
|
|
|
|
void copy_m4_m3(float R[4][4], float A[3][3]);
|
|
|
|
|
2013-10-20 12:08:51 +00:00
|
|
|
/* double->float */
|
2013-10-25 22:12:05 +00:00
|
|
|
void copy_m3_m3d(float R[3][3], double A[3][3]);
|
2013-10-20 12:08:51 +00:00
|
|
|
|
2009-11-09 22:42:41 +00:00
|
|
|
void swap_m3m3(float A[3][3], float B[3][3]);
|
|
|
|
void swap_m4m4(float A[4][4], float B[4][4]);
|
|
|
|
|
|
|
|
/******************************** Arithmetic *********************************/
|
|
|
|
|
|
|
|
void add_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]);
|
|
|
|
void add_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]);
|
2011-09-05 21:01:50 +00:00
|
|
|
|
|
|
|
void sub_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]);
|
|
|
|
void sub_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
|
|
|
void mul_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]);
|
|
|
|
void mul_m4_m3m4(float R[4][4], float A[3][3], float B[4][4]);
|
|
|
|
void mul_m4_m4m3(float R[4][4], float A[4][4], float B[3][3]);
|
2013-05-26 18:36:25 +00:00
|
|
|
void mul_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]);
|
|
|
|
void mul_m3_m3m4(float R[3][3], float A[4][4], float B[3][3]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2014-07-21 18:55:12 +10:00
|
|
|
/* mul_m3_series */
|
|
|
|
void _va_mul_m3_series_3(float R[3][3], float M1[3][3], float M2[3][3]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m3_series_4(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m3_series_5(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m3_series_6(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
|
|
|
|
float M5[3][3]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m3_series_7(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
|
|
|
|
float M5[3][3], float M6[3][3]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m3_series_8(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
|
|
|
|
float M5[3][3], float M6[3][3], float M7[3][3]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m3_series_9(float R[3][3], float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
|
|
|
|
float M5[3][3], float M6[3][3], float M7[3][3], float M8[3][3]) ATTR_NONNULL();
|
|
|
|
/* mul_m4_series */
|
|
|
|
void _va_mul_m4_series_3(float R[4][4], float M1[4][4], float M2[4][4]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m4_series_4(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m4_series_5(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m4_series_6(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
|
2014-07-20 14:01:42 +10:00
|
|
|
float M5[4][4]) ATTR_NONNULL();
|
2014-07-21 18:55:12 +10:00
|
|
|
void _va_mul_m4_series_7(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
|
|
|
|
float M5[4][4], float M6[4][4]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m4_series_8(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
|
|
|
|
float M5[4][4], float M6[4][4], float M7[4][4]) ATTR_NONNULL();
|
|
|
|
void _va_mul_m4_series_9(float R[4][4], float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
|
|
|
|
float M5[4][4], float M6[4][4], float M7[4][4], float M8[4][4]) ATTR_NONNULL();
|
|
|
|
|
|
|
|
#define mul_m3_series(...) VA_NARGS_CALL_OVERLOAD(_va_mul_m3_series_, __VA_ARGS__)
|
|
|
|
#define mul_m4_series(...) VA_NARGS_CALL_OVERLOAD(_va_mul_m4_series_, __VA_ARGS__)
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2009-11-10 19:13:05 +00:00
|
|
|
void mul_m4_v3(float M[4][4], float r[3]);
|
2011-09-12 13:00:24 +00:00
|
|
|
void mul_v3_m4v3(float r[3], float M[4][4], const float v[3]);
|
2013-05-08 12:55:36 +00:00
|
|
|
void mul_v2_m4v3(float r[2], float M[4][4], const float v[3]);
|
2013-02-11 22:52:13 +00:00
|
|
|
void mul_v2_m2v2(float r[2], float M[2][2], const float v[2]);
|
2014-01-05 22:12:21 +11:00
|
|
|
void mul_m2v2(float M[2][2], float v[2]);
|
2009-11-10 19:13:05 +00:00
|
|
|
void mul_mat3_m4_v3(float M[4][4], float r[3]);
|
2015-04-27 21:50:38 +10:00
|
|
|
void mul_v3_mat3_m4v3(float r[3], float M[4][4], const float v[3]);
|
2010-04-15 10:28:32 +00:00
|
|
|
void mul_m4_v4(float M[4][4], float r[4]);
|
2013-02-09 07:14:42 +00:00
|
|
|
void mul_v4_m4v4(float r[4], float M[4][4], const float v[4]);
|
2011-05-20 10:09:03 +00:00
|
|
|
void mul_project_m4_v3(float M[4][4], float vec[3]);
|
2014-09-16 15:41:17 +10:00
|
|
|
void mul_v3_project_m4_v3(float r[3], float mat[4][4], const float vec[3]);
|
2013-05-08 12:55:36 +00:00
|
|
|
void mul_v2_project_m4_v3(float r[2], float M[4][4], const float vec[3]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2013-09-11 10:06:54 +00:00
|
|
|
void mul_m3_v2(float m[3][3], float r[2]);
|
|
|
|
void mul_v2_m3v2(float r[2], float m[3][3], float v[2]);
|
2009-11-10 19:13:05 +00:00
|
|
|
void mul_m3_v3(float M[3][3], float r[3]);
|
2013-02-09 07:14:42 +00:00
|
|
|
void mul_v3_m3v3(float r[3], float M[3][3], const float a[3]);
|
|
|
|
void mul_v2_m3v3(float r[2], float M[3][3], const float a[3]);
|
2009-11-10 19:13:05 +00:00
|
|
|
void mul_transposed_m3_v3(float M[3][3], float r[3]);
|
2013-04-17 23:30:19 +00:00
|
|
|
void mul_transposed_mat3_m4_v3(float M[4][4], float r[3]);
|
2009-11-09 22:42:41 +00:00
|
|
|
void mul_m3_v3_double(float M[3][3], double r[3]);
|
|
|
|
|
2009-11-10 19:13:05 +00:00
|
|
|
void mul_m3_fl(float R[3][3], float f);
|
|
|
|
void mul_m4_fl(float R[4][4], float f);
|
|
|
|
void mul_mat3_m4_fl(float R[4][4], float f);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2014-10-30 10:26:22 +01:00
|
|
|
void negate_m3(float R[3][3]);
|
2014-10-30 15:26:41 +01:00
|
|
|
void negate_mat3_m4(float R[4][4]);
|
2014-05-30 00:26:05 +10:00
|
|
|
void negate_m4(float R[4][4]);
|
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
bool invert_m3_ex(float m[3][3], const float epsilon);
|
|
|
|
bool invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon);
|
2012-11-07 09:28:59 +00:00
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
bool invert_m3(float R[3][3]);
|
|
|
|
bool invert_m3_m3(float R[3][3], float A[3][3]);
|
|
|
|
bool invert_m4(float R[4][4]);
|
|
|
|
bool invert_m4_m4(float R[4][4], float A[4][4]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2016-06-14 16:43:14 +10:00
|
|
|
/* double arithmetic (mixed float/double) */
|
2012-03-08 11:57:51 +00:00
|
|
|
void mul_m4_v4d(float M[4][4], double r[4]);
|
|
|
|
void mul_v4d_m4v4d(double r[4], float M[4][4], double v[4]);
|
|
|
|
|
2016-06-14 16:43:14 +10:00
|
|
|
/* double matrix functions (no mixing types) */
|
|
|
|
void mul_v3_m3v3_db(double r[3], double M[3][3], const double a[3]);
|
|
|
|
void mul_m3_v3_db(double M[3][3], double r[3]);
|
|
|
|
|
2012-03-08 11:57:51 +00:00
|
|
|
|
2009-11-09 22:42:41 +00:00
|
|
|
/****************************** Linear Algebra *******************************/
|
|
|
|
|
|
|
|
void transpose_m3(float R[3][3]);
|
2014-10-30 12:13:00 +01:00
|
|
|
void transpose_m3_m3(float R[3][3], float A[3][3]);
|
|
|
|
void transpose_m3_m4(float R[3][3], float A[4][4]);
|
2009-11-09 22:42:41 +00:00
|
|
|
void transpose_m4(float R[4][4]);
|
2014-10-30 12:13:00 +01:00
|
|
|
void transpose_m4_m4(float R[4][4], float A[4][4]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
Blender Internal Render in viewport
Because of our release soon, feature has been added behind the Debug Menu.
CTRL+ALT+D and set it to -1. Or commandline --debug-value -1.
When debug set to -1, you can put the viewport to 'render' mode, just like
for Cycles. Notes for testers: (and please no bugs in tracker for this :)
- It renders without AA, MBlur, Panorama, Sequence, Composite
- Only active render layer gets rendered. Select another layer will re-render.
- But yes: it works for FreeStyle renders!
- Also does great for local view.
- BI is not well suited for incremental renders on view changes. This only
works for non-raytrace scenes, or zoom in ortho or camera mode, or for
Material changes. In most cases a full re-render is being done.
- ESC works to stop the preview render.
- Borders render as well. (CTRL+B)
- Force a refresh with arrow key left/right. A lot of settings don't trigger
re-render yet.
Tech notes:
- FreeStyle is adding a lot of temp objects/meshes in the Main database. This
caused DepsGraph to trigger changes (and redraws). I've prepended the names
for these temp objects with char number 27 (ESC), and made these names be
ignored for tag update checking.
- Fixed some bugs that were noticable with such excessive re-renders, like
for opening file window, quit during renders.
2013-04-16 17:39:20 +00:00
|
|
|
int compare_m4m4(float mat1[4][4], float mat2[4][4], float limit);
|
|
|
|
|
2015-10-15 21:03:27 +11:00
|
|
|
void normalize_m3_ex(float R[3][3], float r_scale[3]) ATTR_NONNULL();
|
|
|
|
void normalize_m3(float R[3][3]) ATTR_NONNULL();
|
|
|
|
void normalize_m3_m3_ex(float R[3][3], float A[3][3], float r_scale[3]) ATTR_NONNULL();
|
|
|
|
void normalize_m3_m3(float R[3][3], float A[3][3]) ATTR_NONNULL();
|
|
|
|
void normalize_m4_ex(float R[4][4], float r_scale[3]) ATTR_NONNULL();
|
|
|
|
void normalize_m4(float R[4][4]) ATTR_NONNULL();
|
|
|
|
void normalize_m4_m4_ex(float R[4][4], float A[4][4], float r_scale[3]) ATTR_NONNULL();
|
|
|
|
void normalize_m4_m4(float R[4][4], float A[4][4]) ATTR_NONNULL();
|
2009-11-09 22:42:41 +00:00
|
|
|
|
|
|
|
void orthogonalize_m3(float R[3][3], int axis);
|
|
|
|
void orthogonalize_m4(float R[4][4], int axis);
|
|
|
|
|
2013-07-26 11:15:22 +00:00
|
|
|
bool is_orthogonal_m3(float mat[3][3]);
|
|
|
|
bool is_orthogonal_m4(float mat[4][4]);
|
|
|
|
bool is_orthonormal_m3(float mat[3][3]);
|
|
|
|
bool is_orthonormal_m4(float mat[4][4]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2013-07-26 11:15:22 +00:00
|
|
|
bool is_uniform_scaled_m3(float mat[3][3]);
|
2014-05-22 21:35:41 -03:00
|
|
|
bool is_uniform_scaled_m4(float m[4][4]);
|
2012-05-01 11:01:24 +00:00
|
|
|
|
2015-12-07 12:35:36 +01:00
|
|
|
/* Note: 'adjoint' here means the adjugate (adjunct, "classical adjoint") matrix!
|
|
|
|
* Nowadays 'adjoint' usually refers to the conjugate transpose,
|
|
|
|
* which for real-valued matrices is simply the transpose.
|
|
|
|
*/
|
2012-10-29 03:36:55 +00:00
|
|
|
void adjoint_m2_m2(float R[2][2], float A[2][2]);
|
2009-11-09 22:42:41 +00:00
|
|
|
void adjoint_m3_m3(float R[3][3], float A[3][3]);
|
|
|
|
void adjoint_m4_m4(float R[4][4], float A[4][4]);
|
|
|
|
|
2012-05-12 20:39:39 +00:00
|
|
|
float determinant_m2(float a, float b,
|
|
|
|
float c, float d);
|
|
|
|
float determinant_m3(float a, float b, float c,
|
|
|
|
float d, float e, float f,
|
|
|
|
float g, float h, float i);
|
2012-12-14 21:41:22 +00:00
|
|
|
float determinant_m3_array(float m[3][3]);
|
2009-11-09 22:42:41 +00:00
|
|
|
float determinant_m4(float A[4][4]);
|
|
|
|
|
2012-12-14 21:41:22 +00:00
|
|
|
#define PSEUDOINVERSE_EPSILON 1e-8f
|
|
|
|
|
2010-06-22 15:20:06 +00:00
|
|
|
void svd_m4(float U[4][4], float s[4], float V[4][4], float A[4][4]);
|
|
|
|
void pseudoinverse_m4_m4(float Ainv[4][4], float A[4][4], float epsilon);
|
2012-12-14 21:41:22 +00:00
|
|
|
void pseudoinverse_m3_m3(float Ainv[3][3], float A[3][3], float epsilon);
|
2010-06-22 15:20:06 +00:00
|
|
|
|
2013-10-18 23:38:51 +00:00
|
|
|
bool has_zero_axis_m4(float matrix[4][4]);
|
|
|
|
|
2014-03-25 16:05:28 +06:00
|
|
|
void invert_m4_m4_safe(float Ainv[4][4], float A[4][4]);
|
|
|
|
|
2009-11-09 22:42:41 +00:00
|
|
|
/****************************** Transformations ******************************/
|
|
|
|
|
|
|
|
void scale_m3_fl(float R[3][3], float scale);
|
|
|
|
void scale_m4_fl(float R[4][4], float scale);
|
|
|
|
|
|
|
|
float mat3_to_scale(float M[3][3]);
|
|
|
|
float mat4_to_scale(float M[4][4]);
|
|
|
|
|
2010-10-22 03:56:50 +00:00
|
|
|
void size_to_mat3(float R[3][3], const float size[3]);
|
|
|
|
void size_to_mat4(float R[4][4], const float size[3]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
|
|
|
void mat3_to_size(float r[3], float M[3][3]);
|
|
|
|
void mat4_to_size(float r[3], float M[4][4]);
|
|
|
|
|
|
|
|
void translate_m4(float mat[4][4], float tx, float ty, float tz);
|
2010-10-22 10:17:55 +00:00
|
|
|
void rotate_m4(float mat[4][4], const char axis, const float angle);
|
2013-02-11 22:52:13 +00:00
|
|
|
void rotate_m2(float mat[2][2], const float angle);
|
2013-07-30 10:58:36 +00:00
|
|
|
void transform_pivot_set_m4(float mat[4][4], const float pivot[3]);
|
2010-11-22 10:39:28 +00:00
|
|
|
|
2012-12-11 14:29:01 +00:00
|
|
|
void mat3_to_rot_size(float rot[3][3], float size[3], float mat3[3][3]);
|
|
|
|
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], float wmat[4][4]);
|
2013-01-23 05:56:05 +00:00
|
|
|
void mat4_to_loc_quat(float loc[3], float quat[4], float wmat[4][4]);
|
|
|
|
void mat4_decompose(float loc[3], float quat[4], float size[3], float wmat[4][4]);
|
2010-10-26 12:48:07 +00:00
|
|
|
|
2015-10-09 20:57:37 +02:00
|
|
|
void mat3_polar_decompose(float mat3[3][3], float r_U[3][3], float r_P[3][3]);
|
|
|
|
|
2009-11-09 22:42:41 +00:00
|
|
|
void loc_eul_size_to_mat4(float R[4][4],
|
2012-05-12 20:39:39 +00:00
|
|
|
const float loc[3], const float eul[3], const float size[3]);
|
2009-11-09 22:42:41 +00:00
|
|
|
void loc_eulO_size_to_mat4(float R[4][4],
|
2012-05-12 20:39:39 +00:00
|
|
|
const float loc[3], const float eul[3], const float size[3], const short order);
|
2009-11-09 22:42:41 +00:00
|
|
|
void loc_quat_size_to_mat4(float R[4][4],
|
2012-05-12 20:39:39 +00:00
|
|
|
const float loc[3], const float quat[4], const float size[3]);
|
2010-10-22 03:56:50 +00:00
|
|
|
void loc_axisangle_size_to_mat4(float R[4][4],
|
2012-05-12 20:39:39 +00:00
|
|
|
const float loc[3], const float axis[4], const float angle, const float size[3]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2010-11-22 10:39:28 +00:00
|
|
|
void blend_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], const float t);
|
|
|
|
void blend_m4_m4m4(float R[4][4], float A[4][4], float B[4][4], const float t);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2015-10-09 20:57:37 +02:00
|
|
|
void interp_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], const float t);
|
|
|
|
void interp_m4_m4m4(float R[4][4], float A[4][4], float B[4][4], const float t);
|
|
|
|
|
2013-07-26 11:15:22 +00:00
|
|
|
bool is_negative_m3(float mat[3][3]);
|
|
|
|
bool is_negative_m4(float mat[4][4]);
|
|
|
|
|
|
|
|
bool is_zero_m3(float mat[3][3]);
|
|
|
|
bool is_zero_m4(float mat[4][4]);
|
2010-01-30 13:15:39 +00:00
|
|
|
|
2016-05-12 12:07:31 +02:00
|
|
|
bool equals_m3m3(float mat1[3][3], float mat2[3][3]);
|
|
|
|
bool equals_m4m4(float mat1[4][4], float mat2[4][4]);
|
|
|
|
|
2014-08-01 16:28:31 +02:00
|
|
|
/* SpaceTransform helper */
|
|
|
|
typedef struct SpaceTransform {
|
|
|
|
float local2target[4][4];
|
|
|
|
float target2local[4][4];
|
|
|
|
|
|
|
|
} SpaceTransform;
|
|
|
|
|
|
|
|
void BLI_space_transform_from_matrices(struct SpaceTransform *data, float local[4][4], float target[4][4]);
|
2015-07-11 00:04:27 +02:00
|
|
|
void BLI_space_transform_global_from_matrices(struct SpaceTransform *data, float local[4][4], float target[4][4]);
|
2014-08-01 16:28:31 +02:00
|
|
|
void BLI_space_transform_apply(const struct SpaceTransform *data, float co[3]);
|
|
|
|
void BLI_space_transform_invert(const struct SpaceTransform *data, float co[3]);
|
|
|
|
void BLI_space_transform_apply_normal(const struct SpaceTransform *data, float no[3]);
|
|
|
|
void BLI_space_transform_invert_normal(const struct SpaceTransform *data, float no[3]);
|
|
|
|
|
|
|
|
#define BLI_SPACE_TRANSFORM_SETUP(data, local, target) \
|
|
|
|
BLI_space_transform_from_matrices((data), (local)->obmat, (target)->obmat)
|
|
|
|
|
2009-11-09 22:42:41 +00:00
|
|
|
/*********************************** Other ***********************************/
|
|
|
|
|
2011-01-06 13:49:09 +00:00
|
|
|
void print_m3(const char *str, float M[3][3]);
|
2016-06-24 03:15:55 +12:00
|
|
|
void print_m4(const char *str, float M[4][4]);
|
2009-11-09 22:42:41 +00:00
|
|
|
|
2014-03-30 13:03:30 +11:00
|
|
|
#define print_m3_id(M) print_m3(STRINGIFY(M), M)
|
|
|
|
#define print_m4_id(M) print_m4(STRINGIFY(M), M)
|
|
|
|
|
2009-11-09 22:42:41 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __BLI_MATH_MATRIX_H__ */
|
2009-11-09 22:42:41 +00:00
|
|
|
|