Chipmunk queries

About Monkey 2 Forums Monkey 2 Programming Help Chipmunk queries

Tagged: 

This topic contains 20 replies, has 4 voices, and was last updated by  abakobo 2 years, 4 months ago.

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #6594

    Mark Sibly
    Keymaster

    One thing I can probably do quite easily is wrap cpSpaceBBQuery so it accepts an mx2 function, allowing you to use it with methods, lambas etc.

    #6596

    peterigz
    Participant

    That’d be good 🙂

    What is the risk of using a self referencing field in a class? I didn’t quite follow what you said on github?

    #6597

    codifies
    Participant

    DOH! it was right there in front of me – how on earth did I miss the fact it was a local! very odd how printing it after creating it even had any effect….

    #6626

    abakobo
    Participant

    One thing I can probably do quite easily is wrap cpSpaceBBQuery so it accepts an mx2 function, allowing you to use it with methods, lambas etc.

    I’m looking forward to see the mx2/C code for it. I really wonder how those things can be connected..

    That is some bad news, my next step on playing with monkey was learning callbacks and continue some chipmunk demos..!
    But this is something, chipmunk is using a lot of C type callbacks.

    If you show the way for wrapping these queries, I’m ready to manually do the others if you don’t have the intention to automate the process. But I can work on Sundays only for some months.

    here is a (I think exhaustive) list of the callback function types, I didn’t count the queries using them..

    [/crayon]
    #6627

    codifies
    Participant

    I shouldnt worry once you have sussed out how one call back works in detail then any others are obvious !

    You can always hold a c ptr in a class field, and an mx2 ptr in a c/c++ user data void pointer, if you c struct or c++ class doesnt have user data then you might add one or make a custom c++ class containing pointer to the c class and a void pointer for the mx2 ptr.

    Id love to see the ability to link classes/structs with mx objects, object finalisers (onDestroy method) would be famtastic but the doesnt see much interest…

    #6759

    abakobo
    Participant

    added a working demo with BBquery with function Callback and UserDatas on my chipmunk_mx2 github repo. It’s not clean but readable I think. It’s a bit too big. I’ll probably start to make simpler examples because there’s to much shapes objects and that makes too much code lines. BUT it’s fully working!

    https://github.com/abakobo/chipmunk_monkey2

Viewing 6 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic.