Blender  V3.3
matrix.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2018 Blender Foundation. All rights reserved. */
3 
8 #ifndef __EIGEN3_MATRIX_C_API_CC__
9 #define __EIGEN3_MATRIX_C_API_CC__
10 
11 /* Eigen gives annoying huge amount of warnings here, silence them! */
12 #if defined(__GNUC__) && !defined(__clang__)
13 # pragma GCC diagnostic ignored "-Wlogical-op"
14 #endif
15 
16 #ifdef __EIGEN3_MATRIX_C_API_CC__ /* quiet warning */
17 #endif
18 
19 #include <Eigen/Core>
20 #include <Eigen/Dense>
21 
22 #include "matrix.h"
23 
24 using Eigen::Map;
25 using Eigen::Matrix4f;
26 
27 bool EIG_invert_m4_m4(float inverse[4][4], const float matrix[4][4])
28 {
29  Map<Matrix4f> M = Map<Matrix4f>((float *)matrix);
30  Matrix4f R;
31  bool invertible = true;
32  M.computeInverseWithCheck(R, invertible, 0.0f);
33  if (!invertible) {
34  R = R.Zero();
35  }
36  memcpy(inverse, R.data(), sizeof(float) * 4 * 4);
37  return invertible;
38 }
39 
40 #endif /* __EIGEN3_MATRIX_C_API_CC__ */
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Map
btMatrix3x3 inverse() const
Return the inverse of the matrix.
Definition: btTransform.h:182
#define M
bool EIG_invert_m4_m4(float inverse[4][4], const float matrix[4][4])
Definition: matrix.cc:27
#define R