vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SP_Object_Data_Base.h
Go to the documentation of this file.
1 #ifndef SP_OBJECT_DATA_BASE_H
2 #define SP_OBJECT_DATA_BASE_H
3 
6 
7 
8 namespace APSpacePartitioning {
9 
11  friend DWORD WINAPI HierarchyThreadProc(SP_Object_Data_Base *lpParameter);
12 public:
13  SP_Object_Data_Base(const char *abName);
15 
16  virtual void preInitialize();
17  virtual void update();
18 
19 protected:
21 
23  bool bThreadShouldTerminate; // signal from the outside that the thread should finish as quickly as possible
24 
25  virtual bool startThreadedHierarchyCreation();
26  // initializes a thread and runs the hierarchy creation
27  // Descendants should not need to override this method.
28 
29  virtual void destroyThread();
30 
31  virtual bool coreHierarchyCreation() { return false; };
32  // Method that is executed in the separate thread (maybe in the main one) to create the actual hierarchy.
33  // Descendants will need to override this method.
34  // The method should watch the [bThreadShouldTerminate] variable and exit quickly if it becomes "true".
35 };
36 
37 }
38 
39 
40 #endif