summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertelehub.h
blob: 287769b03731151a43e3d3f9f3a82e6824ad3da9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/** 
 * @file llfloatertelehub.h
 * @author James Cook
 * @brief LLFloaterTelehub class definition
 *
 * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
 * $License$
 */

#ifndef LL_LLFLOATERTELEHUB_H
#define LL_LLFLOATERTELEHUB_H

#include "llfloater.h"

class LLMessageSystem;
class LLObjectSelection;

const S32 MAX_SPAWNPOINTS_PER_TELEHUB = 16;

class LLFloaterTelehub : public LLFloater
{
public:
	// Opens the floater on screen.
	static void show();

	virtual void draw();

	static BOOL renderBeacons();
	static void addBeacons();

private:
	LLFloaterTelehub();
	~LLFloaterTelehub();

	void refresh();
	void sendTelehubInfoRequest();

	static void onClickConnect(void* data);
	static void onClickDisconnect(void* data);
	static void onClickAddSpawnPoint(void* data);
	static void onClickRemoveSpawnPoint(void* data);

	static void processTelehubInfo(LLMessageSystem* msg, void**);
	void unpackTelehubInfo(LLMessageSystem* msg);

private:
	LLUUID mTelehubObjectID;	// null if no telehub
	LLString mTelehubObjectName;
	LLVector3 mTelehubPos;	// region local, fallback if viewer can't see the object
	LLQuaternion mTelehubRot;

	S32 mNumSpawn;
	LLVector3 mSpawnPointPos[MAX_SPAWNPOINTS_PER_TELEHUB];
	
	LLHandle<LLObjectSelection> mObjectSelection;

	static LLFloaterTelehub* sInstance;
};

#endif