PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llfloatertelehub.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 77 lines | 35 code | 16 blank | 26 comment | 0 complexity | 66e5ae9fcdd0b093bb1fbd9726f37235 MD5 | raw file
 1/** 
 2 * @file llfloatertelehub.h
 3 * @author James Cook
 4 * @brief LLFloaterTelehub class definition
 5 *
 6 * $LicenseInfo:firstyear=2005&license=viewerlgpl$
 7 * Second Life Viewer Source Code
 8 * Copyright (C) 2010, Linden Research, Inc.
 9 * 
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation;
13 * version 2.1 of the License only.
14 * 
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 * 
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 * 
24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
25 * $/LicenseInfo$
26 */
27
28#ifndef LL_LLFLOATERTELEHUB_H
29#define LL_LLFLOATERTELEHUB_H
30
31#include "llfloater.h"
32
33class LLMessageSystem;
34class LLObjectSelection;
35
36const S32 MAX_SPAWNPOINTS_PER_TELEHUB = 16;
37
38class LLFloaterTelehub : public LLFloater
39{
40public:
41	LLFloaterTelehub(const LLSD& key);
42	~LLFloaterTelehub();
43	
44	/*virtual*/	BOOL postBuild();
45	/*virtual*/ void onOpen(const LLSD& key);
46
47	/*virtual*/ void draw();
48	
49	static BOOL renderBeacons();
50	static void addBeacons();
51
52	void refresh();
53	void sendTelehubInfoRequest();
54
55	void onClickConnect();
56	void onClickDisconnect();
57	void onClickAddSpawnPoint();
58	void onClickRemoveSpawnPoint();
59
60	static void processTelehubInfo(LLMessageSystem* msg, void**);
61	void unpackTelehubInfo(LLMessageSystem* msg);
62
63private:
64	LLUUID mTelehubObjectID;	// null if no telehub
65	std::string mTelehubObjectName;
66	LLVector3 mTelehubPos;	// region local, fallback if viewer can't see the object
67	LLQuaternion mTelehubRot;
68
69	S32 mNumSpawn;
70	LLVector3 mSpawnPointPos[MAX_SPAWNPOINTS_PER_TELEHUB];
71	
72	LLSafeHandle<LLObjectSelection> mObjectSelection;
73
74	static LLFloaterTelehub* sInstance;
75};
76
77#endif