Blender  V3.3
Functions
multires_inline.h File Reference
#include "BKE_multires.h"
#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 14 of file multires_inline.h.

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

Referenced by average_construct_tangent_matrix(), eval_displacement(), and multires_reshape_tangent_matrix_for_corner().