Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-11-01 17:12:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-01 17:20:50 +0300
commitd710cb91b9281e94851bddc8b49b570dc6326b5f (patch)
tree1dcca4ff99b327ce0eaf21715b5986082ac5e540 /source/blender/blenkernel/BKE_multires.h
parentc2aa8d03f26ceb2700730e5aeb2c72ccfa969116 (diff)
Subdiv: Cleanup, de-duplicate tangent matrix calculation
Diffstat (limited to 'source/blender/blenkernel/BKE_multires.h')
-rw-r--r--source/blender/blenkernel/BKE_multires.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h
index 28a98768a06..d4e0dbb72cd 100644
--- a/source/blender/blenkernel/BKE_multires.h
+++ b/source/blender/blenkernel/BKE_multires.h
@@ -32,6 +32,8 @@
* \ingroup bke
*/
+#include "BLI_compiler_compat.h"
+
enum MultiresModifiedFlags;
struct Depsgraph;
@@ -151,4 +153,18 @@ void BKE_multires_subdiv_mesh_settings_init(
const bool use_render_params,
const bool ignore_simplify);
+/* General helpers. */
+
+/* For a given partial derivatives of a ptex face get tangent matrix for
+ * displacement.
+ * Corner needs to be known to properly "rotate" partial derivatives.
+ */
+BLI_INLINE void BKE_multires_construct_tangent_matrix(
+ float tangent_matrix[3][3],
+ const float dPdu[3],
+ const float dPdv[3],
+ const int corner);
+
#endif /* __BKE_MULTIRES_H__ */
+
+#include "intern/multires_inline.h"