本文整理汇总了C#中BulletSharp.Dispatcher类的典型用法代码示例。如果您正苦于以下问题:C# Dispatcher类的具体用法?C# Dispatcher怎么用?C# Dispatcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Dispatcher类属于BulletSharp命名空间,在下文中一共展示了Dispatcher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddHandleRef
public ushort AddHandleRef(ref Vector3 aabbMin, ref Vector3 aabbMax, IntPtr pOwner,
short collisionFilterGroup, short collisionFilterMask,
Dispatcher dispatcher, IntPtr multiSapProxy)
{
return btAxisSweep3_addHandle(_native, ref aabbMin, ref aabbMax, pOwner,
collisionFilterGroup, collisionFilterMask, dispatcher._native, multiSapProxy);
}
示例2: CreateProxy
public override BroadphaseProxy CreateProxy(ref Vector3 aabbMin,
ref Vector3 aabbMax, int shapeType, IntPtr userPtr, short collisionFilterGroup,
short collisionFilterMask, Dispatcher dispatcher, IntPtr multiSapProxy)
{
//throw new NotImplementedException();
return new BroadphaseProxy(btBroadphaseInterface_createProxy(_native, ref aabbMin, ref aabbMax, shapeType, userPtr, collisionFilterGroup, collisionFilterMask, dispatcher._native, multiSapProxy));
}
示例3: BulletPhysicWorld
public BulletPhysicWorld(Vector3 gravity,Dispatcher dispatcher, BroadphaseInterface pairCache, ConstraintSolver constraintSolver, CollisionConfiguration collisionConfiguration)
{
objs = new List<IPhysicObject>();
ctns = new List<IPhysicConstraint>();
world = new DiscreteDynamicsWorld(dispatcher, pairCache, constraintSolver, collisionConfiguration);
world.Gravity = gravity;
}
示例4: DiscreteDynamicsWorld
public DiscreteDynamicsWorld(Dispatcher dispatcher, BroadphaseInterface pairCache,
ConstraintSolver constraintSolver, CollisionConfiguration collisionConfiguration)
: base(btDiscreteDynamicsWorld_new(dispatcher != null ? dispatcher._native : IntPtr.Zero, pairCache != null ? pairCache._native : IntPtr.Zero,
constraintSolver != null ? constraintSolver._native : IntPtr.Zero, collisionConfiguration != null ? collisionConfiguration._native : IntPtr.Zero))
{
_constraintSolver = constraintSolver;
Dispatcher = dispatcher;
Broadphase = pairCache;
}
示例5: SetAabbForceUpdate
public unsafe static void SetAabbForceUpdate(this DbvtBroadphase obj, BroadphaseProxy absproxy, ref OpenTK.Vector3 aabbMin, ref OpenTK.Vector3 aabbMax, Dispatcher __unnamed3)
{
fixed (OpenTK.Vector3* aabbMinPtr = &aabbMin)
{
fixed (OpenTK.Vector3* aabbMaxPtr = &aabbMax)
{
obj.SetAabbForceUpdate(absproxy, ref *(BulletSharp.Math.Vector3*)aabbMinPtr, ref *(BulletSharp.Math.Vector3*)aabbMaxPtr, __unnamed3);
}
}
}
示例6: MultiBodyDynamicsWorld
public MultiBodyDynamicsWorld(Dispatcher dispatcher, BroadphaseInterface pairCache, MultiBodyConstraintSolver constraintSolver, CollisionConfiguration collisionConfiguration)
: base(btMultiBodyDynamicsWorld_new(dispatcher._native, pairCache._native, constraintSolver._native, collisionConfiguration._native))
{
_constraintSolver = constraintSolver;
_dispatcher = dispatcher;
_broadphase = pairCache;
_bodies = new List<MultiBody>();
_constraints = new List<MultiBodyConstraint>();
}
示例7: CreateProxy
public unsafe static BroadphaseProxy CreateProxy(this BroadphaseInterface obj, ref OpenTK.Vector3 aabbMin, ref OpenTK.Vector3 aabbMax, int shapeType, IntPtr userPtr, short collisionFilterGroup, short collisionFilterMask, Dispatcher dispatcher, IntPtr multiSapProxy)
{
fixed (OpenTK.Vector3* aabbMinPtr = &aabbMin)
{
fixed (OpenTK.Vector3* aabbMaxPtr = &aabbMax)
{
return obj.CreateProxy(ref *(BulletSharp.Math.Vector3*)aabbMinPtr, ref *(BulletSharp.Math.Vector3*)aabbMaxPtr, shapeType, userPtr, collisionFilterGroup, collisionFilterMask, dispatcher, multiSapProxy);
}
}
}
示例8: PhysicsSimulator
/// <summary>
/// コンストラクター
/// </summary>
public PhysicsSimulator()
{
var cc = new DefaultCollisionConfiguration ();
this.dispatcher = new CollisionDispatcher (cc);
this.broadphase = new DbvtBroadphase ();
this.solver = new SequentialImpulseConstraintSolver ();
this.wld = new DiscreteDynamicsWorld (dispatcher, broadphase, solver, cc);
this.wld.Gravity = new BulletSharp.Vector3 (0, -9.8f, 0); // 重力は-Y方向
}
示例9: Awake
void Awake ()
{
if (BtWorld.main == null || gameObject.tag.Equals ("main"))
BtWorld.main = this;
// TODO: expose in editor?
broadphase = new BulletSharp.DbvtBroadphase ();
collisionConfiguration = new BulletSharp.DefaultCollisionConfiguration ();
dispatcher = new BulletSharp.CollisionDispatcher (collisionConfiguration);
solver = new BulletSharp.SequentialImpulseConstraintSolver ();
world = new BulletSharp.DiscreteDynamicsWorld (dispatcher, broadphase, solver, collisionConfiguration);
world.Gravity = new BulletSharp.Vector3 (gravity.x, gravity.y, gravity.z);
world.DebugDrawer = new UnityDebugDrawer ();
world.DebugDrawer.DebugMode = BulletSharp.DebugDrawModes.None;
foreach (BulletSharp.DebugDrawModes drawMode in debugDrawModes) {
world.DebugDrawer.DebugMode |= drawMode;
}
}
示例10: UpdateHandle
void UpdateHandle(ushort handle, Vector3 aabbMin, Vector3 aabbMax, Dispatcher dispatcher)
{
btAxisSweep3_updateHandle(_native, handle, ref aabbMin, ref aabbMax, dispatcher._native);
}
示例11: RemoveHandle
void RemoveHandle(ushort handle, Dispatcher dispatcher)
{
btAxisSweep3_removeHandle(_native, handle, dispatcher._native);
}
示例12: CleanProxyFromPairs
public void CleanProxyFromPairs(BroadphaseProxy proxy, Dispatcher dispatcher)
{
btOverlappingPairCache_cleanProxyFromPairs(_native, proxy._native, dispatcher._native);
}
示例13: SortOverlappingPairs
public void SortOverlappingPairs(Dispatcher dispatcher)
{
btOverlappingPairCache_sortOverlappingPairs(_native, dispatcher._native);
}
示例14: CollisionWorld
public CollisionWorld(Dispatcher dispatcher, BroadphaseInterface broadphasePairCache,
CollisionConfiguration collisionConfiguration)
: this(btCollisionWorld_new(dispatcher._native, broadphasePairCache._native,
collisionConfiguration._native))
{
_dispatcher = dispatcher;
Broadphase = broadphasePairCache;
}
示例15: UpdateActivationState
public void UpdateActivationState(CollisionWorld colWorld, Dispatcher dispatcher)
{
btSimulationIslandManager_updateActivationState(_native, colWorld._native,
dispatcher._native);
}