Beispiel #1
0
 internal CollisionInfo(World world, NativeAPI.NewtonCollisionInfoRecord info)
 {
     this.info = info;
     this.world = world;
 }
Beispiel #2
0
        static void GetInfo(IntPtr userJoint, out NativeAPI.NewtonJointRecordTag info)
        {
            CustomJoint joint = FromNewtonJoint(userJoint);

            JointRecord infoRecord = new JointRecord();
            joint.GetInfo(ref infoRecord);

            info = new NativeAPI.NewtonJointRecordTag();
            info.m_attachmentMatrix_0 = infoRecord.AttachmentMatrix0;
            info.m_attachmentMatrix_1 = infoRecord.AttachmentMatrix1;
            info.m_minLinearDof = infoRecord.MinLinearDof;
            info.m_maxLinearDof = infoRecord.MinLinearDof;
            info.m_minAngularDof = infoRecord.MinAngularDof;
            info.m_maxAngularDof = infoRecord.MaxAngularDof;
            info.m_attachBody_0 = infoRecord.AttachedBody0.handle;
            info.m_attachBody_1 = (infoRecord.AttachedBody1 == null ? IntPtr.Zero : infoRecord.AttachedBody1.handle);
            //info.m_extraParameters;
            info.m_bodiesCollisionOn = infoRecord.BodiesCollisionOn;
            info.m_descriptionType = infoRecord.DescriptionType;
        }