-
Notifications
You must be signed in to change notification settings - Fork 3
/
CloudsRGBDVideoPlayer.h
executable file
·121 lines (95 loc) · 2.07 KB
/
CloudsRGBDVideoPlayer.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
//
// CloudsRGBDCombinedRender.h
// CloudsRGBDCombinedRender
//
// Created by Patricio Gonzalez Vivo on 4/14/13.
//
//
#pragma once
#include "ofMain.h"
#include "ofxXmlSettings.h"
#ifdef AVF_PLAYER
#include "ofxAVFVideoPlayer.h"
#endif
class CloudsRGBDVideoPlayer {
public:
CloudsRGBDVideoPlayer();
~CloudsRGBDVideoPlayer();
// SET
//
bool setup(string videoPath, string calibrationXMLPath, float offsetTime = 0);
void swapAndPlay();
void setupProjectionUniforms(ofShader& shader);
// CYCLE
//
bool isPlaying();
bool isDone();
// UNIMPLEMENTED
ofPtr<ofVideoPlayer> getSharedPlayerPtr(){
return ofPtr<ofVideoPlayer>( new ofVideoPlayer());
}
float getFadeIn(){
return fadeInValue;
};
float getFadeOut(){
return fadeOutValue;
};
#ifdef AVF_PLAYER
ofxAVFVideoPlayer& getPlayer();
#else
ofVideoPlayer& getPlayer();
#endif
// Fix extrinsics
ofVec3f adjustTranslate;
ofVec3f adjustRotate;
ofVec2f adjustScale;
ofVec3f headPosition;
float minDepth;
float maxDepth;
float flowPosition;
float edgeClip;
float farClip;
float nearClip;
float maxVolume;
protected:
// UPDATE
//
bool bEventRegistered;
void update(ofEventArgs& args);
#ifdef AVF_PLAYER
ofxAVFVideoPlayer currentPlayer;
ofxAVFVideoPlayer nextPlayer;
#else
ofVideoPlayer currentPlayer;
ofVideoPlayer nextPlayer;
#endif
// RGB
//
ofRectangle colorRect;
ofVec2f colorScale;
ofVec2f colorPrincipalPoint;
ofVec2f colorFOV;
ofMatrix4x4 extrinsics;
ofVec3f distortionK;
ofVec2f distortionP;
// Depth
//
ofRectangle depthRect;
ofVec2f depthPrincipalPoint;
ofVec2f depthFOV;
// Normals, Face Features, and Delta Movement
//
//surface normal
ofRectangle normalRect;
//describes facial features
ofRectangle faceFeatureRect;
//this describes the change each frame
ofRectangle deltaChangeRect;
string nextCalibrationXML;
bool useFaces;
bool clipPrerolled;
bool bRendererBound;
bool bMeshGenerated;
float fadeInValue;
float fadeOutValue;
};