voxelTerrain
Main Page
Classes
Files
Examples
File List
All
Classes
Functions
Variables
Typedefs
Enumerations
Pages
modules
sync
source
blub
sync
voxel
container
multipleTiles
network_sync_voxel_container_multipleTiles_sender.hpp
1
#ifndef NETWORK_SYNC_VOXEL_CONTAINER_MULTIPLETILES_SENDER_HPP
2
#define NETWORK_SYNC_VOXEL_CONTAINER_MULTIPLETILES_SENDER_HPP
3
4
#include "blub/async/predecl.hpp"
5
#include "blub/core/hashList.hpp"
6
#include "blub/core/hashMap.hpp"
7
#include "blub/core/hashMapMulti.hpp"
8
#include "blub/math/octree/container.hpp"
9
#include "blub/core/signal.hpp"
10
#include "blub/procedural/voxel/simple/container/utils/tile.hpp"
11
#include "blub/sync/sender.hpp"
12
13
#include <boost/signals2/connection.hpp>
14
#include <boost/function/function2.hpp>
15
16
17
namespace
blub
18
{
19
namespace
sync
20
{
21
namespace
voxel
22
{
23
namespace
container
24
{
25
namespace
simple
26
{
27
28
29
//class sender : protected ::blub::sync::sender<vector3int32, sharedPointer<identifier> >
30
//{
31
//public:
32
// typedef vector3int32 t_tileId;
33
// typedef sharedPointer<byteArray> t_tileDataPtr;
34
// typedef sharedPointer<procedural::voxel::tile::container> t_tilePtr;
35
36
// typedef ::blub::sync::sender<t_tileId, sharedPointer<identifier> > t_base;
37
38
// typedef sharedPointer<identifier> t_receiverIdentifierPtr;
39
// typedef hashMap<t_tileId, t_tileDataPtr> t_tileDataMap;
40
// typedef procedural::voxel::simple::container::utils::tile t_tileHolder;
41
// typedef procedural::voxel::simple::container::utils::tileState t_tileState;
42
// typedef hashMap<t_tileId, t_tileHolder> t_tileChangedList;
43
44
// typedef boost::function<bool (vector3, axisAlignedBox)> t_octreeSearchCallback;
45
46
// sender(async::dispatcher &master,
47
// const t_octreeSearchCallback& octreeSearch,
48
// blub::procedural::voxel::simple::container::base* tiles);
49
// sender(blub::async::dispatcher &master,
50
// const t_octreeSearchCallback& octreeSearch,
51
// const real& voxelSize);
52
// virtual ~sender();
53
54
// // to "send sync"
55
// void tileEditDone();
56
57
// // add/update/remove sync-reveiver
58
// void addSyncReceiver(t_receiverIdentifierPtr receiver, const vector3& pos);
59
// void updateSyncReceiver(t_receiverIdentifierPtr receiver, const vector3& pos);
60
// void removeSyncReceiver(t_receiverIdentifierPtr receiver);
61
62
// // to "send sync" signals
63
// typedef blub::signal<void (t_receiverIdentifierPtr, t_tileDataPtr)> t_sigSendTileData;
64
// t_sigSendTileData* signalSendTileData(void);
65
66
//protected:
67
// void tileEditDoneMaster();
68
// void tileAddedMaster(const t_tileId &id, const t_tileHolder &tile);
69
// void tileChangedMaster(const t_tileId id, const t_tileHolder &tile);
70
// void tileRemovedMaster(const t_tileId id);
71
72
// void addSyncReceiverMaster(t_receiverIdentifierPtr receiver, const vector3& pos);
73
// void updateSyncReceiverMaster(t_receiverIdentifierPtr receiver, const vector3& pos);
74
// void removeSyncReceiverMaster(t_receiverIdentifierPtr receiver);
75
76
// void updateLinkReceiverTilesMaster(t_receiverIdentifierPtr receiver);
77
// void addLinkTileReceiverMaster(t_receiverIdentifierPtr receiver, const t_tileId &tile);
78
// void removeLinkTileReceiverMaster(t_receiverIdentifierPtr receiver, const t_tileId &tile, const bool& callSignals = true);
79
80
// void startEditingMaster(t_receiverIdentifierPtr receiver);
81
// void endEditingAllMaster(void);
82
83
// void sendStartEditingMaster(t_receiverIdentifierPtr receiver);
84
// void sendEndEditingMaster(t_receiverIdentifierPtr receiver);
85
// void sendSetTileMaster(t_receiverIdentifierPtr receiver, const t_tileId &id, t_tileDataPtr data);
86
87
// static void compressTile(const t_tileHolder &tile, byteArray* result);
88
89
// virtual bool isInSyncRangeReceiver(const t_base::t_receiver receiver, const vector3 &posOfReceiverLeafCenter, const typename t_base::t_syncTree::t_nodePtr& octreeNode);
90
// virtual bool isInSyncRangeSync(const t_base::t_sync sync, const vector3 &posOfSyncLeafCenter, const typename t_base::t_receiverTree::t_nodePtr& octreeNode);
91
// virtual void addSyncReceiver(const t_receiver receiver, const t_sync sync);
92
// virtual void removeSyncReceiver(const t_receiver receiver, const t_sync sync);
93
94
95
// procedural::voxel::simple::container::base *m_tiles;
96
// t_octreeSearchCallback m_searchFunction;
97
// real m_voxelSize;
98
// const vector3 m_sizeTile;
99
100
// t_tileDataMap m_tileData;
101
102
// t_sigSendTileData m_sigSendTileData;
103
104
// t_receiverList m_receiverInEditMode;
105
106
// boost::signals2::scoped_connection m_connTileVoxelEditDone;
107
108
//};
109
110
111
}
112
}
113
}
114
}
115
}
116
117
118
#endif // NETWORK_SYNC_VOXEL_CONTAINER_SENDER_HPP
blub
Definition:
deadlineTimer.hpp:10
Generated on Sat Jan 31 2015 13:35:23 for voxelTerrain by
1.8.8