示例#1
0
 internal void ToNewton(Newton.NewtonHingeSliderUpdateDesc newton)
 {
     newton.m_Accel       = this.m_Accel;
     newton.m_MinFriction = this.m_MinFriction;
     newton.m_MaxFriction = this.m_MaxFriction;
     newton.m_Timestep    = this.m_Timestep;
 }
示例#2
0
 internal HingeSliderUpdateDesc(Newton.NewtonHingeSliderUpdateDesc pUpdateDesc)
 {
     m_Accel       = pUpdateDesc.m_Accel;
     m_MaxFriction = pUpdateDesc.m_MaxFriction;
     m_MinFriction = pUpdateDesc.m_MinFriction;
     m_Timestep    = pUpdateDesc.m_Timestep;
 }
示例#3
0
        public float HingeCalculateStopAlpha(HingeSliderUpdateDesc pDesc, float pAngle)
        {
            Newton.NewtonHingeSliderUpdateDesc aUpdateDesc = new Newton.NewtonHingeSliderUpdateDesc(pDesc);

            aUpdateDesc.m_Accel       = pDesc.m_Accel;
            aUpdateDesc.m_MaxFriction = pDesc.m_MaxFriction;
            aUpdateDesc.m_MinFriction = pDesc.m_MinFriction;
            aUpdateDesc.m_Timestep    = pDesc.m_Timestep;

            return(Newton.NewtonHingeCalculateStopAlpha(m_Handle,
                                                        aUpdateDesc,
                                                        pAngle));
        }
示例#4
0
        public float HingeCalculateStopAlpha(HingeSliderUpdateDesc pDesc, float pAngle)
		{
			Newton.NewtonHingeSliderUpdateDesc aUpdateDesc = new Newton.NewtonHingeSliderUpdateDesc(pDesc);

			aUpdateDesc.m_Accel = pDesc.m_Accel;
			aUpdateDesc.m_MaxFriction = pDesc.m_MaxFriction;
			aUpdateDesc.m_MinFriction = pDesc.m_MinFriction;
			aUpdateDesc.m_Timestep = pDesc.m_Timestep;

			return Newton.NewtonHingeCalculateStopAlpha(m_Handle,
                aUpdateDesc,
				pAngle);
		}
示例#5
0
        public float CorkscrewCalculateStopAccel(HingeSliderUpdateDesc pDesc,
                                                 float pPosition)
        {
            Newton.NewtonHingeSliderUpdateDesc aHingeSliderUpdateDesc = new Newton.NewtonHingeSliderUpdateDesc(pDesc);

            aHingeSliderUpdateDesc.m_Accel       = pDesc.m_Accel;
            aHingeSliderUpdateDesc.m_MaxFriction = pDesc.m_MaxFriction;
            aHingeSliderUpdateDesc.m_MinFriction = pDesc.m_MinFriction;
            aHingeSliderUpdateDesc.m_Timestep    = pDesc.m_Timestep;

            return(Newton.NewtonCorkscrewCalculateStopAccel(m_Handle,
                                                            aHingeSliderUpdateDesc,
                                                            pPosition));
        }
示例#6
0
        private uint InvokeCorkscrew(IntPtr pNewtonJoint,
                                     Newton.NewtonHingeSliderUpdateDesc pDesc)
        {
            HingeSliderUpdateDesc aHingeSliderUpdateDesc = new HingeSliderUpdateDesc();

            aHingeSliderUpdateDesc.m_Accel       = pDesc.m_Accel;
            aHingeSliderUpdateDesc.m_MaxFriction = pDesc.m_MaxFriction;
            aHingeSliderUpdateDesc.m_MinFriction = pDesc.m_MinFriction;
            aHingeSliderUpdateDesc.m_Timestep    = pDesc.m_Timestep;

            OnCorkscrew(new CCorkscrewEventArgs(aHingeSliderUpdateDesc));

            return(1);
        }
示例#7
0
        private uint InvokeUniversal(IntPtr pNewtonJoint,
                                     Newton.NewtonHingeSliderUpdateDesc pDesc)
        {
            HingeSliderUpdateDesc aUpdateDesc = new HingeSliderUpdateDesc();

            aUpdateDesc.m_Accel       = pDesc.m_Accel;
            aUpdateDesc.m_MaxFriction = pDesc.m_MaxFriction;
            aUpdateDesc.m_MinFriction = pDesc.m_MinFriction;
            aUpdateDesc.m_Timestep    = pDesc.m_Timestep;

            OnUniversal(new CUniversalEventArgs(aUpdateDesc));

            return(1);
        }
示例#8
0
        private uint InvokeHinge(IntPtr pNewtonJoint, Newton.NewtonHingeSliderUpdateDesc pDesc)
        {
            CHingeEventArgs e = new CHingeEventArgs(new HingeSliderUpdateDesc(pDesc));

            OnHinge(e);

            if (e.ApplyConstraint)
            {
                e.Desc.ToNewton(pDesc);
                return(1);
            }
            else
            {
                return(0);
            }
        }
		public float CorkscrewCalculateStopAccel(HingeSliderUpdateDesc pDesc,
			float pPosition)
		{
            Newton.NewtonHingeSliderUpdateDesc aHingeSliderUpdateDesc = new Newton.NewtonHingeSliderUpdateDesc(pDesc);

			aHingeSliderUpdateDesc.m_Accel = pDesc.m_Accel;
			aHingeSliderUpdateDesc.m_MaxFriction = pDesc.m_MaxFriction;
			aHingeSliderUpdateDesc.m_MinFriction = pDesc.m_MinFriction;
			aHingeSliderUpdateDesc.m_Timestep = pDesc.m_Timestep;

			return Newton.NewtonCorkscrewCalculateStopAccel(m_Handle,
				aHingeSliderUpdateDesc,
				pPosition);
		}