PageRenderTime 32ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llagentui.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 58 lines | 21 code | 6 blank | 31 comment | 0 complexity | 6e8d41fda7eec2f5b7be4665b4fb294c MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llagentui.h
  3. * @brief Utility methods to process agent's data as slurl's etc. before displaying
  4. *
  5. * $LicenseInfo:firstyear=2009&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LLAGENTUI_H
  27. #define LLAGENTUI_H
  28. class LLSLURL;
  29. class LLAgentUI
  30. {
  31. public:
  32. enum ELocationFormat
  33. {
  34. LOCATION_FORMAT_NORMAL, // Parcel
  35. LOCATION_FORMAT_LANDMARK, // Parcel, Region
  36. LOCATION_FORMAT_NO_MATURITY, // Parcel, Region (x, y, z)
  37. LOCATION_FORMAT_NO_COORDS, // Parcel, Region - Maturity
  38. LOCATION_FORMAT_FULL, // Parcel, Region (x, y, z) - Maturity
  39. };
  40. static void buildFullname(std::string &name);
  41. static void buildSLURL(LLSLURL& slurl, const bool escaped = true);
  42. //build location string using the current position of gAgent.
  43. static BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK);
  44. //build location string using a region position of the avatar.
  45. static BOOL buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region);
  46. /**
  47. * @brief Check whether the agent is in neighborhood of the pole Within same region
  48. * @return true if the agent is in neighborhood.
  49. */
  50. static BOOL checkAgentDistance(const LLVector3& local_pole, F32 radius);
  51. };
  52. #endif //LLAGENTUI_H