a few hints for beginners trying to play with flatland, also a small reminder for philip to fix these in a future release
visual studio .net 2003 reports a syntax error in flatland.cpp: ambiguous call to atan(1); the compiler tries to distiguish between double and float variants of atan(); making it 1.0 or 1.0f instead of 1 will resolve this;
class Object in the file demo.h lacks a virtual destructor; because of this, deleted objects (for example when calling space.pop() in the simple demo) will not be correctly uninitialized, causing a crash in ODE in the debug build; add line "virtual ~Object() {}" to the public section of class Object to fix the problem; it may be a good idea to do the same with Flatland::Object in flatland.h
stepping through simple.cpp with vstudio 2003 in debug mode is acting wierd: the debugger is always showing the wrong line (ie. other than the one it's about to execute); i don't know why; all other files work fine in this regard, but simple.cpp being likely the first one for a beginner to try and step through, he might give up right there (as i did few months ago)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The atan thing wasn't happening for me because I was using an older VStudio. I'll be sure to test with both versions from here on out. And you're definitely right about the missing virtual destructors -- strange that the crash doesn't occur for me. And the off-by-one stepping problem with simple.cpp is due to some bad end-of-line characters in the file.
I'll fix all these issues in the next release. Thanks again!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
a few hints for beginners trying to play with flatland, also a small reminder for philip to fix these in a future release
visual studio .net 2003 reports a syntax error in flatland.cpp: ambiguous call to atan(1); the compiler tries to distiguish between double and float variants of atan(); making it 1.0 or 1.0f instead of 1 will resolve this;
class Object in the file demo.h lacks a virtual destructor; because of this, deleted objects (for example when calling space.pop() in the simple demo) will not be correctly uninitialized, causing a crash in ODE in the debug build; add line "virtual ~Object() {}" to the public section of class Object to fix the problem; it may be a good idea to do the same with Flatland::Object in flatland.h
stepping through simple.cpp with vstudio 2003 in debug mode is acting wierd: the debugger is always showing the wrong line (ie. other than the one it's about to execute); i don't know why; all other files work fine in this regard, but simple.cpp being likely the first one for a beginner to try and step through, he might give up right there (as i did few months ago)
First, apologies that I didn't respond sooner...
Thanks for pointing out these issues!
The atan thing wasn't happening for me because I was using an older VStudio. I'll be sure to test with both versions from here on out. And you're definitely right about the missing virtual destructors -- strange that the crash doesn't occur for me. And the off-by-one stepping problem with simple.cpp is due to some bad end-of-line characters in the file.
I'll fix all these issues in the next release. Thanks again!
Does these issues (particularly the atan one) issue has a fix now ?
Sorry i did not see the fix above :|
Strange forum behaviours, somes link changed when i've post... bheu... Whatever