resolves #179.  mex rigid body constraints now use the updated drake mex...

... pointer logic, which locks the mex file until all objects are deleted.
that doesn't quite work (isa take an object, not a string with the name of the class), but I've added a check after the object is created -- which i think might be the best i can do.

On Aug 28, 2014, at 2:28 AM, Hongkai Dai <notifications@github.com> wrote:

> In util/drakeUtil.cpp:
> 
> > @@ -83,7 +88,11 @@ mxArray* createDrakeMexPointer(void* ptr, const char* name, int num_additional_i
> >  //  mexPrintf("deleteMethod = %s\n name =%s\n", deleteMethod,name);
> >  
> >    // call matlab to construct mex pointer object
> > -  mexCallMATLABsafe(1,plhs,nrhs,prhs,"DrakeMexPointer");
> > +  if (subclass_name)
> We do not check if subclass_name is actually derived from DrakeMexPointer. Can we add the following code after line 92?
> 
> bool subclass_check = isa(subclass_name,"DrakeMexPointer");
> if(!subclass_check)
> {
>   mexErrMsgIdAndTxt("Drake:createDrakeMexPointer:InvalidSubclass","subclass_name is not a valid subclass of DrakeMexPointer");
> }
> —
> Reply to this email directly or view it on GitHub.
>