The problem, as previously stated, is that your loop will continue forever.
The end of list is not determined by how many items you initially allocated space for, but when the actual last element...
Type: Posts; User: Kenki
The problem, as previously stated, is that your loop will continue forever.
The end of list is not determined by how many items you initially allocated space for, but when the actual last element...
Also, just so you know, the following code piece does not create an instance of class SomeClass, it declares a function returning an instance of class SomeClass:
SomeClass a();
a.method(); //...
Your code logic is a slight bit messed up, so it never finishes sorting. It just keeps recursing, which causes a stack overflow and thus a crash.
Here are some comments:
void quicksort...
The = operator should work just fine. Which delete operator to use depends on which new operator you allocated with, ie if you allocated with new [], then free with delete [].
The only obvious...
I have only looked at your code briefly, but I think you use the wrong operator for comparison (assuming I read the code correctly).
Assuming maxx - minx describes the length of the box on the...
When I said "approximate a circle with..." I didn't mean when colliding a circle with another circle, I meant when colliding it with a polygon. As it is, I don't need an approximation in either case....
Well... I fail to see why I shouldn't...
The reasons why I should?
1) It gives me the choice to use more accurate collision detection should I so desire. Or the choice not to. And choice is a...
Couldn't find any edit function... Suppose you can't edit after a certain period of time has passed?
Anyway, I realized I forgot to mention one thing in the pseudo code...
should have been
...
The problem is that 1/3 is interpreted as integer arithmetic by your compiler. 1/3 with integers is 0 and anything raised to the power of 0 is 1. So basically, your code says:
Rf = 0.027*1
To...
Right, then... I'll assume you know basic vector maths (dot products in particular... both how to calculate them and what they mean) and also how to perform a normal SAT test with polygons. Check the...
Thanks for making me stick with it skorman, 'cause I think I solved it :D . Well, for colliding circles with arbitrary, convex polygons at least.
I have no proof yet, though it passes my initial...
Perhaps I was a bit diffuse with my question... When saying curved I included circles and actually meant them quite in particular. Though, I suppose that wasn't too clear.
However, I'm not quite...
Right, then I'll give up on exactly calculated curved object collision. However, I cannot imagine circles being too expensive to use. As I said, it has been done in even flash... Although that was...
Thanks. Unfortunately, those were things I already knew... What I want help to figure out, is how to do collision detection with:
1) Two objects of more complex shapes than a circle (if it seems...
Well, thanks for the reply, however... I don't mean to be rude, but did you actually read my post? It is not a 3d game engine, it's 2d.
I figured that the performance saved in reducing the number...
I'm currently working on a 2d, vector based game engine. Specifically, the collision detection/response parts.
I thought the separating axis theorem would work well for detection, as it is simple...