-
Notifications
You must be signed in to change notification settings - Fork 0
/
sceneGraph.h
45 lines (36 loc) · 893 Bytes
/
sceneGraph.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
#ifndef __SCENEGRAPH_H__ //guard against cyclic dependancy
#define __SCENEGRAPH_H__
//Header file for the SceneGraph
#include "node.h"
#include "nodeModel.h"
#include "Math/math3D.h"
#include "Math/Hitbox.h"
#include <vector>
class SceneGraph{
public:
SceneGraph(); //constructor
//Scene Graph Navigation
void goToRoot();
void goToChild(int i);
void goToParent();
void insertChildNodeHere(Node *node);
void deleteThisNode();
void searchByID(int ID);
bool Intersect(int x, int y);
//Scene Graph Draw
void draw();
void transformNode(Node *node);
void deleteScene();
void clearScene(Node *n);
// Variables for Intersect
vec3D near,far,distance;
double matModelView[16], matProjection[16];
int viewport[4];
double* start;
double* finish;
Node *currentNode;
vector<Node*> hitBoxNodes;
private:
Node *rootNode;
};
#endif