当前位置: 首页>>代码示例>>Java>>正文


Java CollisionAlgorithmConstructionInfo类代码示例

本文整理汇总了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);
	}
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:23,代码来源:CompoundCollisionAlgorithm.java

示例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;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:20,代码来源:CollisionDispatcher.java

示例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;
	}
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:16,代码来源:ConvexPlaneCollisionAlgorithm.java

示例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;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:12,代码来源:ConvexPlaneCollisionAlgorithm.java

示例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;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:9,代码来源:ConvexConvexAlgorithm.java

示例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;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:8,代码来源:ConvexConvexAlgorithm.java

示例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;
	}
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:10,代码来源:SphereSphereCollisionAlgorithm.java

示例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;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:8,代码来源:SphereSphereCollisionAlgorithm.java

示例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;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:12,代码来源:CollisionDispatcher.java

示例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;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:8,代码来源:ConvexConcaveCollisionAlgorithm.java

示例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;
	}
}
 
开发者ID:warlockcodes,项目名称:Null-Engine,代码行数:15,代码来源:ConvexPlaneCollisionAlgorithm.java

示例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;
}
 
开发者ID:warlockcodes,项目名称:Null-Engine,代码行数:12,代码来源:ConvexPlaneCollisionAlgorithm.java

示例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;
}
 
开发者ID:warlockcodes,项目名称:Null-Engine,代码行数:8,代码来源:ConvexConvexAlgorithm.java

示例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;
	}
}
 
开发者ID:warlockcodes,项目名称:Null-Engine,代码行数:10,代码来源:SphereSphereCollisionAlgorithm.java

示例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);
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:10,代码来源:ConvexConvexAlgorithm.java


注:本文中的com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。