-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignac.h
52 lines (41 loc) · 1.32 KB
/
signac.h
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
#ifndef __SIGNAC__
#define __SIGNAC__
#include <omega.h>
#include "PointCloud.h"
#include "Program.h"
using namespace omega;
class PointCloudView;
///////////////////////////////////////////////////////////////////////////////
// Signac Engine module, gets registered when module is imported, takes care
// of updating plots etc.
class Signac : public EngineModule
{
friend class PointCloudView;
friend class SignacRenderPass;
public:
static Signac* instance;
public:
static Signac* getInstance() { return instance; }
Signac();
void update(const UpdateContext& context);
virtual void dispose();
virtual void initializeRenderer(Renderer* r);
Program* addProgram(const String& name);
Program* getProgram(const String& name);
Program::List& getPrograms() { return myPrograms; }
void setFieldLoadedCommand(const String& cmd) { myFieldLoadedCommand = cmd; }
void signalFieldLoaded(Field* f);
void addTask(WorkerTask* task);
void setWorkerThreads(int th) { myWorkerThreads = th; }
protected:
void addPointCloudView(PointCloudView* pc);
void removePointCloudView(PointCloudView* pc);
private:
List<PointCloudView*> myPointCloudViews;
Program::List myPrograms;
Lock myLock;
String myFieldLoadedCommand;
int myWorkerThreads;
Ref<WorkerPool> myWorkers;
};
#endif