Native bullet ray request (24 posts)

  • Profile picture of Empire Phoenix Empire Phoenix156p said 6 months, 3 weeks ago:

    I want to ask if it is possible to add the rayCast function bullet offers to the wrapper, it is really usefull for larger worlds, as it does a broadphase check before doing aabb checks, and is for some usecases quite faster than the jme one (Especiall if you use high poly grafical models, but a simple physic representation is accurate enough (player vs capsule)).

    If this is not possible (or no time is aviable) i would be glad to get some tips about how the current binding was created, and then try to implement that myself.

    @normen

  • Profile picture of normen normen1271p said 6 months, 3 weeks ago:

    Right, the rayTest and sweepTest are not implemented yet.. You can simply edit the C++ and java code in engine/src/bullet and then try and compile the natives using “ant build-bullet-natives”, you might have to configure the properties in engine/src/bullet to compile properly, see the readme.txt file. There is a project set up (the engine/src/bullet folder itself is the project in this case) that lets you edit the C++ and java code more comfortably in NetBeans (given you downloaded the version that has C++ support or install the plugin), you will have to add the java include folder and the bullet source folder to the global NetBeans C++ code completion settings to get full code checking and completion for the C++ part.

  • Profile picture of Empire Phoenix Empire Phoenix156p said 6 months, 3 weeks ago:

    Well lets see if I get at least the rays to work, if I do I will post svn patch for it.

  • Profile picture of Empire Phoenix Empire Phoenix156p said 6 months, 3 weeks ago:

    Well Netbeans does ignore the includes if I specify them in the tools-option-c++-codeassistance. In fact it shows nothing included at all and the project as freeform. Why is this so?

    (It builds the project without problems however, wtf netbeans, seriously)

  • Profile picture of normen normen1271p said 6 months, 3 weeks ago:

    Lol, self-fulfilling prophecy ^^
    Java is C, not C++, so you have to register the java classes under C. Also the project isn’t built using netbeans but using ant, its not a normal C++ project. Also the java code completion for the bullet subproject will fail because it includes the “normal” bullet classes. This all is due to how I set up the project to easily build using only ant, especially for those that refuse to use other IDE’s :P

  • Profile picture of normen normen1271p said 6 months, 3 weeks ago:

    Do you have any C++ compiler installed btw? If you don’t have includes you probably don’t have any headers.

  • Profile picture of Empire Phoenix Empire Phoenix156p said 6 months, 3 weeks ago:

    g++.exe is in path and works from console,yes. Before I started to modify things I first compiled it without changes with mingw and cmake
    the compiling worked at all the time without problems, only netbeans was … netbeans.

    I’m using notepad++ for the .cpp now and eclipse for ant.
    First success, was able to throw a not implemented exception from the rays in cpp up to java.

    I’m kinda confident I will get this to work.

  • Profile picture of normen normen1271p said 6 months, 3 weeks ago:

    Lol, you see thats what makes me do these videos, no other IDE user group than the Eclipse one has so many issues with NetBeans that they have to mention it in every single post or even before running the application ^^ Never hear anything like this from IntelliJ or BlueJ users or NetBeans users when using Eclipse xD Theres just gotta be some kind of subliminal messages in Eclipse that work on some of its users. I wonder how much time you would spend trying to get such stuff to work in Eclipse. :roll: Ah right, it doesn’t support C++ :P

  • Profile picture of Empire Phoenix Empire Phoenix156p said 6 months, 3 weeks ago:

    It does and it needed me about 5 minutes…

    http://www.eclipse.org/cdt/

    skip the following if you dont want to read flaming, you have been warned.
    But this time I gave netbeans a real try, I tried for over one hour to get stuff to work, that according to documentation should already be working. (im 100% positive that the includes where not set wrong but ignored, I even watched a video tutorial for this, just to be sure) In fact it did not include anything at all, however the codecompletition was set up right. None of the paths there where shown when strg + hover over the #include.

    Funny tho, that I have much less problems working with the powershell and notepad++ than with netbeans (actually I also have no problems working with jbuilder, and vi ( and seriously bluej is not a real ide the users coming from there would probably be happy with notepad, as it surly is a improvement).

  • Profile picture of normen normen1271p said 6 months, 3 weeks ago:

    If no C/C++ compiler is found, code assistance won’t work. You dont really want to explain to me that it doesn’t work at all eh? Of course it does, you just didn’t manage to set it up. Also, you only tried maximum half an hour the first time, look at your post times. I agree that the project structure is a bit complicated and it would probably be easier to set up a normal C++ project with normal includes, but the global includes work fine for java/include and bullet/src. I have no interest in flaming, this whole thread more serves to my amusement, don’t worry.
    P.S. What should “Strg-Hover” do you say? It does nothing over C++ includes.. If you have no red underlines its actually working ^^

  • Profile picture of Empire Phoenix Empire Phoenix156p said 6 months, 3 weeks ago:

    It is found, every path it says in the c++ stuff is absolutly correctly. It just does not care for them. I would make a screenvideo showing you it, but then I would need to install netbeans again. Next time I try something with netbeasn i make a video and comment on every little thing that annyos me while using it.

  • Profile picture of normen normen1271p said 6 months, 3 weeks ago:

    No I believe it didn’t work for you, the force is strong in you young jedi ;)

  • Profile picture of Empire Phoenix Empire Phoenix156p said 6 months, 3 weeks ago:

    Beware the temptation of the dark side (netbeans + macs)^^

  • Profile picture of Empire Phoenix Empire Phoenix156p said 6 months, 2 weeks ago:

    Yay, I will get this to work, first positive results :) Think 2-4 days then I have everything in I want, and cleanup done. (For example the current system the header files are set up does not support cyclic includes (due to missing #ifndef + class definitions in headers (the manual generated ones, the autogenerated need no change of course)), fixing that)

    (Ray test against the brick tower example)
    Doing ray
    RayResult (-0.18252689, -0.80405563, -0.56584316)
    RayResult 0.0
    RayResult brick (Geometry)
    RayResult (-0.21050228, -0.79781574, -0.56495917)
    RayResult 0.0
    RayResult brick (Geometry)
    RayResult (0.0, -1.0, 0.0)
    RayResult 0.0
    RayResult floor (Geometry)
    RayResult (-2.1127876E-4, -0.99999994, 1.6196255E-4)
    RayResult 0.0
    RayResult brick (Geometry)

  • Profile picture of normen normen1271p said 6 months, 2 weeks ago:

    Awesome, good job. You plan to add the sweepTest too?