Timeline for Encapsulating Box2D C++ two virtually the same functions
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 20, 2013 at 4:11 | comment | added | Xecantur | thanks, now all I got to do is work out the issue of drawing the platforms on top of the bounding boxes, having an issue where the box precedes the sprite. | |
Sep 20, 2013 at 3:49 | comment | added | PeterT | @Xecantur never mind, the edit I added was wrong, If you read the documentation it states "The shape, this must be set. The shape will be cloned, so you can create the shape on the stack.". It is worth noting that this API is not idiomatic C++, so it's important to read the documentation. | |
Sep 20, 2013 at 3:48 | history | edited | PeterT | CC BY-SA 3.0 |
deleted 633 characters in body
|
Sep 20, 2013 at 3:40 | comment | added | PeterT | @Xecantur added another case where you didn't anticipate the lifetime of your objects. You don't really seem to be aware of the semantic difference of locals (usually on the stack) and dynamically allocated memory (usually on the heap). | |
Sep 20, 2013 at 3:38 | history | edited | PeterT | CC BY-SA 3.0 |
added 637 characters in body
|
Sep 20, 2013 at 3:25 | comment | added | PeterT | @Xecantur you can pass it as a pointer or as a reference but if you pass by value it will act as if it is an independent value. You have to express your intend correctly. You wanted to pass the instance of the world that you already created to the function, you didn't just want to pass a value equivalent to the world you wanted to pass this specific world. | |
Sep 20, 2013 at 2:53 | comment | added | Xecantur | heh seems I'm still making novice mistakes thanks this issues been bugging me for a few hours now if I could up vote I would, so I've been copying where I should have been passing by reference?, if thats the case no wonder I've been having so many issues. | |
Sep 20, 2013 at 2:51 | vote | accept | Xecantur | ||
Sep 20, 2013 at 2:50 | history | answered | PeterT | CC BY-SA 3.0 |