zuker / box2d-native

Box2D as native Node.js addon
11 stars 6 forks source link

Can't inherit for C++ abstract classes (i.e. b2Draw) #3

Open zuker opened 8 years ago

zuker commented 8 years ago

There are some setters in Box2D, that have arguments of abstract class in signature (i.e. void SetDebugDraw(b2Draw* debugDraw);) but in there is no way to create object that passes type check created by SWIG for those setters. Neither of ways to set b2Draw as prototype for argument of SetDebugDraw is working. I believe that the only way to resolve this issue is to create SWIG typemap. http://stackoverflow.com/questions/33573916/swig-javascript-c-arguments-handling

henopied commented 7 years ago

@zuker I ran into this same issue with a QueryCallback, it would seem that I could not use any functions that required callbacks without creating a typemap.