constraint_app
/home/jbrooksh/drc/software/perception/constraint_app/src/matlab_mex/cam_getCurrentStateEstimate.cpp
Go to the documentation of this file.
00001 #include "mex.h"
00002 #include "ConstraintApp.h"
00003 
00016 void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
00017 {
00018   if ( nrhs != 1 ) {
00019     mexErrMsgTxt("requires exactly 1 parameters"); 
00020   }
00021 
00022   if ( nlhs != 1 ) {
00023     mexErrMsgTxt("returns exactly 1 parameters"); 
00024   }
00025 
00026   ConstraintApp* app(*(ConstraintApp**)mxGetData(prhs[0]));
00027 
00028   std::vector<double> state;
00029   app->GetCurrentStateEstimate(state);
00030 
00031   plhs[0] = mxCreateDoubleMatrix(1, state.size(), mxREAL);
00032 
00033   double* s((double*)mxGetData(plhs[0]));
00034 
00035   std::copy(state.begin(), state.end(), s);
00036 }
 All Classes Files Functions Variables Typedefs