-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestes.cpp
More file actions
executable file
·72 lines (54 loc) · 1.73 KB
/
Copy pathTestes.cpp
File metadata and controls
executable file
·72 lines (54 loc) · 1.73 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include "irrlicht.h"
#include "Skeleton.h"
#include "XnCppWrapper.h"
using namespace irr;
//DEV
#include <iostream>
using namespace std;
//ENDDEV
#ifdef _IRR_WINDOWS_
#pragma comment(lib, "Irrlicht.lib")
//#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#endif
int main()
{
IrrlichtDevice *device = createDevice(video::EDT_OPENGL, core::dimension2d<u32>(800,600), 32, false, false, false);
if(!device)
return 1;
device->setWindowCaption(L"jKgym - Hugo Ribeira");
//Pointers for video and scene manager
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
scene::ICameraSceneNode *camera = smgr->addCameraSceneNode();
camera->setTarget( core::vector3df(f32(0.0),f32(200.0),f32(50.0)) );
//Simulate Kinect Input
XnSkeletonJointPosition head_kinect;
head_kinect.position.X = 0;
head_kinect.position.Y = 200;
head_kinect.position.Z = 15;
XnSkeletonJointPosition lshoulder_kinect;
lshoulder_kinect.position.X = 20;
lshoulder_kinect.position.Y = 200;
lshoulder_kinect.position.Z = 30;
XnSkeletonJointPosition rshoulder_kinect;
rshoulder_kinect.position.X = -20;
rshoulder_kinect.position.Y = 200;
rshoulder_kinect.position.Z = 30;
Skeleton guy(smgr, driver);
guy.jointAdd(1, head_kinect, 10.0);
guy.jointAdd(2, lshoulder_kinect, 5.0);
guy.jointAdd(3, rshoulder_kinect, 5.0);
try{
while(device->run()){
driver->beginScene(true, true, video::SColor(255,113,113,133));
//-------------------------------
//-------------------------------
smgr->drawAll(); // draw the 3d scene
driver->endScene();
}
}
catch(std::exception e){
cout << e.what();
}
return 0;
}