Skip to content

Commit b02ec80

Browse files
Radient: compile specialized animation sampling kernels
1 parent 1d3f34d commit b02ec80

4 files changed

Lines changed: 907 additions & 131 deletions

File tree

‎Radient/include/Math/RadientMath.hpp‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,15 @@ inline RadientQuaternion Normalize(const RadientQuaternion& Value)
224224
};
225225
}
226226

227-
/// Linearly interpolates between two three-component vectors.
228-
RadientFloat3 Lerp(const RadientFloat3& Start,
229-
const RadientFloat3& End,
230-
Float32 Factor) noexcept;
227+
/// Linearly interpolates between two values. Type may be any value that
228+
/// supports the arithmetic operations required by Diligent::lerp().
229+
template <typename Type>
230+
inline Type Lerp(const Type& Start,
231+
const Type& End,
232+
Float32 Factor) noexcept
233+
{
234+
return Diligent::lerp(Start, End, Factor);
235+
}
231236

232237
/// Spherically interpolates normalized rotations along the shortest path.
233238
RadientQuaternion Slerp(const RadientQuaternion& Start,

0 commit comments

Comments
 (0)