Subversion Repositories seema-scanner

Rev

Rev 1 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 28
Line 24... Line 24...
24
            ProjectorMex('delete', this.objectHandle);
24
            ProjectorMex('delete', this.objectHandle);
25
        end
25
        end
26
 
26
 
27
        % displayTexture
27
        % displayTexture
28
        function varargout = displayTexture(this, texture)
28
        function varargout = displayTexture(this, texture)
-
 
29
            % check input
-
 
30
            if(size(texture,3) ~= 3 || ~isa(texture, 'uint8'))
-
 
31
                error('Input must be [r x c x 3] of type uint8');
-
 
32
            end
29
            height = size(texture, 1);
33
            height = size(texture, 1);
30
            width = size(texture, 2);
34
            width = size(texture, 2);
31
            % swivel data to match RMO OpenGL format
35
            % swivel data to match RMO OpenGL format
32
            texture = permute(texture, [3 2 1]);
36
            texture = permute(texture, [3 2 1]);
33
            [varargout{1:nargout}] = ProjectorMex('displayTexture', this.objectHandle, texture, width, height);
37
            [varargout{1:nargout}] = ProjectorMex('displayTexture', this.objectHandle, texture, width, height);