PhysicsParticleManager

Hi all,

Ive just finished the PhysicsParticleManager. Its in CVS now, theres a test too. A floating sphere, just as promised.



Please test and report any bugs. You know, the usual :slight_smile:



I think all thats left for v0.5 is ragdolls. I’l see what i can do about that.



DP

updated didn’t find anything new

http://cvs.sourceforge.net/viewcvs.py/jme-physics/jmephysics/src/jmextest/physics/



http://cvs.sourceforge.net/viewcvs.py/jme-physics/jmephysics/src/com/jmex/physics/effects/particles/



Theyve been there for 2 days now :slight_smile:



DP

strange! I tried several time last night again this morming but tonight it updates



ghosts perhaps!!! :wink:



on arelated saw the ragdoll stuff test complies but doesn’t work crashes with these errors


Humanoid must have 11 limbs!
at com.jmex.physics.ragdoll.Humanoid.<init>(Humanoid.java:75)
at jmextest.physics.ragdoll.RagdollTest.initRagdoll(RagdollTest.java:150)
at jmextest.physics.ragdoll.RagdollTest.simpleInitGame(RagdollTest.java:84)
at com.jme.app.SimpleGame.initGame(SimpleGame.java:342)
at com.jme.app.BaseGame.start(BaseGame.java:63)
at jmextest.physics.ragdoll.RagdollTest.main(RagdollTest.java:182)
Mar 30, 2005 7:52:44 PM com.jme.app.SimpleGame cleanup
INFO: Cleaning up resources.
Mar 30, 2005 7:52:44 PM com.jme.app.BaseGame start
INFO: Application ending.

yer, i know about it. Per is taking a break from developing anything cause of his school work, but he commited what he had of ragdolls before he went so i can finish them.



So thats why the “testThatDoesn’tWork” is in CVS :slight_smile:



DP

Maybe you should put a build file in there for ant? Something like this:

<project name="jME Physics" default="jar" basedir=".">

    <property name="src" value="src"/>
    <property name="build" value="build"/>
    <property name="deploy" value="target"/>
    <property name="javadoc" value="javadoc"/>

    <path id="build.classpath">
        <pathelement location="${build}"/>
    </path>

   
    <target name="prepare" description="creates build and deploy directories">
        <mkdir dir="${build}"/>
        <mkdir dir="${deploy}"/>
        <tstamp/>
    </target>

    <target name="deploy" depends="compile,jar" description="builds and puts jar file in deploy directory."/>

    <target name="clean" description="Removes build and deploy directories">
        <delete dir="${build}"/>
        <delete dir="${deploy}"/>
        <delete>
            <fileset dir="." casesensitive="no" includes="**/thumbs.db"/>
        </delete>
    </target>


    <target name="compile" description="Compiles source into build directory" depends="prepare">
        <javac srcdir="${src}" destdir="${build}" optimize="true" debug="false">
            <classpath refid="build.classpath"/>
        </javac>
    </target>
   
   <target name="javadoc" depends="compile" description="generate javadocs from sourcecode" >
      <mkdir dir="${javadoc}" />
      <javadoc sourcepath="${src}" source="1.4" destdir="${javadoc}" packagenames="*" >
         <link href="http://java.sun.com/j2se/1.4.2/docs/api/" />
         <classpath refid="build.classpath"/>
      </javadoc>
  </target>
   
    <target name="jar" description="Jars the library" depends="compile">
        <jar destfile="${deploy}/jmephysics.jar">
            <fileset dir="${build}"/>
            <!--<fileset dir="samplemodels"/>-->
            <!-- <fileset dir="${src}"/> -->
            <manifest>
                <attribute name="Title" value="jME Physics"/>
            </manifest>
        </jar>
    </target>
</project>



Edit: changed it to prevent deletion of current directory. Sorry sorry sorry!!!

Hello, Your PhysicsParticleSystemTest gives me some headaches on linux.

There is an import of jmetest.effects.RenParticleEditor in it and this is used for the following statement:


// texture
ts.setTexture(TextureManager.loadTexture(RenParticleEditor.class
            .getClassLoader().getResource(
            "jmetest/data/texture/flaresmall.jpg"),
            Texture.MM_LINEAR_LINEAR, Texture.FM_LINEAR));


This doesn't compile on my linux box as it states:


init:
deps-jar:
Compiling 1 source file to /home/sam/project/JME/jme-physics/jmephysics/build/classes
/home/sam/project/JME/jme-physics/jmephysics/src/jmextest/physics/PhysicsParticleSystemTest.java:33: package jmetest.effects does not exist
import jmetest.effects.RenParticleEditor;
/home/sam/project/JME/jme-physics/jmephysics/src/jmextest/physics/PhysicsParticleSystemTest.java:120: cannot find symbol
symbol  : class RenParticleEditor
location: class jmextest.physics.PhysicsParticleSystemTest
        ts.setTexture(TextureManager.loadTexture(RenParticleEditor.class
2 errors
BUILD FAILED (total time: 1 second)


I am not able to set up a working classpath with this ??? but it works like a charm if i throw out the import and substitute
RenParticleEditor.class.getClassLoader().getResource(...
with:
PhysicsParticleSystemTest.class.getClassLoader().getResource(...

Can You please change this in CVS as it seem not to make any difference in this example.

yeah, that’s just a copy/paste thing, not intentional I’m sure.

yer, what renanse said 8)



in CVS

itistoday, thanks for your build file. It just deleted ALL the work ive been working on since 0.4 that hasn’t made it to cvs :’(



The clean method:



<delete dir="${deploy}"/>



and deploy = "."

Great! Learn from uncle DP, never ever copy/paste, he's fallen for it three times now.

DP

Ugh, that sucks. You might try using a file undeletion tool to retrieve it. WinUndelete is pretty good.

thanks renanse, just tried that. It got me back my POV-Ray colors.ini file from a bad system restore…But i didn’t get back the physics stuff



Oh well, i have most of the stuff memorised anyway :wink: Should be back to normal/better soon.



DP

meh, dont worry about it. Happens to the best of us…Anyways, ive modified yours, and added two build files to CVS. One for the jar, and one for the tests. Enjoy!



PS. I never got any of it back, POV-Ray is a ray tracing program to create images and such, google for it, its brilliant!



DP