Java3d collision trace

initial setup

#VRML V2.0 utf8
   DEF blueouter Transform {
   translation -0.5 0.0 0.0
   children [
   Kinematics {
   distance -0.5 0.0 0.0
   velocity 0.01 0.0 0.0
   }
   Dynamics {
   on 0
   actionThis 1
   }
   DEF blueinner Transform {
   bboxCenter 0.0 0.0 0.0
   bboxSize 0.0 0.0 0.0
   children [
   DEF blueshape Shape 
   {
   appearance Appearance 
   {
   material Material {
   diffuseColor 0.0 1.0 1.0
   }
   }
   geometry 
   Box {
   size 0.12 0.12 0.12
   }
   }
   ]
   }
   ]
   }
   DEF redouter Transform {
   translation 0.5 0.0 0.0
   children [
   Dynamics {
   on 0
   actionThis 1
   }
   Kinematics {
   distance 0.5 0.0 0.0
   velocity -0.01 0.0 0.0
   }
   DEF redinner Transform {
   bboxCenter 0.0 0.0 0.0
   bboxSize 0.0 0.0 0.0
   children [
   DEF redshape Shape 
   {
   appearance Appearance 
   {
   material Material {
   diffuseColor 1.0 0.0 1.0
   }
   }
   geometry 
   Box {
   size 0.1 0.1 0.1
   }
   }
   ]
   }
   ]
   }




//        new WakeupOnCollisionEntry(armingPath,WakeupOnCollisionEntry.USE_GEOMETRY);
if (bounds==null) {
criterion =
new WakeupOnCollisionEntry(armingPath,WakeupOnCollisionEntry.USE_BOUNDS);

test1

 

The following test was run with both heading at same speed toward centre:


dynamicsBean.collisionOccured tg=redouter(TransformGroup) athis1
dynamicsBean.collisionOccured other=null aother0
behaviorCollision.processStimulus armingBounds=null
behaviorCollision.processStimulus triggeringBounds=Bounding box: Lower=-0.05000000074505806 -0.05000000074505806 -0.05000000074505806 Upper=0.05000000074505806 0.05000000074505806 0.05000000074505806
behaviorCollision.processStimulus Arming node=javax.media.j3d.TransformGroup@57b46f bean=redouter(TransformGroup)
behaviorCollision.processStimulus nodes=5 triggering node=javax.media.j3d.Shape3D@71c84 bean=null
path=javax.media.j3d.TransformGroup@6152f4 bean=blueinner(TransformGroup)
path=javax.media.j3d.TransformGroup@d1329 bean=blueouter(TransformGroup)
path=javax.media.j3d.TransformGroup@26a29c bean=scene_transform(TransformGroup)
path=javax.media.j3d.BranchGroup@7dc1cb bean=scene_branch mjbModel.branchGroupBean
path=null bean=null


dynamicsBean.collisionOccured tg=blueouter(TransformGroup) athis1
dynamicsBean.collisionOccured other=null aother0
behaviorCollision.processStimulus armingBounds=null
behaviorCollision.processStimulus triggeringBounds=Bounding box: Lower=-0.05000000074505806 -0.05000000074505806 -0.05000000074505806 Upper=0.05000000074505806 0.05000000074505806 0.05000000074505806
behaviorCollision.processStimulus Arming node=javax.media.j3d.TransformGroup@d1329 bean=blueouter(TransformGroup)
behaviorCollision.processStimulus nodes=5 triggering node=javax.media.j3d.Shape3D@3e15f7 bean=null
path=javax.media.j3d.TransformGroup@1410e5 bean=redinner(TransformGroup)
path=javax.media.j3d.TransformGroup@57b46f bean=redouter(TransformGroup)
path=javax.media.j3d.TransformGroup@26a29c bean=scene_transform(TransformGroup)
path=javax.media.j3d.BranchGroup@7dc1cb bean=scene_branch mjbModel.branchGroupBean
path=null bean=null

test2

under Java1.2beta

The following test was run with speed of blue=0, blue detects collision, red does not


dynamicsBean.collisionOccured tg=blueouter(TransformGroup) athis1
dynamicsBean.collisionOccured other=null aother0
behaviorCollision.processStimulus armingBounds=null
behaviorCollision.processStimulus triggeringBounds=Bounding box: Lower=-0.05000000074505806 -0.05000000074505806 -0.05000000074505806 Upper=0.05000000074505806 0.05000000074505806 0.05000000074505806
behaviorCollision.processStimulus Arming node=javax.media.j3d.TransformGroup@28edf2 bean=blueouter(TransformGroup)
behaviorCollision.processStimulus nodes=5 triggering node=javax.media.j3d.Shape3D@1dddba bean=null
path=javax.media.j3d.TransformGroup@47e8a7 bean=redinner(TransformGroup)
path=javax.media.j3d.TransformGroup@7b4703 bean=redouter(TransformGroup)
path=javax.media.j3d.TransformGroup@7c3c84 bean=scene_transform(TransformGroup)
path=javax.media.j3d.BranchGroup@693999 bean=scene_branch mjbModel.branchGroupBean
path=null bean=null

under Java1.1.x

dynamicsBean.collisionOccured tg=blueouter(TransformGroup) athis1
dynamicsBean.collisionOccured other=null aother0
behaviorCollision.processStimulus armingBounds=null
behaviorCollision.processStimulus triggeringBounds=null
behaviorCollision.processStimulus Arming node=javax.media.j3d.TransformGroup@3c48c6e0 bean=blueouter(TransformGroup)
behaviorCollision.processStimulus nodes=4 triggering node=javax.media.j3d.Shape3D@33d0c6e0 bean=null
path=javax.media.j3d.TransformGroup@3258c6e0 bean=redinner(TransformGroup)
path=javax.media.j3d.TransformGroup@31fcc6e0 bean=redouter(TransformGroup)
path=javax.media.j3d.TransformGroup@3cc8c6e0 bean=scene_transform(TransformGroup)
path=javax.media.j3d.BranchGroup@ae10c6ee bean=scene_branch mjbModel.branchGroupBean
dynamicsBean.collisionOccured tg=redouter(TransformGroup) athis1
dynamicsBean.collisionOccured other=null aother0
behaviorCollision.processStimulus armingBounds=null
behaviorCollision.processStimulus triggeringBounds=null
behaviorCollision.processStimulus Arming node=javax.media.j3d.TransformGroup@31fcc6e0 bean=redouter(TransformGroup)
behaviorCollision.processStimulus nodes=4 triggering node=javax.media.j3d.Shape3D@3e58c6e0 bean=null
path=javax.media.j3d.TransformGroup@3ea4c6e0 bean=blueinner(TransformGroup)
path=javax.media.j3d.TransformGroup@3c48c6e0 bean=blueouter(TransformGroup)
path=javax.media.j3d.TransformGroup@3cc8c6e0 bean=scene_transform(TransformGroup)
path=javax.media.j3d.BranchGroup@ae10c6ee bean=scene_branch mjbModel.branchGroupBean

test3

The following test was run with speed of blue=0.001, blue detects collision, red does not


dynamicsBean.collisionOccured tg=blueouter(TransformGroup) athis1
dynamicsBean.collisionOccured other=null aother0
behaviorCollision.processStimulus armingBounds=null
behaviorCollision.processStimulus triggeringBounds=Bounding box: Lower=-0.05000000074505806 -0.05000000074505806 -0.05000000074505806 Upper=0.05000000074505806 0.05000000074505806 0.05000000074505806
behaviorCollision.processStimulus Arming node=javax.media.j3d.TransformGroup@33788d bean=blueouter(TransformGroup)
behaviorCollision.processStimulus nodes=5 triggering node=javax.media.j3d.Shape3D@2fb0af bean=null
path=javax.media.j3d.TransformGroup@78bd0d bean=redinner(TransformGroup)
path=javax.media.j3d.TransformGroup@43bf3d bean=redouter(TransformGroup)
path=javax.media.j3d.TransformGroup@5e293a bean=scene_transform(TransformGroup)
path=javax.media.j3d.BranchGroup@64bb3c bean=scene_branch mjbModel.branchGroupBean
path=null bean=null

 

test 4

criterion = new WakeupOnCollisionExit(bounds);


dynamicsBean.initialize bounds=Bounding box: Lower=-0.4000000059604645 -0.4000000059604645 -0.4000000059604645 Upper=0.4000000059604645 0.4000000059604645 0.4000000059604645 entry=false
dynamicsBean.initialize bounds=Bounding box: Lower=-0.4000000059604645 -0.4000000059604645 -0.4000000059604645 Upper=0.4000000059604645 0.4000000059604645 0.4000000059604645 entry=false
java.lang.NullPointerException
at javax.media.j3d.CollisionThread.start_traverse(Compiled Code)
at javax.media.j3d.CollisionThread.updateCollisionState(Compiled Code)
at javax.media.j3d.CollisionThread.run(CollisionThread.java:1245)