Universe.Physics.OpenDynamicsEngine.ODEPhysicsScene.CreateContacJoint C# (CSharp) Method

CreateContacJoint() private method

private CreateContacJoint ( d geom ) : IntPtr
geom d
return System.IntPtr
        IntPtr CreateContacJoint(d.ContactGeom geom)
        {
            if (GlobalContactsArray == IntPtr.Zero || !ContinueCollisionProcessing)
                return IntPtr.Zero;

            // damm copy...
            newGlobalcontact.geom.depth = geom.depth;
            newGlobalcontact.geom.g1 = geom.g1;
            newGlobalcontact.geom.g2 = geom.g2;
            newGlobalcontact.geom.pos = geom.pos;
            newGlobalcontact.geom.normal = geom.normal;
            newGlobalcontact.geom.side1 = geom.side1;
            newGlobalcontact.geom.side2 = geom.side2;

            IntPtr contact;
            lock (_contactcountLock)
                contact = new IntPtr(GlobalContactsArray.ToInt64() + (m_global_contactcount*d.Contact.unmanagedSizeOf));
            Marshal.StructureToPtr(newGlobalcontact, contact, false);
            return d.JointCreateContactPtr(world, contactgroup, contact);
        }