• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Dispatcher类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.bulletphysics.collision.broadphase.Dispatcher的典型用法代码示例。如果您正苦于以下问题:Java Dispatcher类的具体用法?Java Dispatcher怎么用?Java Dispatcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Dispatcher类属于com.bulletphysics.collision.broadphase包,在下文中一共展示了Dispatcher类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: updateActivationState

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void updateActivationState(CollisionWorld colWorld, Dispatcher dispatcher) {
	initUnionFind(colWorld.getCollisionObjectArray().size());

	// put the index into m_controllers into m_tag	
	{
		int index = 0;
		int i;
		for (i = 0; i < colWorld.getCollisionObjectArray().size(); i++) {
			CollisionObject collisionObject = colWorld.getCollisionObjectArray().getQuick(i);
			collisionObject.setIslandTag(index);
			collisionObject.setCompanionId(-1);
			collisionObject.setHitFraction(1f);
			index++;
		}
	}
	// do the union find

	findUnions(dispatcher, colWorld);
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:20,代码来源:SimulationIslandManager.java


示例2: DiscreteDynamicsWorld

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public DiscreteDynamicsWorld (Dispatcher dispatcher, BroadphaseInterface pairCache, ConstraintSolver constraintSolver,
	CollisionConfiguration collisionConfiguration) {
	super(dispatcher, pairCache, collisionConfiguration);
	this.constraintSolver = constraintSolver;

	if (this.constraintSolver == null) {
		this.constraintSolver = new SequentialImpulseConstraintSolver();
		ownsConstraintSolver = true;
	} else {
		ownsConstraintSolver = false;
	}

	{
		islandManager = new SimulationIslandManager();
	}

	ownsIslandManager = true;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:19,代码来源:DiscreteDynamicsWorld.java


示例3: DiscreteDynamicsWorld

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public DiscreteDynamicsWorld(Dispatcher dispatcher, BroadphaseInterface pairCache, ConstraintSolver constraintSolver, CollisionConfiguration collisionConfiguration) {
	super(dispatcher, pairCache, collisionConfiguration);
	this.constraintSolver = constraintSolver;

	if (this.constraintSolver == null) {
		this.constraintSolver = new SequentialImpulseConstraintSolver();
		ownsConstraintSolver = true;
	}
	else {
		ownsConstraintSolver = false;
	}

	{
		islandManager = new SimulationIslandManager();
	}

	ownsIslandManager = true;
}
 
开发者ID:warlockcodes,项目名称:Null-Engine,代码行数:19,代码来源:DiscreteDynamicsWorld.java


示例4: updateActivationState

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void updateActivationState(CollisionWorld colWorld, Dispatcher dispatcher) {
	initUnionFind(colWorld.getCollisionObjectArray().size());

	// put the index into m_controllers into m_tag	
	{
		int index = 0;
		int i;
		for (i = 0; i < colWorld.getCollisionObjectArray().size(); i++) {
			CollisionObject collisionObject = colWorld.getCollisionObjectArray().get(i);
			collisionObject.setIslandTag(index);
			collisionObject.setCompanionId(-1);
			collisionObject.setHitFraction(1f);
			index++;
		}
	}
	// do the union find

	findUnions(dispatcher, colWorld);
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:20,代码来源:SimulationIslandManager.java


示例5: removeOverlappingObjectInternal

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
/**
 * This method is mainly for expert/internal use only.
 */
public void removeOverlappingObjectInternal(BroadphaseProxy otherProxy, Dispatcher dispatcher, BroadphaseProxy thisProxy) {
	CollisionObject otherObject = (CollisionObject) otherProxy.clientObject;
	assert(otherObject != null);
	
	int index = overlappingObjects.indexOf(otherObject);
	if (index != -1) {
		overlappingObjects.set(index, overlappingObjects.getQuick(overlappingObjects.size()-1));
		overlappingObjects.removeQuick(overlappingObjects.size()-1);
	}
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:14,代码来源:GhostObject.java


示例6: findUnions

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void findUnions(Dispatcher dispatcher, CollisionWorld colWorld) {
	ObjectArrayList<BroadphasePair> pairPtr = colWorld.getPairCache().getOverlappingPairArray();
	for (int i=0; i<pairPtr.size(); i++) {
		BroadphasePair collisionPair = pairPtr.getQuick(i);
		
		CollisionObject colObj0 = (CollisionObject) collisionPair.pProxy0.clientObject;
		CollisionObject colObj1 = (CollisionObject) collisionPair.pProxy1.clientObject;

		if (((colObj0 != null) && ((colObj0).mergesSimulationIslands())) &&
				((colObj1 != null) && ((colObj1).mergesSimulationIslands()))) {
			unionFind.unite((colObj0).getIslandTag(), (colObj1).getIslandTag());
		}
	}
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:15,代码来源:SimulationIslandManager.java


示例7: performDiscreteCollisionDetection

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void performDiscreteCollisionDetection () {
	BulletStats.pushProfile("performDiscreteCollisionDetection");
	try {
		// DispatcherInfo dispatchInfo = getDispatchInfo();

		updateAabbs();

		BulletStats.pushProfile("calculateOverlappingPairs");
		try {
			broadphasePairCache.calculateOverlappingPairs(dispatcher1);
		} finally {
			BulletStats.popProfile();
		}

		Dispatcher dispatcher = getDispatcher();
		{
			BulletStats.pushProfile("dispatchAllCollisionPairs");
			try {
				if (dispatcher != null) {
					dispatcher.dispatchAllCollisionPairs(broadphasePairCache.getOverlappingPairCache(), dispatchInfo, dispatcher1);
				}
			} finally {
				BulletStats.popProfile();
			}
		}
	} finally {
		BulletStats.popProfile();
	}
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:30,代码来源:CollisionWorld.java


示例8: ConvexTriangleCallback

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public ConvexTriangleCallback(Dispatcher dispatcher, CollisionObject body0, CollisionObject body1, boolean isSwapped) {
	this.dispatcher = dispatcher;
	this.dispatchInfoPtr = null;

	convexBody = isSwapped ? body1 : body0;
	triBody = isSwapped ? body0 : body1;

	//
	// create the manifold from the dispatcher 'manifold pool'
	//
	manifoldPtr = dispatcher.getNewManifold(convexBody, triBody);

	clearCache();
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:15,代码来源:ConvexTriangleCallback.java


示例9: removeOverlappingObjectInternal

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
@Override
public void removeOverlappingObjectInternal(BroadphaseProxy otherProxy, Dispatcher dispatcher, BroadphaseProxy thisProxy1) {
	CollisionObject otherObject = (CollisionObject)otherProxy.clientObject;
	BroadphaseProxy actualThisProxy = thisProxy1 != null? thisProxy1 : getBroadphaseHandle();
	assert(actualThisProxy != null);

	assert (otherObject != null);
	int index = overlappingObjects.indexOf(otherObject);
	if (index != -1) {
		overlappingObjects.setQuick(index, overlappingObjects.getQuick(overlappingObjects.size()-1));
		overlappingObjects.removeQuick(overlappingObjects.size()-1);
		hashPairCache.removeOverlappingPair(actualThisProxy, otherProxy, dispatcher);
	}
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:15,代码来源:PairCachingGhostObject.java


示例10: dispatchAllCollisionPairs

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
@Override
public void dispatchAllCollisionPairs(OverlappingPairCache pairCache, DispatcherInfo dispatchInfo, Dispatcher dispatcher) {
	//m_blockedForChanges = true;
	collisionPairCallback.init(dispatchInfo, this);
	pairCache.processAllOverlappingPairs(collisionPairCallback, dispatcher);
	//m_blockedForChanges = false;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:8,代码来源:CollisionDispatcher.java


示例11: removeOverlappingPair

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public Object removeOverlappingPair(BroadphaseProxy proxy0, BroadphaseProxy proxy1, Dispatcher dispatcher) {
	CollisionObject colObj0 = (CollisionObject)proxy0.clientObject;
	CollisionObject colObj1 = (CollisionObject)proxy1.clientObject;
	GhostObject ghost0 = GhostObject.upcast(colObj0);
	GhostObject ghost1 = GhostObject.upcast(colObj1);
	
	if (ghost0 != null) {
		ghost0.removeOverlappingObjectInternal(proxy1, dispatcher, proxy0);
	}
	if (ghost1 != null) {
		ghost1.removeOverlappingObjectInternal(proxy0, dispatcher, proxy1);
	}
	return null;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:15,代码来源:GhostPairCallback.java


示例12: init

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void init (ContactSolverInfo solverInfo, ConstraintSolver solver,
	ObjectArrayList<TypedConstraint> sortedConstraints, int numConstraints, IDebugDraw debugDrawer, Dispatcher dispatcher) {
	this.solverInfo = solverInfo;
	this.solver = solver;
	this.sortedConstraints = sortedConstraints;
	this.numConstraints = numConstraints;
	this.debugDrawer = debugDrawer;
	this.dispatcher = dispatcher;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:10,代码来源:DiscreteDynamicsWorld.java


示例13: ClosestNotMeConvexResultCallback

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public ClosestNotMeConvexResultCallback (CollisionObject me, Vector3 fromA, Vector3 toA, OverlappingPairCache pairCache,
	Dispatcher dispatcher) {
	super(fromA, toA);
	this.me = me;
	this.pairCache = pairCache;
	this.dispatcher = dispatcher;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:8,代码来源:DiscreteDynamicsWorld.java


示例14: performDiscreteCollisionDetection

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void performDiscreteCollisionDetection() {
	BulletStats.pushProfile("performDiscreteCollisionDetection");
	try {
		//DispatcherInfo dispatchInfo = getDispatchInfo();

		updateAabbs();

		BulletStats.pushProfile("calculateOverlappingPairs");
		try {
			broadphasePairCache.calculateOverlappingPairs(dispatcher1);
		}
		finally {
			BulletStats.popProfile();
		}

		Dispatcher dispatcher = getDispatcher();
		{
			BulletStats.pushProfile("dispatchAllCollisionPairs");
			try {
				if (dispatcher != null) {
					dispatcher.dispatchAllCollisionPairs(broadphasePairCache.getOverlappingPairCache(), dispatchInfo, dispatcher1);
				}
			}
			finally {
				BulletStats.popProfile();
			}
		}
	}
	finally {
		BulletStats.popProfile();
	}
}
 
开发者ID:warlockcodes,项目名称:Null-Engine,代码行数:33,代码来源:CollisionWorld.java


示例15: init

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void init(ContactSolverInfo solverInfo, ConstraintSolver solver, ObjectArrayList<TypedConstraint> sortedConstraints, int numConstraints, IDebugDraw debugDrawer, Dispatcher dispatcher) {
	this.solverInfo = solverInfo;
	this.solver = solver;
	this.sortedConstraints = sortedConstraints;
	this.numConstraints = numConstraints;
	this.debugDrawer = debugDrawer;
	this.dispatcher = dispatcher;
}
 
开发者ID:warlockcodes,项目名称:Null-Engine,代码行数:9,代码来源:DiscreteDynamicsWorld.java


示例16: findUnions

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void findUnions(Dispatcher dispatcher, CollisionWorld colWorld) {
	List<BroadphasePair> pairPtr = colWorld.getPairCache().getOverlappingPairArray();
	for (int i=0; i<pairPtr.size(); i++) {
		BroadphasePair collisionPair = pairPtr.get(i);
		
		CollisionObject colObj0 = (CollisionObject) collisionPair.pProxy0.clientObject;
		CollisionObject colObj1 = (CollisionObject) collisionPair.pProxy1.clientObject;

		if (((colObj0 != null) && ((colObj0).mergesSimulationIslands())) &&
				((colObj1 != null) && ((colObj1).mergesSimulationIslands()))) {
			unionFind.unite((colObj0).getIslandTag(), (colObj1).getIslandTag());
		}
	}
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:15,代码来源:SimulationIslandManager.java


示例17: init

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public void init(ContactSolverInfo solverInfo, ConstraintSolver solver, List<TypedConstraint> sortedConstraints, int numConstraints, IDebugDraw debugDrawer, Dispatcher dispatcher) {
	this.solverInfo = solverInfo;
	this.solver = solver;
	this.sortedConstraints = sortedConstraints;
	this.numConstraints = numConstraints;
	this.debugDrawer = debugDrawer;
	this.dispatcher = dispatcher;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:9,代码来源:DiscreteDynamicsWorld.java


示例18: CollisionWorld

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
/** This constructor doesn't own the dispatcher and paircache/broadphase. */
public CollisionWorld (Dispatcher dispatcher, BroadphaseInterface broadphasePairCache,
	CollisionConfiguration collisionConfiguration) {
	this.dispatcher1 = dispatcher;
	this.broadphasePairCache = broadphasePairCache;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:7,代码来源:CollisionWorld.java


示例19: getDispatcher

import com.bulletphysics.collision.broadphase.Dispatcher; //导入依赖的package包/类
public Dispatcher getDispatcher () {
	return dispatcher1;
}
 
开发者ID:vbousquet,项目名称:libgdx-jbullet,代码行数:4,代码来源:CollisionWorld.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java KettleDatabaseBatchException类代码示例发布时间:2022-05-22
下一篇:
Java FoldManagerFactory类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap