Tag Info

Hot answers tagged

3

The problem is you need to close the loop, to make sure the lasso is complete (based on the behavior of the video). You do that by testing if one of the segments intersect with another segment, thus closing the loop. It might look something like this (note I don't use libgdx, so this is untested): Array<Vector2> path = p.getPath(); // Look for an ...


2

C++ should be very efficient, but it also would make me have to worry about low-level details like manual memory management, and compiling for different platforms. Modern C++ highly discourages manual memory management. You should instead use smart pointers like unique_ptr and allocation functions like make_unique and never manually allocate or ...


1

About c++: You dont really need to worry about memory management. Ofc you handle memory yourself, but its not as hard as in C. In C++ you just allocate your memory by creating a Object (new xyz();) and free this memory by deleting it (delete var;). No more manual malloc() and stuff) About Java: Java supports Call-by-value with primitives and ...



Only top voted, non community-wiki answers of a minimum length are eligible