Exemplo n.º 1
0
/*     */   public void setAabb(BroadphaseProxy arg1, Vector3f arg2, Vector3f arg3, Dispatcher arg4)
/*     */   {
/* 201 */     .Stack localStack = .Stack.get();
/*     */     try { localStack.push$javax$vecmath$Vector3f(); DbvtProxy proxy = (DbvtProxy)absproxy;
/* 202 */       DbvtAabbMm aabb = DbvtAabbMm.FromMM(aabbMin, aabbMax, new DbvtAabbMm());
/* 203 */       if (proxy.stage == 2)
/*     */       {
/* 205 */         this.sets[1].remove(proxy.leaf);
/* 206 */         proxy.leaf = this.sets[0].insert(aabb, proxy);
/*     */       }
/* 210 */       else if (DbvtAabbMm.Intersect(proxy.leaf.volume, aabb)) {
/* 211 */         Vector3f delta = localStack.get$javax$vecmath$Vector3f();
/* 212 */         delta.add(aabbMin, aabbMax);
/* 213 */         delta.scale(0.5F);
/* 214 */         delta.sub(proxy.aabb.Center(localStack.get$javax$vecmath$Vector3f()));
/*     */ 
/* 216 */         delta.scale(this.predictedframes);
/* 217 */         this.sets[0].update(proxy.leaf, aabb, delta, 0.05F);
/*     */       }
/*     */       else
/*     */       {
/* 224 */         this.sets[0].update(proxy.leaf, aabb); } 
/*     */ this.stageRoots[proxy.stage] = listremove(proxy, this.stageRoots[proxy.stage]);
/* 229 */       proxy.aabb.set(aabb);
/* 230 */       proxy.stage = this.stageCurrent;
/* 231 */       this.stageRoots[this.stageCurrent] = listappend(proxy, this.stageRoots[this.stageCurrent]);
/*     */       return; } finally { localStack.pop$javax$vecmath$Vector3f(); } throw finally;
/*     */   }
Exemplo n.º 2
0
/*     */   public BroadphaseProxy createProxy(Vector3f aabbMin, Vector3f aabbMax, BroadphaseNativeType shapeType, Object userPtr, short collisionFilterGroup, short collisionFilterMask, Dispatcher dispatcher, Object multiSapProxy) {
/* 178 */     DbvtProxy proxy = new DbvtProxy(userPtr, collisionFilterGroup, collisionFilterMask);
/* 179 */     DbvtAabbMm.FromMM(aabbMin, aabbMax, proxy.aabb);
/* 180 */     proxy.leaf = this.sets[0].insert(proxy.aabb, proxy);
/* 181 */     proxy.stage = this.stageCurrent;
/* 182 */     proxy.uniqueId = (++this.gid);
/* 183 */     this.stageRoots[this.stageCurrent] = listappend(proxy, this.stageRoots[this.stageCurrent]);
/* 184 */     return proxy;
/*     */   }