Universe.Physics.BulletSPlugin.BSAPIXNA.SliderMotor C# (CSharp) Méthode

SliderMotor() public méthode

public SliderMotor ( BulletConstraint pConstraint, int forceVel, int linAng, float val ) : bool
pConstraint BulletConstraint
forceVel int
linAng int
val float
Résultat bool
        public override bool SliderMotor(BulletConstraint pConstraint, int forceVel, int linAng, float val)
        {
            SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
    		switch (forceVel)
    		{
    			case SLIDER_MOTOR_VELOCITY:
    				switch (linAng)
    				{
    					case SLIDER_LINEAR:
    						constraint.SetTargetLinMotorVelocity(val);
    						break;
    					case SLIDER_ANGULAR:
    						constraint.SetTargetAngMotorVelocity(val);
    						break;
    				}
    				break;
    			case SLIDER_MAX_MOTOR_FORCE:
    				switch (linAng)
    				{
    					case SLIDER_LINEAR:
    						constraint.SetMaxLinMotorForce(val);
    						break;
    					case SLIDER_ANGULAR:
    						constraint.SetMaxAngMotorForce(val);
    						break;
    				}
    				break;
    		}
            return true;
        }
BSAPIXNA