/Users/fruini/Desktop/ODE/irrOde_test_Xcode/main.cpp: In function 'int main(int, char**)':
/Users/fruini/Desktop/ODE/irrOde_test_Xcode/main.cpp:50: error: no matching function for call to 'irr::ode::CIrrOdeGeomBox::getSurfaceParameters()'
/usr/local/include/irrOde/geom/CIrrOdeGeom.h:102: note: candidates are: virtual irr::ode::CIrrOdeSurfaceParameters* irr::ode::CIrrOdeGeom::getSurfaceParameters(irr::u32)
/Users/fruini/Desktop/ODE/irrOde_test_Xcode/main.cpp:51: error: no matching function for call to 'irr::ode::CIrrOdeGeomBox::getSurfaceParameters()'
/usr/local/include/irrOde/geom/CIrrOdeGeom.h:102: note: candidates are: virtual irr::ode::CIrrOdeSurfaceParameters* irr::ode::CIrrOdeGeom::getSurfaceParameters(irr::u32)
/Users/fruini/Desktop/ODE/irrOde_test_Xcode/main.cpp:70: error: no matching function for call to 'irr::ode::CIrrOdeGeomSphere::getSurfaceParameters()'
/usr/local/include/irrOde/geom/CIrrOdeGeom.h:102: note: candidates are: virtual irr::ode::CIrrOdeSurfaceParameters* irr::ode::CIrrOdeGeom::getSurfaceParameters(irr::u32)
/Users/fruini/Desktop/ODE/irrOde_test_Xcode/main.cpp:71: error: no matching function for call to 'irr::ode::CIrrOdeGeomSphere::getSurfaceParameters()'
/usr/local/include/irrOde/geom/CIrrOdeGeom.h:102: note: candidates are: virtual irr::ode::CIrrOdeSurfaceParameters* irr::ode::CIrrOdeGeom::getSurfaceParameters(irr::u32)
bx->getSurfaceParameters()->setBounce(1.0f);
bx->getSurfaceParameters()->setModeBounce(true);
pSphere->getSurfaceParameters()->setBounce(1.0f);
pSphere->getSurfaceParameters()->setModeBounce(true);run
[Switching to process 8685]
Running…
Irrlicht Engine version 1.7.1
Darwin Kernel Version 10.3.1: Mon Mar 22 15:13:15 PDT 2010; root:xnu-1504.3.52~1/RELEASE_I386
Using renderer: OpenGL 2.1
NVIDIA GeForce GT 330M OpenGL Engine: NVIDIA Corporation
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Could not load a texture for entry in 3ds file: cube1_au.bmp
Loaded mesh: /Users/fruini/Desktop/ODE/irrOde_test_Xcode/box.3ds
Loaded texture: /Users/fruini/Desktop/ODE/irrOde_test_Xcode/box0.jpg
Could not load a texture for entry in 3ds file: sphere1_.bmp
Loaded mesh: /Users/fruini/Desktop/ODE/irrOde_test_Xcode/sphere.3ds
Loaded texture: /Users/fruini/Desktop/ODE/irrOde_test_Xcode/sphere0.jpg
CIrrOdeGeomBox::initPhysics: getting size from parent node
CIrrOdeGeomBox::initPhysics: size=(30.00, 3.00, 30.00)
ODE INTERNAL ERROR 1: assertion "bNormalizationResult" failed in _dNormalize4() [../../include/ode/odemath.h]
Program received signal: “SIGABRT”.
sharedlibrary apply-load-rules all
Xcode could not locate source file: odemath.h (line: 326)
(gdb)
Brainsaw wrote:@fabietto: Damnit. The "getSurfaceParameters" method signature changed a while back. The CIrrOdeGeomTrimesh does now have several sets of surface parameters, one for each material of the node it represents. It should work if you pass "0" as paremeter. Try it again this way, maybe the normaliation failure is also fixed this way. Which ODE version are you using? The wrapper is currently made for 0.11.1, the latest stable release.
Brainsaw wrote:@Darkcoder: I just uploaded a new version. If you use the car of the IrrOdeCar demo you can press "R" and one of the ramps is removed. Unfortunately I don't know a way to detect if a complete subtree of the scene graph is removed. Is there a way? Seems that the "remove" method is only called for the scene node that is actually removed, not for it's children. But I added a new method called "removeTreeFromPhysics" which removes a complete subtree from physics. It iterates all children of the passed node, and if it is a descendant of "CIrrOdeSceneNode" it's physics will be removed. It's just a workaround, it would (of course) be better if I detected the removal from the scene graph and removed the ODE stuff as well. It's a static method, you can call it with any node of the scenegraph (check the IrrOdeCar example for details, it's around line 130 in CCar.cpp).
edit: I forgot to compile the latest lib with VC-2008, but I'm going to upload a new version within the next days that does also include VC-2008.
blockNode:setParent( phyWorld )
blockColNode = scene:addSceneNode( "CIrrOdeGeomTrimesh", blockNode )
blockColNode:initPhysics()
irr.ode.CIrrOdeSceneNode.removeTreeFromPhysics( blockNode ) -- Still does nothing
Brainsaw wrote:@fabietto: Hmm ... got no idea where this comes from. I do also see some of these messages, but if you compile ODE with dNODEBUG defined it will just output the warning but not stop the program. It does (normally) run fine with these messages as well.
Brainsaw wrote:@fabietto: are you using a variable or a #define? dNODEBUG is a compiler switch, most IDEs give you an option to define these in some dialog. Which IDE are you using, maybe I can tell you where (if you don't know of course).
Brainsaw wrote:@Darkcoder: the scene of IrrOdeCar is stored in an IrrEdit file (data/IrrOdeCar.xml), and there is an animated mesh scenenode called "ramp2" that gets removed. It works this way and I honestly don't see a reason why it doesn't work with your code. Do you have the possibility to debug into the C++ code?
<node type="CIrrOdeGeomBox">
<attributes>
<string name="Name" value="geomRamp2" />
Brainsaw wrote:@Darkcoder: I fixed the bug. The problem was located in CIrrOdeGeomHeightfield::removeFromPhysics. Normally one CIrrOdeGeom represents one ODE geom, but a static trimesh does (normally) have more than one ODE geom, i.e. one for each material so that it's possible to have varying surface parameters in one static CIrrOdeGeomTrimesh. I had to implement the removeFromPhysics method in CIrrOdeGeomTrimesh to take care of that. Thanks for reporting and helping me with the solution.
P.S.: the ramp in the IrrOdeCar demo that can be removed does now use a trimesh instead of a box.
Return to Project Announcements
Users browsing this forum: No registered users and 0 guests