public object m_UserData; // user data passed to the collision geometry at creation time internal UserMeshCollisionRayHitDesc(Newton.NewtonUserMeshCollisionRayHitDesc pRayHitDesc) { m_NormalOut = new NewtonVector4(pRayHitDesc.m_NormalOut).ToDirectX(); m_P0 = new NewtonVector4(pRayHitDesc.m_P0).ToDirectX(); m_P1 = new NewtonVector4(pRayHitDesc.m_P1).ToDirectX(); m_UserData = CHashTables.BodyUserData[pRayHitDesc.m_UserData]; m_UserIdOut = pRayHitDesc.m_UserIdOut; }
internal Newton.NewtonUserMeshCollisionRayHitDesc ToNewton() { Newton.NewtonUserMeshCollisionRayHitDesc aUpdateDesc = new Newton.NewtonUserMeshCollisionRayHitDesc(); aUpdateDesc.m_NormalOut = new NewtonVector4(m_NormalOut).NWVector4; aUpdateDesc.m_P0 = new NewtonVector4(m_P0).NWVector4; aUpdateDesc.m_P1 = new NewtonVector4(m_P1).NWVector4; aUpdateDesc.m_UserData = (IntPtr)CHashTables.BodyUserData[m_UserData]; aUpdateDesc.m_UserIdOut = m_UserIdOut; return aUpdateDesc; }
internal Newton.NewtonUserMeshCollisionRayHitDesc ToNewton() { Newton.NewtonUserMeshCollisionRayHitDesc aUpdateDesc = new Newton.NewtonUserMeshCollisionRayHitDesc(); aUpdateDesc.m_NormalOut = new NewtonVector4(m_NormalOut).NWVector4; aUpdateDesc.m_P0 = new NewtonVector4(m_P0).NWVector4; aUpdateDesc.m_P1 = new NewtonVector4(m_P1).NWVector4; aUpdateDesc.m_UserData = (IntPtr)CHashTables.BodyUserData[m_UserData]; aUpdateDesc.m_UserIdOut = m_UserIdOut; return(aUpdateDesc); }
private float InvokeUserMeshCollisionRayHit(Newton.NewtonUserMeshCollisionRayHitDesc pLineDescData) { UserMeshCollisionRayHitDesc aUserMeshCollisionRayHitDesc = new UserMeshCollisionRayHitDesc(); aUserMeshCollisionRayHitDesc.m_NormalOut = new NewtonVector4(pLineDescData.m_NormalOut).ToDirectX(); aUserMeshCollisionRayHitDesc.m_P0 = new NewtonVector4(pLineDescData.m_P0).ToDirectX(); aUserMeshCollisionRayHitDesc.m_P1 = new NewtonVector4(pLineDescData.m_P1).ToDirectX(); aUserMeshCollisionRayHitDesc.m_UserData = pLineDescData.m_UserData; aUserMeshCollisionRayHitDesc.m_UserIdOut = pLineDescData.m_UserIdOut; OnUserMeshCollisionRayHit( new CUserMeshCollisionRayHitEventArgs(aUserMeshCollisionRayHitDesc)); return(1.2f); }