-
Notifications
You must be signed in to change notification settings - Fork 8
/
scene.h
52 lines (40 loc) · 879 Bytes
/
scene.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
#ifndef __SCENE_H__
#define __SCENE_H__
#include <pxr/imaging/glf/glew.h>
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#ifdef _WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
#endif
#include <GLFW/glfw3.h>
#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usd/prim.h>
#include <pxr/usdImaging/usdImagingGL/gl.h>
#include <pxr/base/gf/camera.h>
PXR_NAMESPACE_USING_DIRECTIVE
class Scene
{
public:
Scene();
void prepare(float seconds);
void draw(int width, int height);
void click();
void cursor(float x, float y);
private:
void _SaveBindingState();
void _RestoreBindingState();
UsdStageRefPtr mStage;
SdfPathVector mExcludePaths;
UsdImagingGL mRenderer;
UsdImagingGLEngine::RenderParams mParams;
UsdPrim mBoard;
GfCamera mCamera;
SdfPath mCurrent;
int mWidth;
int mHeight;
int mWon;
};
#endif