Jmephysics fail to compile

Most recent CVS jmephysics downloaded from
failed to compile thoroughly.


1)  around line 155-175

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

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

    public int getType() {
        return 0; // nothing

    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) 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)  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]


1)  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( );


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

no solution yet

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

        if ( showDepth ) {
            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

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

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
     [echo] using jME base dir "/home/jiapei/MyPrograms/Eclipse/jME"
    [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/ 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/ 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

/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?


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][]=jmephysics (Scroll down to “Retrieving JME Physics 2 and Correcting Build Path problems”) or watch this youtube video