Jmephysics fail to compile


Most recent CVS jmephysics downloaded from https://jmephysics.dev.java.net/source/browse/jmephysics/
failed to compile thoroughly.

com.jmex.physics


1) PhysicsCollisionGeometry.java  around line 155-175

    @Override
    public void findCollisions( Spatial scene, CollisionResults results ) {
        // TODO: should this collide with other scenegraph objects?
    }

    @Override
    public void findPick( Ray toTest, PickResults results ) {
        // TODO: should this be pickable
    }

    @Override
    public int getType() {
        return 0; // nothing
    }

    @Override
    public boolean hasCollision( Spatial scene, boolean checkTriangles ) {
        // TODO: should this collide with other scenegraph objects?
        return false;
    }

All above four functions give "Cannot override the final method from Spatial"

[color=red]My solution is just comment all these 4 functions.[/color]

2) PhysicsDebugger.java around line
a) around 197-200

my solution is
        //line.setColorBuffer( 0, null );
        line.setColorBuffer( null );
        //line.setLightCombineMode( LightState.OFF );
        line.setLightCombineMode( LightCombineMode.Off );

b) around line 286

            //triMesh.setColorBuffer( 0, null );
            triMesh.setColorBuffer( null );

c) around line 335-348

    private static void lineTo( Vector3f geometryPivot ) {
        //BufferUtils.setInBuffer( geometryPivot, line.getVertexBuffer( 0 ), 1 );
       BufferUtils.setInBuffer( geometryPivot, line.getVertexBuffer( ), 1 );
    }

    private static void lineFrom( Vector3f from ) {
        //BufferUtils.setInBuffer( from, line.getVertexBuffer( 0 ), 0 );
       BufferUtils.setInBuffer( from, line.getVertexBuffer( ), 0 );
    }

    public static void setupDebugGeom( Geometry debugShape ) {
        debugShape.setRenderQueueMode( Renderer.QUEUE_SKIP );
        //debugShape.setColorBuffer( 0, null );
        debugShape.setColorBuffer( null );
        //debugShape.setLightCombineMode( LightState.OFF );
        debugShape.setLightCombineMode( LightCombineMode.Off );
    }

3) PhysicsNode.java  around line 244
BoundingVolume bound = geometry.getBatch( 0 ).getModelBound(); //TODO: support multiple batches

The method getBatch(int) is undefined for the type Geometry

[color=red]This is a todo job, but it seems it has never been done ...[/color]




com.jmex.physics.geometry


1) TriMeshMassProperties.java  around line 109-111

//        FloatBuffer pts = mesh.getVertexBuffer( 0 );
//        FloatBuffer normals = mesh.getNormalBuffer( 0 );
//        IntBuffer indices = mesh.getIndexBuffer( 0 );
        FloatBuffer pts = mesh.getVertexBuffer( );
        FloatBuffer normals = mesh.getNormalBuffer( );
        IntBuffer indices = mesh.getIndexBuffer( );



com.jmex.physics.util


1) PhysicsPicker.java line 231
Spatial target = data.getTargetMesh().getParentGeom();

no solution yet

2) SimplePhysicsGame.java around line 190-196
        /** Draw the fps node to show the fancy information at the bottom. */
        r.draw( fpsNode );

        if ( showDepth ) {
            r.renderQueue();
            Debugger.drawBuffer( Texture.RTT_SOURCE_DEPTH, Debugger.NORTHEAST, r );
        }

no solution yet




I'm just wondering, is there a fully compilabe version of jmephysics right now?
Is there anybody who is still maintaining this jmephysics?

Best Regards
JIA

Don’t use the CVS, use the svn code on google code.



http://code.google.com/p/jmephysics/

Thank you so much for you prompt reply.

Now, I downloaded Google SVN for compilation, but ant build from within Eclipse gives me the following error messages:

(BTW, I didn't change anything this time and import all files directly into Eclipse project.)



Buildfile: /home/jiapei/MyPrograms/Eclipse/jmephysics/ant/build.xml
init:
     [echo] using jME base dir "/home/jiapei/MyPrograms/Eclipse/jME"
compile.module.physics.production:
compile.module.physics.tests:
compile.module.physics:
compile.module.physics.ode.production:
    [javac] Compiling 51 source files to /home/jiapei/MyPrograms/Eclipse/jmephysics/impl/ode/classes
    [javac] /home/jiapei/MyPrograms/Eclipse/jmephysics/impl/ode/src/com/jmex/physics/impl/ode/DynamicPhysicsNodeImpl.java:35: package com.jme.math does not exist
    [javac] import com.jme.math.Quaternion;
    [javac]                    ^
    [javac] /home/jiapei/MyPrograms/Eclipse/jmephysics/impl/ode/src/com/jmex/physics/impl/ode/DynamicPhysicsNodeImpl.java:36: package com.jme.math does not exist
    [javac] import com.jme.math.Vector3f;
    [javac]                    ^
    [javac] /home/jiapei/MyPrograms/Eclipse/jmephysics/impl/ode/src/com/jmex/physics/impl/ode
...


BUILD FAILED
/home/jiapei/MyPrograms/Eclipse/jmephysics/ant/module_physics.ode.xml:85: Compile failed; see the compiler error output for details.

Total time: 1 second




Are you able to compile the direct download jmephysics?

I tried all 4 ant .xml files, none is able to be built.

How to organize projects of jme, jmephysics, jbullet? etc?

Cheers
JIA

Hmmm, I’m not to keen on ant builds within Eclipse, but this will get you setup for Eclipse, at least this is how I do it.

=jmephysics]http://www.jmonkeyengine.com/wiki/doku.php/setting_up_eclipse_to_build_jme_2?s[]=jmephysics (Scroll down to “Retrieving JME Physics 2 and Correcting Build Path problems”) or watch this youtube video http://www.youtube.com/watch?v=hzk91kfNbjQ