forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
save_to_ply.m
29 lines (28 loc) · 1.22 KB
/
save_to_ply.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
% Wraps librealsense2 save_to_ply class
classdef save_to_ply < realsense.filter
properties (Constant=true)
option_ignore_color = realsense.option.count + 1;
option_ply_mesh = realsense.option.count + 2;
option_ply_binary = realsense.option.count + 3;
option_ply_normals = realsense.option.count + 4;
option_ply_treshold = realsense.option.count + 5;
end
methods
% Constructor
function this = save_to_ply(filename, pc)
switch nargin
case 0
out = realsense.librealsense_mex('rs2::save_to_ply', 'new');
case 1
validateattributes(filename, {'char', 'string'}, {'scalartext'});
out = realsense.librealsense_mex('rs2::save_to_ply', 'new', filename);
case 2
validateattributes(filename, {'char', 'string'}, {'scalartext'});
validateattributes(pc, {'realsense.pointcloud'}, {'scalar'});
out = realsense.librealsense_mex('rs2::save_to_ply', 'new', filename, pc.objectHandle);
end
this = [email protected](out);
end
% Destructor (uses base class destructor)
end
end