plumageRender/3rdparty/glm/gtx/handed_coordinate_space.inl

27 lines
533 B
Plaintext
Raw Normal View History

2023-05-17 14:49:05 +08:00
/// @ref gtx_handed_coordinate_space
namespace glm
{
2023-06-07 10:52:04 +08:00
template<typename T, qualifier Q>
2023-05-17 14:49:05 +08:00
GLM_FUNC_QUALIFIER bool rightHanded
(
2023-06-07 10:52:04 +08:00
vec<3, T, Q> const& tangent,
vec<3, T, Q> const& binormal,
vec<3, T, Q> const& normal
2023-05-17 14:49:05 +08:00
)
{
return dot(cross(normal, tangent), binormal) > T(0);
}
2023-06-07 10:52:04 +08:00
template<typename T, qualifier Q>
2023-05-17 14:49:05 +08:00
GLM_FUNC_QUALIFIER bool leftHanded
(
2023-06-07 10:52:04 +08:00
vec<3, T, Q> const& tangent,
vec<3, T, Q> const& binormal,
vec<3, T, Q> const& normal
2023-05-17 14:49:05 +08:00
)
{
return dot(cross(normal, tangent), binormal) < T(0);
}
}//namespace glm