示例#1
0
 private void removeGhostObject(PhysicsGhostObject node) {
   if (!physicsGhostObjects.containsKey(node.getObjectId())) {
     logger.log(
         Level.WARNING, "GhostObject {0} does not exist in PhysicsSpace, cannot remove.", node);
     return;
   }
   physicsGhostObjects.remove(node.getObjectId());
   logger.log(
       Level.FINE,
       "Removing ghost object {0} from physics space.",
       Long.toHexString(node.getObjectId()));
   removeCollisionObject(physicsSpaceId, node.getObjectId());
 }
示例#2
0
 private void addGhostObject(PhysicsGhostObject node) {
   if (physicsGhostObjects.containsKey(node.getObjectId())) {
     logger.log(
         Level.WARNING, "GhostObject {0} already exists in PhysicsSpace, cannot add.", node);
     return;
   }
   physicsGhostObjects.put(node.getObjectId(), node);
   logger.log(
       Level.FINE,
       "Adding ghost object {0} to physics space.",
       Long.toHexString(node.getObjectId()));
   addCollisionObject(physicsSpaceId, node.getObjectId());
 }