BLI: Change dependencies in vector math files

This patch reverses the dependency between `BLI_math_vec_types.hh` and
`BLI_math_vector.hh`. Now the higher level `blender::math` functions
depend on the header that defines the types they work with, rather than
the other way around.

The initial goal was to allow defining an `enable_if` in the types header
and using it in the math header. But I also think this operations to types
dependency is more natural anyway.

This required changing the includes some files used from the type
header to the math implementation header. I took that change a bit
further removing the C vector math header from the C++ header;
I think that helps to make the transition between the two systems
clearer.

Differential Revision: https://developer.blender.org/D14112
This commit is contained in:
2022-02-15 10:27:03 -06:00
parent 3ed3ee253b
commit a9f023e226
22 changed files with 64 additions and 49 deletions

View File

@@ -4,7 +4,7 @@
#include <string.h>
#include "BLI_math_vec_types.hh"
#include "BLI_math_vector.hh"
#include "BLI_utildefines.h"
#include "MEM_guardedalloc.h"