本文整理汇总了Java中com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo类的典型用法代码示例。如果您正苦于以下问题:Java CollisionAlgorithmConstructionInfo类的具体用法?Java CollisionAlgorithmConstructionInfo怎么用?Java CollisionAlgorithmConstructionInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CollisionAlgorithmConstructionInfo类属于com.bulletphysics.collision.broadphase包,在下文中一共展示了CollisionAlgorithmConstructionInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
public void init(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1, boolean isSwapped) {
super.init(ci);
this.isSwapped = isSwapped;
CollisionObject colObj = isSwapped ? body1 : body0;
CollisionObject otherObj = isSwapped ? body0 : body1;
assert (colObj.getCollisionShape().isCompound());
CompoundShape compoundShape = (CompoundShape) colObj.getCollisionShape();
int numChildren = compoundShape.getNumChildShapes();
int i;
//childCollisionAlgorithms.resize(numChildren);
for (i = 0; i < numChildren; i++) {
CollisionShape tmpShape = colObj.getCollisionShape();
CollisionShape childShape = compoundShape.getChildShape(i);
colObj.internalSetTemporaryCollisionShape(childShape);
childCollisionAlgorithms.add(ci.dispatcher1.findAlgorithm(colObj, otherObj));
colObj.internalSetTemporaryCollisionShape(tmpShape);
}
}
示例2: findAlgorithm
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
@Override
public CollisionAlgorithm findAlgorithm(CollisionObject body0, CollisionObject body1, PersistentManifold sharedManifold) {
CollisionAlgorithmConstructionInfo ci = tmpCI;
ci.dispatcher1 = this;
ci.manifold = sharedManifold;
CollisionAlgorithmCreateFunc createFunc = doubleDispatch[body0.getCollisionShape().getShapeType().ordinal()][body1.getCollisionShape().getShapeType().ordinal()];
CollisionAlgorithm algo = createFunc.createCollisionAlgorithm(ci, body0, body1);
if (algo instanceof EmptyAlgorithm) {
System.out.println(" NO COLLISION ALGO: " + body0.getUserPointer() + " " + body1.getUserPointer());
System.out.println(" NO COLLISION ALGO: " + body0.getCollisionShape().getShapeType() + " " + body1.getCollisionShape().getShapeType());
} else {
// System.out.println("COLLISION ALGO: " + body0.getUserPointer() + " " + body1.getUserPointer());
// System.out.println("COLLISION ALGO: " + body0.getCollisionShape().getShapeType() + " " + body1.getCollisionShape().getShapeType());
// System.out.println("algo = " + algo);
}
algo.internalSetCreateFunc(createFunc);
return algo;
}
示例3: init
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
public void init (PersistentManifold mf, CollisionAlgorithmConstructionInfo ci, CollisionObject col0, CollisionObject col1,
boolean isSwapped) {
super.init(ci);
this.ownManifold = false;
this.manifoldPtr = mf;
this.isSwapped = isSwapped;
CollisionObject convexObj = isSwapped ? col1 : col0;
CollisionObject planeObj = isSwapped ? col0 : col1;
if (manifoldPtr == null && dispatcher.needsCollision(convexObj, planeObj)) {
manifoldPtr = dispatcher.getNewManifold(convexObj, planeObj);
ownManifold = true;
}
}
示例4: createCollisionAlgorithm
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
@Override
public CollisionAlgorithm createCollisionAlgorithm (CollisionAlgorithmConstructionInfo ci, CollisionObject body0,
CollisionObject body1) {
ConvexPlaneCollisionAlgorithm algo = pool.get();
if (!swapped) {
algo.init(null, ci, body0, body1, false);
} else {
algo.init(null, ci, body0, body1, true);
}
return algo;
}
示例5: init
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
public void init (PersistentManifold mf, CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1,
SimplexSolverInterface simplexSolver, ConvexPenetrationDepthSolver pdSolver) {
super.init(ci);
gjkPairDetector.init(null, null, simplexSolver, pdSolver);
this.manifoldPtr = mf;
this.ownManifold = false;
this.lowLevelOfDetail = false;
}
示例6: createCollisionAlgorithm
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
@Override
public CollisionAlgorithm createCollisionAlgorithm (CollisionAlgorithmConstructionInfo ci, CollisionObject body0,
CollisionObject body1) {
ConvexConvexAlgorithm algo = pool.get();
algo.init(ci.manifold, ci, body0, body1, simplexSolver, pdSolver);
return algo;
}
示例7: init
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
public void init (PersistentManifold mf, CollisionAlgorithmConstructionInfo ci, CollisionObject col0, CollisionObject col1) {
super.init(ci);
manifoldPtr = mf;
if (manifoldPtr == null) {
manifoldPtr = dispatcher.getNewManifold(col0, col1);
ownManifold = true;
}
}
示例8: createCollisionAlgorithm
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
@Override
public CollisionAlgorithm createCollisionAlgorithm (CollisionAlgorithmConstructionInfo ci, CollisionObject body0,
CollisionObject body1) {
SphereSphereCollisionAlgorithm algo = pool.get();
algo.init(null, ci, body0, body1);
return algo;
}
示例9: findAlgorithm
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
@Override
public CollisionAlgorithm findAlgorithm(CollisionObject body0, CollisionObject body1, PersistentManifold sharedManifold) {
CollisionAlgorithmConstructionInfo ci = tmpCI;
ci.dispatcher1 = this;
ci.manifold = sharedManifold;
CollisionAlgorithmCreateFunc createFunc = doubleDispatch[body0.getCollisionShape().getShapeType().ordinal()][body1.getCollisionShape().getShapeType().ordinal()];
CollisionAlgorithm algo = createFunc.createCollisionAlgorithm(ci, body0, body1);
algo.internalSetCreateFunc(createFunc);
return algo;
}
示例10: createCollisionAlgorithm
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
@Override
public CollisionAlgorithm createCollisionAlgorithm (CollisionAlgorithmConstructionInfo ci, CollisionObject body0,
CollisionObject body1) {
ConvexConcaveCollisionAlgorithm algo = pool.get();
algo.init(ci, body0, body1, false);
return algo;
}
示例11: init
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
public void init(PersistentManifold mf, CollisionAlgorithmConstructionInfo ci, CollisionObject col0, CollisionObject col1, boolean isSwapped) {
super.init(ci);
this.ownManifold = false;
this.manifoldPtr = mf;
this.isSwapped = isSwapped;
CollisionObject convexObj = isSwapped ? col1 : col0;
CollisionObject planeObj = isSwapped ? col0 : col1;
if (manifoldPtr == null && dispatcher.needsCollision(convexObj, planeObj)) {
manifoldPtr = dispatcher.getNewManifold(convexObj, planeObj);
ownManifold = true;
}
}
示例12: createCollisionAlgorithm
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
@Override
public CollisionAlgorithm createCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1) {
ConvexPlaneCollisionAlgorithm algo = pool.get();
if (!swapped) {
algo.init(null, ci, body0, body1, false);
}
else {
algo.init(null, ci, body0, body1, true);
}
return algo;
}
示例13: init
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
public void init(PersistentManifold mf, CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1, SimplexSolverInterface simplexSolver, ConvexPenetrationDepthSolver pdSolver) {
super.init(ci);
gjkPairDetector.init(null, null, simplexSolver, pdSolver);
this.manifoldPtr = mf;
this.ownManifold = false;
this.lowLevelOfDetail = false;
}
示例14: init
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
public void init(PersistentManifold mf, CollisionAlgorithmConstructionInfo ci, CollisionObject col0, CollisionObject col1) {
super.init(ci);
manifoldPtr = mf;
if (manifoldPtr == null) {
manifoldPtr = dispatcher.getNewManifold(col0, col1);
ownManifold = true;
}
}
示例15: init
import com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo; //导入依赖的package包/类
public void init(PersistentManifold mf, CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1, SimplexSolverInterface simplexSolver, ConvexPenetrationDepthSolver pdSolver) {
super.init(ci);
this.simplexSolver = simplexSolver;
this.pdSolver = pdSolver;
this.manifoldPtr = mf;
this.ownManifold = false;
this.lowLevelOfDetail = false;
gjkPairDetector.init(null, null, simplexSolver, pdSolver);
}