You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

  1. ///////////////////////////////////////////////////////////////////////////////////////////////////
  2. // OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
  3. ///////////////////////////////////////////////////////////////////////////////////////////////////
  4. // Created : 2006-01-07
  5. // Updated : 2008-10-05
  6. // Licence : This source is under MIT License
  7. // File : glm/gtx/extend.inl
  8. ///////////////////////////////////////////////////////////////////////////////////////////////////
  9. namespace glm
  10. {
  11. template <typename genType>
  12. genType extend
  13. (
  14. genType const & Origin,
  15. genType const & Source,
  16. genType const & Distance
  17. )
  18. {
  19. return Origin + (Source - Origin) * Distance;
  20. }
  21. template <typename valType>
  22. detail::tvec2<valType> extend
  23. (
  24. detail::tvec2<valType> const & Origin,
  25. detail::tvec2<valType> const & Source,
  26. valType const & Distance
  27. )
  28. {
  29. return Origin + (Source - Origin) * Distance;
  30. }
  31. template <typename valType>
  32. detail::tvec3<valType> extend
  33. (
  34. detail::tvec3<valType> const & Origin,
  35. detail::tvec3<valType> const & Source,
  36. valType const & Distance
  37. )
  38. {
  39. return Origin + (Source - Origin) * Distance;
  40. }
  41. template <typename valType>
  42. detail::tvec4<valType> extend
  43. (
  44. detail::tvec4<valType> const & Origin,
  45. detail::tvec4<valType> const & Source,
  46. valType const & Distance
  47. )
  48. {
  49. return Origin + (Source - Origin) * Distance;
  50. }
  51. }//namespace glm