Subversion Repositories seema-scanner

Rev

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

Rev 3 Rev 28
Line 4... Line 4...
4
// Output printf statements in the Matlab workspace
4
// Output printf statements in the Matlab workspace
5
#define printf mexPrintf
5
#define printf mexPrintf
6
 
6
 
7
 
7
 
8
// The class that we are interfacing to
8
// The class that we are interfacing to
9
#include "Projector.h"
-
 
10
#include "ProjectorOpenGL.h"
9
#include "ProjectorOpenGL.h"
11
#include "OpenGLContext.h"
10
#include "OpenGLContext.h"
12
 
11
 
13
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
12
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
14
{	
13
{	
Line 51... Line 50...
51
		mexErrMsgTxt("Second input should be a class instance handle.");
50
		mexErrMsgTxt("Second input should be a class instance handle.");
52
    
51
    
53
    // Delete
52
    // Delete
54
    if (!strcmp("delete", cmd)) {
53
    if (!strcmp("delete", cmd)) {
55
        // Destroy the C++ object
54
        // Destroy the C++ object
56
        destroyObject<Projector>(prhs[1]);
55
        destroyObject<ProjectorOpenGL>(prhs[1]);
57
        // Warn if other commands were ignored
56
        // Warn if other commands were ignored
58
        if (nlhs != 0 || nrhs != 2)
57
        if (nlhs != 0 || nrhs != 2)
59
            mexWarnMsgTxt("Delete: Unexpected arguments ignored.");
58
            mexWarnMsgTxt("Delete: Unexpected arguments ignored.");
60
        return;
59
        return;
61
    }
60
    }
62
    
61
    
63
    // Get the class instance pointer from the second input
62
    // Get the class instance pointer from the second input
64
    Projector *Projector_instance = convertMat2Ptr<Projector>(prhs[1]);
63
    ProjectorOpenGL *Projector_instance = convertMat2Ptr<ProjectorOpenGL>(prhs[1]);
65
    
64
    
66
    // Call the various class methods
65
    // Call the various class methods
67
    // DisplayTexture
66
    // DisplayTexture
68
    if (!strcmp("displayTexture", cmd)) {
67
    if (!strcmp("displayTexture", cmd)) {
69
        // Check parameters
68
        // Check parameters