本文整理汇总了C#中Aurora.Physics.AuroraOpenDynamicsEngine.AuroraODEPrim.AddCollisionEvent方法的典型用法代码示例。如果您正苦于以下问题:C# AuroraODEPrim.AddCollisionEvent方法的具体用法?C# AuroraODEPrim.AddCollisionEvent怎么用?C# AuroraODEPrim.AddCollisionEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aurora.Physics.AuroraOpenDynamicsEngine.AuroraODEPrim
的用法示例。
在下文中一共展示了AuroraODEPrim.AddCollisionEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: collision_accounting_events
private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, ContactPoint contact)
{
obj2LocalID = 0;
if (!p2.SubscribedEvents() && !p1.SubscribedEvents())
return;
switch ((ActorTypes)p2.PhysicsActorType)
{
case ActorTypes.Agent:
cc2 = (AuroraODECharacter)p2;
switch ((ActorTypes)p1.PhysicsActorType)
{
case ActorTypes.Agent:
cc1 = (AuroraODECharacter)p1;
obj2LocalID = cc1.m_localID;
cc1.AddCollisionEvent(cc2.m_localID, contact);
break;
case ActorTypes.Prim:
if (p1 is AuroraODEPrim)
{
cp1 = (AuroraODEPrim)p1;
obj2LocalID = cp1.m_localID;
cp1.AddCollisionEvent(cc2.m_localID, contact);
}
break;
case ActorTypes.Ground:
case ActorTypes.Unknown:
obj2LocalID = 0;
break;
}
cc2.AddCollisionEvent(obj2LocalID, contact);
break;
case ActorTypes.Prim:
if (p2 is AuroraODEPrim)
{
cp2 = (AuroraODEPrim)p2;
switch ((ActorTypes)p1.PhysicsActorType)
{
case ActorTypes.Agent:
if (p1 is AuroraODECharacter)
{
cc1 = (AuroraODECharacter)p1;
obj2LocalID = cc1.m_localID;
cc1.AddCollisionEvent(cp2.m_localID, contact);
}
break;
case ActorTypes.Prim:
if (p1 is AuroraODEPrim)
{
cp1 = (AuroraODEPrim)p1;
obj2LocalID = cp1.m_localID;
cp1.AddCollisionEvent(cp2.m_localID, contact);
}
break;
case ActorTypes.Ground:
case ActorTypes.Unknown:
obj2LocalID = 0;
break;
}
cp2.AddCollisionEvent(obj2LocalID, contact);
}
break;
}
}