diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs')
-rwxr-xr-x | OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs | 310 |
1 files changed, 155 insertions, 155 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs index 887311d..37017b0 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs | |||
@@ -815,161 +815,161 @@ private sealed class BulletConstraintXNA : BulletConstraint | |||
815 | public override bool SliderSetLimits(BulletConstraint pConstraint, int lowerUpper, int linAng, float val) | 815 | public override bool SliderSetLimits(BulletConstraint pConstraint, int lowerUpper, int linAng, float val) |
816 | { | 816 | { |
817 | SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; | 817 | SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; |
818 | switch (lowerUpper) | 818 | switch (lowerUpper) |
819 | { | 819 | { |
820 | case SLIDER_LOWER_LIMIT: | 820 | case SLIDER_LOWER_LIMIT: |
821 | switch (linAng) | 821 | switch (linAng) |
822 | { | 822 | { |
823 | case SLIDER_LINEAR: | 823 | case SLIDER_LINEAR: |
824 | constraint.SetLowerLinLimit(val); | 824 | constraint.SetLowerLinLimit(val); |
825 | break; | 825 | break; |
826 | case SLIDER_ANGULAR: | 826 | case SLIDER_ANGULAR: |
827 | constraint.SetLowerAngLimit(val); | 827 | constraint.SetLowerAngLimit(val); |
828 | break; | 828 | break; |
829 | } | 829 | } |
830 | break; | 830 | break; |
831 | case SLIDER_UPPER_LIMIT: | 831 | case SLIDER_UPPER_LIMIT: |
832 | switch (linAng) | 832 | switch (linAng) |
833 | { | 833 | { |
834 | case SLIDER_LINEAR: | 834 | case SLIDER_LINEAR: |
835 | constraint.SetUpperLinLimit(val); | 835 | constraint.SetUpperLinLimit(val); |
836 | break; | 836 | break; |
837 | case SLIDER_ANGULAR: | 837 | case SLIDER_ANGULAR: |
838 | constraint.SetUpperAngLimit(val); | 838 | constraint.SetUpperAngLimit(val); |
839 | break; | 839 | break; |
840 | } | 840 | } |
841 | break; | 841 | break; |
842 | } | 842 | } |
843 | return true; | 843 | return true; |
844 | } | 844 | } |
845 | public override bool SliderSet(BulletConstraint pConstraint, int softRestDamp, int dirLimOrtho, int linAng, float val) | 845 | public override bool SliderSet(BulletConstraint pConstraint, int softRestDamp, int dirLimOrtho, int linAng, float val) |
846 | { | 846 | { |
847 | SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; | 847 | SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; |
848 | switch (softRestDamp) | 848 | switch (softRestDamp) |
849 | { | 849 | { |
850 | case SLIDER_SET_SOFTNESS: | 850 | case SLIDER_SET_SOFTNESS: |
851 | switch (dirLimOrtho) | 851 | switch (dirLimOrtho) |
852 | { | 852 | { |
853 | case SLIDER_SET_DIRECTION: | 853 | case SLIDER_SET_DIRECTION: |
854 | switch (linAng) | 854 | switch (linAng) |
855 | { | 855 | { |
856 | case SLIDER_LINEAR: constraint.SetSoftnessDirLin(val); break; | 856 | case SLIDER_LINEAR: constraint.SetSoftnessDirLin(val); break; |
857 | case SLIDER_ANGULAR: constraint.SetSoftnessDirAng(val); break; | 857 | case SLIDER_ANGULAR: constraint.SetSoftnessDirAng(val); break; |
858 | } | 858 | } |
859 | break; | 859 | break; |
860 | case SLIDER_SET_LIMIT: | 860 | case SLIDER_SET_LIMIT: |
861 | switch (linAng) | 861 | switch (linAng) |
862 | { | 862 | { |
863 | case SLIDER_LINEAR: constraint.SetSoftnessLimLin(val); break; | 863 | case SLIDER_LINEAR: constraint.SetSoftnessLimLin(val); break; |
864 | case SLIDER_ANGULAR: constraint.SetSoftnessLimAng(val); break; | 864 | case SLIDER_ANGULAR: constraint.SetSoftnessLimAng(val); break; |
865 | } | 865 | } |
866 | break; | 866 | break; |
867 | case SLIDER_SET_ORTHO: | 867 | case SLIDER_SET_ORTHO: |
868 | switch (linAng) | 868 | switch (linAng) |
869 | { | 869 | { |
870 | case SLIDER_LINEAR: constraint.SetSoftnessOrthoLin(val); break; | 870 | case SLIDER_LINEAR: constraint.SetSoftnessOrthoLin(val); break; |
871 | case SLIDER_ANGULAR: constraint.SetSoftnessOrthoAng(val); break; | 871 | case SLIDER_ANGULAR: constraint.SetSoftnessOrthoAng(val); break; |
872 | } | 872 | } |
873 | break; | 873 | break; |
874 | } | 874 | } |
875 | break; | 875 | break; |
876 | case SLIDER_SET_RESTITUTION: | 876 | case SLIDER_SET_RESTITUTION: |
877 | switch (dirLimOrtho) | 877 | switch (dirLimOrtho) |
878 | { | 878 | { |
879 | case SLIDER_SET_DIRECTION: | 879 | case SLIDER_SET_DIRECTION: |
880 | switch (linAng) | 880 | switch (linAng) |
881 | { | 881 | { |
882 | case SLIDER_LINEAR: constraint.SetRestitutionDirLin(val); break; | 882 | case SLIDER_LINEAR: constraint.SetRestitutionDirLin(val); break; |
883 | case SLIDER_ANGULAR: constraint.SetRestitutionDirAng(val); break; | 883 | case SLIDER_ANGULAR: constraint.SetRestitutionDirAng(val); break; |
884 | } | 884 | } |
885 | break; | 885 | break; |
886 | case SLIDER_SET_LIMIT: | 886 | case SLIDER_SET_LIMIT: |
887 | switch (linAng) | 887 | switch (linAng) |
888 | { | 888 | { |
889 | case SLIDER_LINEAR: constraint.SetRestitutionLimLin(val); break; | 889 | case SLIDER_LINEAR: constraint.SetRestitutionLimLin(val); break; |
890 | case SLIDER_ANGULAR: constraint.SetRestitutionLimAng(val); break; | 890 | case SLIDER_ANGULAR: constraint.SetRestitutionLimAng(val); break; |
891 | } | 891 | } |
892 | break; | 892 | break; |
893 | case SLIDER_SET_ORTHO: | 893 | case SLIDER_SET_ORTHO: |
894 | switch (linAng) | 894 | switch (linAng) |
895 | { | 895 | { |
896 | case SLIDER_LINEAR: constraint.SetRestitutionOrthoLin(val); break; | 896 | case SLIDER_LINEAR: constraint.SetRestitutionOrthoLin(val); break; |
897 | case SLIDER_ANGULAR: constraint.SetRestitutionOrthoAng(val); break; | 897 | case SLIDER_ANGULAR: constraint.SetRestitutionOrthoAng(val); break; |
898 | } | 898 | } |
899 | break; | 899 | break; |
900 | } | 900 | } |
901 | break; | 901 | break; |
902 | case SLIDER_SET_DAMPING: | 902 | case SLIDER_SET_DAMPING: |
903 | switch (dirLimOrtho) | 903 | switch (dirLimOrtho) |
904 | { | 904 | { |
905 | case SLIDER_SET_DIRECTION: | 905 | case SLIDER_SET_DIRECTION: |
906 | switch (linAng) | 906 | switch (linAng) |
907 | { | 907 | { |
908 | case SLIDER_LINEAR: constraint.SetDampingDirLin(val); break; | 908 | case SLIDER_LINEAR: constraint.SetDampingDirLin(val); break; |
909 | case SLIDER_ANGULAR: constraint.SetDampingDirAng(val); break; | 909 | case SLIDER_ANGULAR: constraint.SetDampingDirAng(val); break; |
910 | } | 910 | } |
911 | break; | 911 | break; |
912 | case SLIDER_SET_LIMIT: | 912 | case SLIDER_SET_LIMIT: |
913 | switch (linAng) | 913 | switch (linAng) |
914 | { | 914 | { |
915 | case SLIDER_LINEAR: constraint.SetDampingLimLin(val); break; | 915 | case SLIDER_LINEAR: constraint.SetDampingLimLin(val); break; |
916 | case SLIDER_ANGULAR: constraint.SetDampingLimAng(val); break; | 916 | case SLIDER_ANGULAR: constraint.SetDampingLimAng(val); break; |
917 | } | 917 | } |
918 | break; | 918 | break; |
919 | case SLIDER_SET_ORTHO: | 919 | case SLIDER_SET_ORTHO: |
920 | switch (linAng) | 920 | switch (linAng) |
921 | { | 921 | { |
922 | case SLIDER_LINEAR: constraint.SetDampingOrthoLin(val); break; | 922 | case SLIDER_LINEAR: constraint.SetDampingOrthoLin(val); break; |
923 | case SLIDER_ANGULAR: constraint.SetDampingOrthoAng(val); break; | 923 | case SLIDER_ANGULAR: constraint.SetDampingOrthoAng(val); break; |
924 | } | 924 | } |
925 | break; | 925 | break; |
926 | } | 926 | } |
927 | break; | 927 | break; |
928 | } | 928 | } |
929 | return true; | 929 | return true; |
930 | } | 930 | } |
931 | public override bool SliderMotorEnable(BulletConstraint pConstraint, int linAng, float numericTrueFalse) | 931 | public override bool SliderMotorEnable(BulletConstraint pConstraint, int linAng, float numericTrueFalse) |
932 | { | 932 | { |
933 | SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; | 933 | SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; |
934 | switch (linAng) | 934 | switch (linAng) |
935 | { | 935 | { |
936 | case SLIDER_LINEAR: | 936 | case SLIDER_LINEAR: |
937 | constraint.SetPoweredLinMotor(numericTrueFalse == 0.0 ? false : true); | 937 | constraint.SetPoweredLinMotor(numericTrueFalse == 0.0 ? false : true); |
938 | break; | 938 | break; |
939 | case SLIDER_ANGULAR: | 939 | case SLIDER_ANGULAR: |
940 | constraint.SetPoweredAngMotor(numericTrueFalse == 0.0 ? false : true); | 940 | constraint.SetPoweredAngMotor(numericTrueFalse == 0.0 ? false : true); |
941 | break; | 941 | break; |
942 | } | 942 | } |
943 | return true; | 943 | return true; |
944 | } | 944 | } |
945 | public override bool SliderMotor(BulletConstraint pConstraint, int forceVel, int linAng, float val) | 945 | public override bool SliderMotor(BulletConstraint pConstraint, int forceVel, int linAng, float val) |
946 | { | 946 | { |
947 | SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; | 947 | SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; |
948 | switch (forceVel) | 948 | switch (forceVel) |
949 | { | 949 | { |
950 | case SLIDER_MOTOR_VELOCITY: | 950 | case SLIDER_MOTOR_VELOCITY: |
951 | switch (linAng) | 951 | switch (linAng) |
952 | { | 952 | { |
953 | case SLIDER_LINEAR: | 953 | case SLIDER_LINEAR: |
954 | constraint.SetTargetLinMotorVelocity(val); | 954 | constraint.SetTargetLinMotorVelocity(val); |
955 | break; | 955 | break; |
956 | case SLIDER_ANGULAR: | 956 | case SLIDER_ANGULAR: |
957 | constraint.SetTargetAngMotorVelocity(val); | 957 | constraint.SetTargetAngMotorVelocity(val); |
958 | break; | 958 | break; |
959 | } | 959 | } |
960 | break; | 960 | break; |
961 | case SLIDER_MAX_MOTOR_FORCE: | 961 | case SLIDER_MAX_MOTOR_FORCE: |
962 | switch (linAng) | 962 | switch (linAng) |
963 | { | 963 | { |
964 | case SLIDER_LINEAR: | 964 | case SLIDER_LINEAR: |
965 | constraint.SetMaxLinMotorForce(val); | 965 | constraint.SetMaxLinMotorForce(val); |
966 | break; | 966 | break; |
967 | case SLIDER_ANGULAR: | 967 | case SLIDER_ANGULAR: |
968 | constraint.SetMaxAngMotorForce(val); | 968 | constraint.SetMaxAngMotorForce(val); |
969 | break; | 969 | break; |
970 | } | 970 | } |
971 | break; | 971 | break; |
972 | } | 972 | } |
973 | return true; | 973 | return true; |
974 | } | 974 | } |
975 | 975 | ||
@@ -1197,20 +1197,20 @@ private sealed class BulletConstraintXNA : BulletConstraint | |||
1197 | }; | 1197 | }; |
1198 | /* | 1198 | /* |
1199 | m_mass = mass; | 1199 | m_mass = mass; |
1200 | m_motionState =motionState; | 1200 | m_motionState =motionState; |
1201 | m_collisionShape = collisionShape; | 1201 | m_collisionShape = collisionShape; |
1202 | m_localInertia = localInertia; | 1202 | m_localInertia = localInertia; |
1203 | m_linearDamping = 0f; | 1203 | m_linearDamping = 0f; |
1204 | m_angularDamping = 0f; | 1204 | m_angularDamping = 0f; |
1205 | m_friction = 0.5f; | 1205 | m_friction = 0.5f; |
1206 | m_restitution = 0f; | 1206 | m_restitution = 0f; |
1207 | m_linearSleepingThreshold = 0.8f; | 1207 | m_linearSleepingThreshold = 0.8f; |
1208 | m_angularSleepingThreshold = 1f; | 1208 | m_angularSleepingThreshold = 1f; |
1209 | m_additionalDamping = false; | 1209 | m_additionalDamping = false; |
1210 | m_additionalDampingFactor = 0.005f; | 1210 | m_additionalDampingFactor = 0.005f; |
1211 | m_additionalLinearDampingThresholdSqr = 0.01f; | 1211 | m_additionalLinearDampingThresholdSqr = 0.01f; |
1212 | m_additionalAngularDampingThresholdSqr = 0.01f; | 1212 | m_additionalAngularDampingThresholdSqr = 0.01f; |
1213 | m_additionalAngularDampingFactor = 0.01f; | 1213 | m_additionalAngularDampingFactor = 0.01f; |
1214 | m_startWorldTransform = IndexedMatrix.Identity; | 1214 | m_startWorldTransform = IndexedMatrix.Identity; |
1215 | */ | 1215 | */ |
1216 | body.SetUserPointer(pLocalID); | 1216 | body.SetUserPointer(pLocalID); |
@@ -2172,7 +2172,7 @@ private sealed class BulletConstraintXNA : BulletConstraint | |||
2172 | } | 2172 | } |
2173 | 2173 | ||
2174 | public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, | 2174 | public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, |
2175 | float scaleFactor, float collisionMargin) | 2175 | float scaleFactor, float collisionMargin) |
2176 | { | 2176 | { |
2177 | const int upAxis = 2; | 2177 | const int upAxis = 2; |
2178 | HeightfieldTerrainShape terrainShape = new HeightfieldTerrainShape((int)size.X, (int)size.Y, | 2178 | HeightfieldTerrainShape terrainShape = new HeightfieldTerrainShape((int)size.X, (int)size.Y, |