Blender V4.3
multires_inline.hh File Reference
#include "BKE_multires.hh"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Functions

BLI_INLINE void BKE_multires_construct_tangent_matrix (float tangent_matrix[3][3], const float dPdu[3], const float dPdv[3], const int corner)
 

Function Documentation

◆ BKE_multires_construct_tangent_matrix()

BLI_INLINE void BKE_multires_construct_tangent_matrix ( float tangent_matrix[3][3],
const float dPdu[3],
const float dPdv[3],
int corner )

For a given partial derivatives of a PTEX face get tangent matrix for displacement.

Corner needs to be known to properly "rotate" partial derivatives when the matrix is being constructed for quad. For non-quad the corner is to be set to 0.

Definition at line 15 of file multires_inline.hh.

References BLI_assert_msg, copy_v3_v3(), cross_v3_v3v3(), mul_v3_fl(), and normalize_v3().

Referenced by blender::bke::subdiv::average_construct_tangent_matrix(), blender::bke::subdiv::eval_displacement(), and multires_reshape_tangent_matrix_for_corner().