Collision Detection in a 2D environment

Started by
23 comments, last by medevilenemy 14 years, 10 months ago
Quote:Heh, I was referring to compiling in more libraries, most of the functionality of which I won't use...
I see.

Just as a heads up (since you're looking into Boost), the Boost download is quite large, but in general, you only pay for the parts of it that you actually use. So, if you only need multi_array, you just include the corresponding header and you're good to go. (Some of the libraries require building and linking, but the majority of them - including multi_array - are header-only.)

There can be some compile-time overhead due to heavily templated code and/or deep inclusion trees, but I wouldn't worry about it unless you actually notice a problem. In general, most of the tools that come with Boost are well worth any minor additional overhead that they might incur.
Advertisement
Haha, I see what you mean about the download being large -- though its the extraction process thats really the big part. But it seems to be fairly simple anyway. I should be able to drop it in without having to change much. JYK, one again, your insight is invaluble. [grin]

[edit]
Wow, it really does add to compile time... about an extra 5 seconds.
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.
Quote:Wow, it really does add to compile time... about an extra 5 seconds.
I'm just curious - what seems to have added the 5 seconds exactly? Was including the multi_array header in one of your files the only change you made?

Five seconds sounds a little suspicious to me - maybe something else changed between compiles? (Of course it's hard to say for sure without actually seeing the project...)
Sorry, you're right, it really didn't add all that much... It went really slowly for one build -- don't know why. But its back to normalish now.

I am, however, having trouble making it give me an array of linked lists through std::list (as in a two dimensional array of lists of ints)

[edit] nope, its not that I'm making an array of lists, its that I was trying to declare it in the private: section of my class definition... looking for a workaround.
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.
Ok, I got it. I got around the error by declaring the array itself in the public section and setting its extents in the generic constructor for the class. Once again, thanks jyk.
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.

This topic is closed to new replies.

Advertisement