PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 37ms 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
 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
27#ifndef LLAGENTUI_H
28#define LLAGENTUI_H
29
30class LLSLURL;
31
32class LLAgentUI
33{
34public:
35	enum ELocationFormat
36	{
37		LOCATION_FORMAT_NORMAL,			// Parcel
38		LOCATION_FORMAT_LANDMARK,		// Parcel, Region
39		LOCATION_FORMAT_NO_MATURITY,	// Parcel, Region (x, y, z)
40		LOCATION_FORMAT_NO_COORDS,		// Parcel, Region - Maturity
41		LOCATION_FORMAT_FULL,			// Parcel, Region (x, y, z) - Maturity
42	};
43
44	static void buildFullname(std::string &name);
45
46	static void buildSLURL(LLSLURL& slurl, const bool escaped = true);
47	//build location string using the current position of gAgent.
48	static BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK);
49	//build location string using a region position of the avatar. 
50	static BOOL buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region);
51	/**
52	 * @brief Check whether  the agent is in neighborhood of the pole  Within same region
53	 * @return true if the agent is in neighborhood.
54	 */
55	static BOOL checkAgentDistance(const LLVector3& local_pole, F32 radius);
56};
57
58#endif //LLAGENTUI_H