-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVrFile.m
98 lines (71 loc) · 2.05 KB
/
VrFile.m
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
classdef VrFile < DataFile
properties (SetObservable, GetObservable, AbortSet)% Header Data
% rootPath
% experimentName
% headerFileName
% dataFileName
% infoFileName
worldNumber
trialNumber
% numFrames
% firstFrame
% lastFrame
% startTime
% dataType
end
properties (Hidden, SetAccess = protected)
% headerFormat
% headerMapObj
% dataFileID %probably won't be used, but could be used to store eye data
% infoFileID
% infoFields
% infoFormat
% paddedProps
% filesOpen
% filesClosed
% default
end
methods % Constructor
function obj = VrFile(varargin)
obj = obj@DataFile(varargin{:});
end
end
methods (Hidden) % Initialization
function defineDefaults(obj)
obj.defineDefaults@DataFile;
obj.default.worldNumber = 1;
obj.default.experimentName = 'none';
obj.default.trialNumber = 0;
obj.default.headerFileName = ['VrHeader_',datestr(obj.default.startTime,'yyyy_mm_dd_HHMMSS'),...
sprintf('_N%i',obj.instanceNumber),'.fhf'];
obj.default.dataFileName = ['VrData_',datestr(obj.default.startTime,'yyyy_mm_dd_HHMMSS'),...
sprintf('_N%i',obj.instanceNumber),'.fdf'];
obj.default.infoFileName = ['VrFrameInfo_',datestr(obj.default.startTime,'yyyy_mm_dd_HHMMSS'),...
sprintf('_N%i',obj.instanceNumber),'.fif'];
end
function checkProperties(obj)
% Add any property containing a variable length string to paddedProps
obj.paddedProps = {...
'experimentName'};
obj.checkProperties@DataFile;
end
end
methods % Functions for Saving
function checkFrameInfo(obj,info)
obj.checkFrameInfo@DataFile(info);
end
end
methods % Cleanup and State-Check
function delete(obj)
obj.delete@DataFile;
end
function obj = saveobj(obj)
obj = saveobj@DataFile(obj);
end
end
methods (Static)
function obj = loadobj(obj)
obj = obj.loadobj@DataFile;
end
end
end