PageRenderTime 63ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llmath/llsdutil_math.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 64 lines | 22 code | 9 blank | 33 comment | 0 complexity | 6af28b14ef2fee8b37a9da52daeaffb7 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llsdutil_math.h
  3. * @author Brad
  4. * @date 2009-05-19
  5. * @brief Utility classes, functions, etc, for using structured data with math classes.
  6. *
  7. * $LicenseInfo:firstyear=2009&license=viewerlgpl$
  8. * Second Life Viewer Source Code
  9. * Copyright (C) 2010, Linden Research, Inc.
  10. *
  11. * This library is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU Lesser General Public
  13. * License as published by the Free Software Foundation;
  14. * version 2.1 of the License only.
  15. *
  16. * This library is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * Lesser General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Lesser General Public
  22. * License along with this library; if not, write to the Free Software
  23. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  24. *
  25. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  26. * $/LicenseInfo$
  27. */
  28. #ifndef LL_LLSDUTIL_MATH_H
  29. #define LL_LLSDUTIL_MATH_H
  30. class LL_COMMON_API LLSD;
  31. // vector3
  32. class LLVector3;
  33. LLSD ll_sd_from_vector3(const LLVector3& vec);
  34. LLVector3 ll_vector3_from_sd(const LLSD& sd, S32 start_index = 0);
  35. // vector4
  36. class LLVector4;
  37. LLSD ll_sd_from_vector4(const LLVector4& vec);
  38. LLVector4 ll_vector4_from_sd(const LLSD& sd, S32 start_index = 0);
  39. // vector3d (double)
  40. class LLVector3d;
  41. LLSD ll_sd_from_vector3d(const LLVector3d& vec);
  42. LLVector3d ll_vector3d_from_sd(const LLSD& sd, S32 start_index = 0);
  43. // vector2
  44. class LLVector2;
  45. LLSD ll_sd_from_vector2(const LLVector2& vec);
  46. LLVector2 ll_vector2_from_sd(const LLSD& sd);
  47. // Quaternion
  48. class LLQuaternion;
  49. LLSD ll_sd_from_quaternion(const LLQuaternion& quat);
  50. LLQuaternion ll_quaternion_from_sd(const LLSD& sd);
  51. // color4
  52. class LLColor4;
  53. LLSD ll_sd_from_color4(const LLColor4& c);
  54. LLColor4 ll_color4_from_sd(const LLSD& sd);
  55. #endif // LL_LLSDUTIL_MATH_H