Blender V5.0
multires_inline.hh File Reference

Go to the source code of this file.

Functions

BLI_INLINE void BKE_multires_construct_tangent_matrix (blender::float3x3 &tangent_matrix, const blender::float3 &dPdu, const blender::float3 &dPdv, const int corner)

Function Documentation

◆ BKE_multires_construct_tangent_matrix()

BLI_INLINE void BKE_multires_construct_tangent_matrix ( blender::float3x3 & tangent_matrix,
const blender::float3 & dPdu,
const blender::float3 & dPdv,
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 16 of file multires_inline.hh.

References BLI_assert_msg, BLI_INLINE, blender::math::cross(), blender::math::normalize(), blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().

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