I usually don’t plan ahead very far. Implement something, see how it works, and then think about the next steps. So there is no 5 year plan. For the next few months I don’t plan to add any new “big” features, like particle fluids. I want to review the current state, maybe redesign here and there, fix bugs, and most important write documentation (both source and manual). My goal is to make libpandabullet more usable. Maybe add smaller things like setting up CCD properly and adding samples.
took a stab at building libpandabullet-r17 on Mac (OSX 10.6)
Modifications to wscript are indeed pretty straightforward, however i’m getting a lot of these when it comes to compiling:
In file included from ../src/bullet_composite.cxx:13:
../src/bulletConvexHullShape.cxx: In member function ‘void BulletConvexHullShape::add_array(const PTA_LVecBase3f&)’:
../src/bulletConvexHullShape.cxx:69: error: ambiguous overload for ‘operator[]’ in ‘points[i]’
../src/bulletConvexHullShape.cxx:69: note: candidates are: operator[](LVecBase3f*, long int) <built-in>
/Developer/Panda3D/include/pointerToArray.I:387: note: typename PointerToArray<Element>::reference PointerToArray<Element>::operator[](typename pvector<Element>::size_type) const [with Element = LVecBase3f]
/Developer/Panda3D/include/pointerToArray.I:405: note: typename PointerToArray<Element>::reference PointerToArray<Element>::operator[](int) const [with Element = LVecBase3f]
suspecting that perhaps this has something to do with compiler versions… maybe there’s a flag that is missing. I’m using g++ 4.2.1 (Do you recall which compiler you used to build on Linux?)
Will spend more time this weekend and post again, if i can sort it out.
Looking at makepanda.py I think the following flags could be missing:
-ftemplate-depth-30
-fPIC
-Wno-deprecated-declarations
-isysroot /Developer/SDKs/MacOSX10.6u.sdk
-mmacosx-version-min=10.6
But this is just a wild guess. To make sure we should compare with a command line created while building Panda3D from source code on OSX, e. g. using makepanda (again with verbose: --verbose). Maybe rdb can provide a logfile from a recent OSX build.
Yep, already replaced the loop using the const iterator. I wonder why I did it this way. In other place, e. g. the BulletConvexPointCloudShape, I have been using the iterator from begining.
PTA_LVecBase3f::const_iterator it;
for (it=points.begin(); it!=points.end(); it++) {
LVecBase3f v = *it;
_shape->addPoint(LVecBase3f_to_btVector3(v));
}
The problem with OSX and that I’ve had in linux seem to be related to 32bit vs 64bit issues.
I’ve had to change from unsigned int to size_t in several places in the source. I’ve also had to add -fPIC to the waf script when building on 64bit systems.
I’m still trying to fight a missing symbol issue now, as soon as I get it fully working, I’ll clean up my changes and make sure all’s right on 32bit still, and then I’ll post them here.
New release (r18). The most important thing - besides a few minor changes - is probably that juce managed to compile libpandabullet on OSX (using Python 2.5 and 32bit). OSX support is still experimental. Many thanks to juce and morgul for attempting again and again to compile libpandabullet.
My best friend recently downloaded r18, and is getting a strange error when trying to run one of the examples:
Traceback (most recent call last):
File "C:\Users\Exotath\Desktop\libpandabullet-r18\test\09_Character.py", line 23, in <module>
from panda3d.bullet import BulletWorld
File "C:\Panda3D-1.7.0\direct\ffi\panda3d.py", line 145, in _getattr_
mod = self.__manager__.libimport(self.__library__)
File "C:\Panda3D-1.7.0\direct\ffi\panda3d.py", line 126, in libimport
return cls.imp.load_dynamic(name, target)
ImportError: DLL load failed: The specified procedure could not be found.
I guess this is due to RigidBodyNode being attached to the wrong NodePath. When Panda loads a model, it creates a root NodePath, so the model returned by loader always has identity transform. If you then attach the model to your rigidbody’s nodepath, in general case your visible geometry would not match collision geometry.