diff options
Diffstat (limited to '')
15 files changed, 353 insertions, 353 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs index c4a923c..42db7fe 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs | |||
@@ -155,8 +155,8 @@ public BSAPIUnman(string paramName, BSScene physScene) | |||
155 | 155 | ||
156 | // Initialization and simulation | 156 | // Initialization and simulation |
157 | public override BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, | 157 | public override BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, |
158 | int maxCollisions, ref CollisionDesc[] collisionArray, | 158 | int maxCollisions, ref CollisionDesc[] collisionArray, |
159 | int maxUpdates, ref EntityProperties[] updateArray | 159 | int maxUpdates, ref EntityProperties[] updateArray |
160 | ) | 160 | ) |
161 | { | 161 | { |
162 | // Pin down the memory that will be used to pass object collisions and updates back from unmanaged code | 162 | // Pin down the memory that will be used to pass object collisions and updates back from unmanaged code |
@@ -1472,8 +1472,8 @@ public delegate void DebugLogCallback([MarshalAs(UnmanagedType.LPStr)]string msg | |||
1472 | // Initialization and simulation | 1472 | // Initialization and simulation |
1473 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1473 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1474 | public static extern IntPtr Initialize2(Vector3 maxPosition, IntPtr parms, | 1474 | public static extern IntPtr Initialize2(Vector3 maxPosition, IntPtr parms, |
1475 | int maxCollisions, IntPtr collisionArray, | 1475 | int maxCollisions, IntPtr collisionArray, |
1476 | int maxUpdates, IntPtr updateArray, | 1476 | int maxUpdates, IntPtr updateArray, |
1477 | DebugLogCallback logRoutine); | 1477 | DebugLogCallback logRoutine); |
1478 | 1478 | ||
1479 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1479 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
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, |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs index 87cf972..f2019ae 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs | |||
@@ -205,7 +205,7 @@ public class BSActorMoveToTarget : BSActor | |||
205 | addedForce = correctionVector / timeStep; | 205 | addedForce = correctionVector / timeStep; |
206 | // Remove the existing velocity (only the moveToTarget force counts) | 206 | // Remove the existing velocity (only the moveToTarget force counts) |
207 | addedForce -= m_controllingPrim.RawVelocity; | 207 | addedForce -= m_controllingPrim.RawVelocity; |
208 | // Overcome gravity. | 208 | // Overcome gravity. |
209 | addedForce -= m_controllingPrim.Gravity; | 209 | addedForce -= m_controllingPrim.Gravity; |
210 | 210 | ||
211 | // Add enough force to overcome the mass of the object | 211 | // Add enough force to overcome the mass of the object |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs index 7756b10..816189f 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs | |||
@@ -36,16 +36,16 @@ namespace OpenSim.Region.PhysicsModule.BulletS { | |||
36 | // Constraint type values as defined by Bullet | 36 | // Constraint type values as defined by Bullet |
37 | public enum ConstraintType : int | 37 | public enum ConstraintType : int |
38 | { | 38 | { |
39 | POINT2POINT_CONSTRAINT_TYPE = 3, | 39 | POINT2POINT_CONSTRAINT_TYPE = 3, |
40 | HINGE_CONSTRAINT_TYPE, | 40 | HINGE_CONSTRAINT_TYPE, |
41 | CONETWIST_CONSTRAINT_TYPE, | 41 | CONETWIST_CONSTRAINT_TYPE, |
42 | D6_CONSTRAINT_TYPE, | 42 | D6_CONSTRAINT_TYPE, |
43 | SLIDER_CONSTRAINT_TYPE, | 43 | SLIDER_CONSTRAINT_TYPE, |
44 | CONTACT_CONSTRAINT_TYPE, | 44 | CONTACT_CONSTRAINT_TYPE, |
45 | D6_SPRING_CONSTRAINT_TYPE, | 45 | D6_SPRING_CONSTRAINT_TYPE, |
46 | GEAR_CONSTRAINT_TYPE, // added in Bullet 2.82 | 46 | GEAR_CONSTRAINT_TYPE, // added in Bullet 2.82 |
47 | FIXED_CONSTRAINT_TYPE, // added in Bullet 2.82 | 47 | FIXED_CONSTRAINT_TYPE, // added in Bullet 2.82 |
48 | MAX_CONSTRAINT_TYPE, // last type defined by Bullet | 48 | MAX_CONSTRAINT_TYPE, // last type defined by Bullet |
49 | // | 49 | // |
50 | BS_FIXED_CONSTRAINT_TYPE = 1234 // BulletSim constraint that is fixed and unmoving | 50 | BS_FIXED_CONSTRAINT_TYPE = 1234 // BulletSim constraint that is fixed and unmoving |
51 | } | 51 | } |
@@ -54,25 +54,25 @@ public enum ConstraintType : int | |||
54 | [StructLayout(LayoutKind.Sequential)] | 54 | [StructLayout(LayoutKind.Sequential)] |
55 | public struct ConvexHull | 55 | public struct ConvexHull |
56 | { | 56 | { |
57 | Vector3 Offset; | 57 | Vector3 Offset; |
58 | int VertexCount; | 58 | int VertexCount; |
59 | Vector3[] Vertices; | 59 | Vector3[] Vertices; |
60 | } | 60 | } |
61 | public enum BSPhysicsShapeType | 61 | public enum BSPhysicsShapeType |
62 | { | 62 | { |
63 | SHAPE_UNKNOWN = 0, | 63 | SHAPE_UNKNOWN = 0, |
64 | SHAPE_CAPSULE = 1, | 64 | SHAPE_CAPSULE = 1, |
65 | SHAPE_BOX = 2, | 65 | SHAPE_BOX = 2, |
66 | SHAPE_CONE = 3, | 66 | SHAPE_CONE = 3, |
67 | SHAPE_CYLINDER = 4, | 67 | SHAPE_CYLINDER = 4, |
68 | SHAPE_SPHERE = 5, | 68 | SHAPE_SPHERE = 5, |
69 | SHAPE_MESH = 6, | 69 | SHAPE_MESH = 6, |
70 | SHAPE_HULL = 7, | 70 | SHAPE_HULL = 7, |
71 | // following defined by BulletSim | 71 | // following defined by BulletSim |
72 | SHAPE_GROUNDPLANE = 20, | 72 | SHAPE_GROUNDPLANE = 20, |
73 | SHAPE_TERRAIN = 21, | 73 | SHAPE_TERRAIN = 21, |
74 | SHAPE_COMPOUND = 22, | 74 | SHAPE_COMPOUND = 22, |
75 | SHAPE_HEIGHTMAP = 23, | 75 | SHAPE_HEIGHTMAP = 23, |
76 | SHAPE_AVATAR = 24, | 76 | SHAPE_AVATAR = 24, |
77 | SHAPE_CONVEXHULL= 25, | 77 | SHAPE_CONVEXHULL= 25, |
78 | SHAPE_GIMPACT = 26, | 78 | SHAPE_GIMPACT = 26, |
@@ -180,16 +180,16 @@ public struct ConfigurationParameters | |||
180 | public float collisionMargin; | 180 | public float collisionMargin; |
181 | public float gravity; | 181 | public float gravity; |
182 | 182 | ||
183 | public float maxPersistantManifoldPoolSize; | 183 | public float maxPersistantManifoldPoolSize; |
184 | public float maxCollisionAlgorithmPoolSize; | 184 | public float maxCollisionAlgorithmPoolSize; |
185 | public float shouldDisableContactPoolDynamicAllocation; | 185 | public float shouldDisableContactPoolDynamicAllocation; |
186 | public float shouldForceUpdateAllAabbs; | 186 | public float shouldForceUpdateAllAabbs; |
187 | public float shouldRandomizeSolverOrder; | 187 | public float shouldRandomizeSolverOrder; |
188 | public float shouldSplitSimulationIslands; | 188 | public float shouldSplitSimulationIslands; |
189 | public float shouldEnableFrictionCaching; | 189 | public float shouldEnableFrictionCaching; |
190 | public float numberOfSolverIterations; | 190 | public float numberOfSolverIterations; |
191 | public float useSingleSidedMeshes; | 191 | public float useSingleSidedMeshes; |
192 | public float globalContactBreakingThreshold; | 192 | public float globalContactBreakingThreshold; |
193 | 193 | ||
194 | public float physicsLoggingFrames; | 194 | public float physicsLoggingFrames; |
195 | 195 | ||
@@ -202,30 +202,30 @@ public struct ConfigurationParameters | |||
202 | public struct HACDParams | 202 | public struct HACDParams |
203 | { | 203 | { |
204 | // usual default values | 204 | // usual default values |
205 | public float maxVerticesPerHull; // 100 | 205 | public float maxVerticesPerHull; // 100 |
206 | public float minClusters; // 2 | 206 | public float minClusters; // 2 |
207 | public float compacityWeight; // 0.1 | 207 | public float compacityWeight; // 0.1 |
208 | public float volumeWeight; // 0.0 | 208 | public float volumeWeight; // 0.0 |
209 | public float concavity; // 100 | 209 | public float concavity; // 100 |
210 | public float addExtraDistPoints; // false | 210 | public float addExtraDistPoints; // false |
211 | public float addNeighboursDistPoints; // false | 211 | public float addNeighboursDistPoints; // false |
212 | public float addFacesPoints; // false | 212 | public float addFacesPoints; // false |
213 | public float shouldAdjustCollisionMargin; // false | 213 | public float shouldAdjustCollisionMargin; // false |
214 | // VHACD | 214 | // VHACD |
215 | public float whichHACD; // zero if Bullet HACD, non-zero says VHACD | 215 | public float whichHACD; // zero if Bullet HACD, non-zero says VHACD |
216 | // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html | 216 | // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html |
217 | public float vHACDresolution; // 100,000 max number of voxels generated during voxelization stage | 217 | public float vHACDresolution; // 100,000 max number of voxels generated during voxelization stage |
218 | public float vHACDdepth; // 20 max number of clipping stages | 218 | public float vHACDdepth; // 20 max number of clipping stages |
219 | public float vHACDconcavity; // 0.0025 maximum concavity | 219 | public float vHACDconcavity; // 0.0025 maximum concavity |
220 | public float vHACDplaneDownsampling; // 4 granularity of search for best clipping plane | 220 | public float vHACDplaneDownsampling; // 4 granularity of search for best clipping plane |
221 | public float vHACDconvexHullDownsampling; // 4 precision of hull gen process | 221 | public float vHACDconvexHullDownsampling; // 4 precision of hull gen process |
222 | public float vHACDalpha; // 0.05 bias toward clipping along symmetry planes | 222 | public float vHACDalpha; // 0.05 bias toward clipping along symmetry planes |
223 | public float vHACDbeta; // 0.05 bias toward clipping along revolution axis | 223 | public float vHACDbeta; // 0.05 bias toward clipping along revolution axis |
224 | public float vHACDgamma; // 0.00125 max concavity when merging | 224 | public float vHACDgamma; // 0.00125 max concavity when merging |
225 | public float vHACDpca; // 0 on/off normalizing mesh before decomp | 225 | public float vHACDpca; // 0 on/off normalizing mesh before decomp |
226 | public float vHACDmode; // 0 0:voxel based, 1: tetrahedron based | 226 | public float vHACDmode; // 0 0:voxel based, 1: tetrahedron based |
227 | public float vHACDmaxNumVerticesPerCH; // 64 max triangles per convex hull | 227 | public float vHACDmaxNumVerticesPerCH; // 64 max triangles per convex hull |
228 | public float vHACDminVolumePerCH; // 0.0001 sampling of generated convex hulls | 228 | public float vHACDminVolumePerCH; // 0.0001 sampling of generated convex hulls |
229 | } | 229 | } |
230 | 230 | ||
231 | // The states a bullet collision object can have | 231 | // The states a bullet collision object can have |
@@ -322,8 +322,8 @@ public abstract string BulletEngineVersion { get; protected set;} | |||
322 | 322 | ||
323 | // Initialization and simulation | 323 | // Initialization and simulation |
324 | public abstract BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, | 324 | public abstract BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, |
325 | int maxCollisions, ref CollisionDesc[] collisionArray, | 325 | int maxCollisions, ref CollisionDesc[] collisionArray, |
326 | int maxUpdates, ref EntityProperties[] updateArray | 326 | int maxUpdates, ref EntityProperties[] updateArray |
327 | ); | 327 | ); |
328 | 328 | ||
329 | public abstract int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep, | 329 | public abstract int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep, |
@@ -398,7 +398,7 @@ public abstract void DestroyObject(BulletWorld sim, BulletBody obj); | |||
398 | public abstract BulletShape CreateGroundPlaneShape(UInt32 id, float height, float collisionMargin); | 398 | public abstract BulletShape CreateGroundPlaneShape(UInt32 id, float height, float collisionMargin); |
399 | 399 | ||
400 | public abstract BulletShape CreateTerrainShape(UInt32 id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, | 400 | public abstract BulletShape CreateTerrainShape(UInt32 id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, |
401 | float scaleFactor, float collisionMargin); | 401 | float scaleFactor, float collisionMargin); |
402 | 402 | ||
403 | // ===================================================================================== | 403 | // ===================================================================================== |
404 | // Constraint creation and helper routines | 404 | // Constraint creation and helper routines |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs index 6322695..57f03fb 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs | |||
@@ -64,9 +64,9 @@ public sealed class BSCharacter : BSPhysObject | |||
64 | private OMV.Vector3 _PIDTarget; | 64 | private OMV.Vector3 _PIDTarget; |
65 | private float _PIDTau; | 65 | private float _PIDTau; |
66 | 66 | ||
67 | // public override OMV.Vector3 RawVelocity | 67 | // public override OMV.Vector3 RawVelocity |
68 | // { get { return base.RawVelocity; } | 68 | // { get { return base.RawVelocity; } |
69 | // set { | 69 | // set { |
70 | // if (value != base.RawVelocity) | 70 | // if (value != base.RawVelocity) |
71 | // Util.PrintCallStack(); | 71 | // Util.PrintCallStack(); |
72 | // Console.WriteLine("Set rawvel to {0}", value); | 72 | // Console.WriteLine("Set rawvel to {0}", value); |
@@ -82,7 +82,7 @@ public sealed class BSCharacter : BSPhysObject | |||
82 | : base(parent_scene, localID, avName, "BSCharacter") | 82 | : base(parent_scene, localID, avName, "BSCharacter") |
83 | { | 83 | { |
84 | _physicsActorType = (int)ActorTypes.Agent; | 84 | _physicsActorType = (int)ActorTypes.Agent; |
85 | RawPosition = pos; | 85 | RawPosition = pos; |
86 | 86 | ||
87 | _flying = isFlying; | 87 | _flying = isFlying; |
88 | RawOrientation = OMV.Quaternion.Identity; | 88 | RawOrientation = OMV.Quaternion.Identity; |
@@ -819,7 +819,7 @@ public sealed class BSCharacter : BSPhysObject | |||
819 | // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many | 819 | // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many |
820 | // extra updates. | 820 | // extra updates. |
821 | // | 821 | // |
822 | // XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to | 822 | // XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to |
823 | // avatar movement rather than removes it. The larger the threshold, the bigger the jitter. | 823 | // avatar movement rather than removes it. The larger the threshold, the bigger the jitter. |
824 | // This is most noticeable in level flight and can be seen with | 824 | // This is most noticeable in level flight and can be seen with |
825 | // the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower | 825 | // the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs index 313c961..c4ccdbe 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs | |||
@@ -125,8 +125,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS | |||
125 | 125 | ||
126 | // Just some recomputed constants: | 126 | // Just some recomputed constants: |
127 | #pragma warning disable 414 | 127 | #pragma warning disable 414 |
128 | static readonly float TwoPI = ((float)Math.PI) * 2f; | 128 | static readonly float TwoPI = ((float)Math.PI) * 2f; |
129 | static readonly float FourPI = ((float)Math.PI) * 4f; | 129 | static readonly float FourPI = ((float)Math.PI) * 4f; |
130 | static readonly float PIOverFour = ((float)Math.PI) / 4f; | 130 | static readonly float PIOverFour = ((float)Math.PI) / 4f; |
131 | static readonly float PIOverTwo = ((float)Math.PI) / 2f; | 131 | static readonly float PIOverTwo = ((float)Math.PI) / 2f; |
132 | #pragma warning restore 414 | 132 | #pragma warning restore 414 |
@@ -1595,7 +1595,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS | |||
1595 | // in that direction. | 1595 | // in that direction. |
1596 | // TODO: implement reference frame. | 1596 | // TODO: implement reference frame. |
1597 | public void ComputeAngularDeflection() | 1597 | public void ComputeAngularDeflection() |
1598 | { | 1598 | { |
1599 | 1599 | ||
1600 | if (BSParam.VehicleEnableAngularDeflection && m_angularDeflectionEfficiency != 0 && VehicleForwardSpeed > 0.2) | 1600 | if (BSParam.VehicleEnableAngularDeflection && m_angularDeflectionEfficiency != 0 && VehicleForwardSpeed > 0.2) |
1601 | { | 1601 | { |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs index e73f0e8..13c1361 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs | |||
@@ -319,7 +319,7 @@ public abstract class BSLinkset | |||
319 | public virtual bool AllPartsComplete | 319 | public virtual bool AllPartsComplete |
320 | { | 320 | { |
321 | get { | 321 | get { |
322 | bool ret = true; | 322 | bool ret = true; |
323 | this.ForEachMember((member) => | 323 | this.ForEachMember((member) => |
324 | { | 324 | { |
325 | if ((!member.IsInitialized) || member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting) | 325 | if ((!member.IsInitialized) || member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting) |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs index 28df2d9..352c03e 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs | |||
@@ -90,8 +90,8 @@ public static class BSParam | |||
90 | public static float DeactivationTime { get; private set; } | 90 | public static float DeactivationTime { get; private set; } |
91 | public static float LinearSleepingThreshold { get; private set; } | 91 | public static float LinearSleepingThreshold { get; private set; } |
92 | public static float AngularSleepingThreshold { get; private set; } | 92 | public static float AngularSleepingThreshold { get; private set; } |
93 | public static float CcdMotionThreshold { get; private set; } | 93 | public static float CcdMotionThreshold { get; private set; } |
94 | public static float CcdSweptSphereRadius { get; private set; } | 94 | public static float CcdSweptSphereRadius { get; private set; } |
95 | public static float ContactProcessingThreshold { get; private set; } | 95 | public static float ContactProcessingThreshold { get; private set; } |
96 | 96 | ||
97 | public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed | 97 | public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed |
@@ -119,14 +119,14 @@ public static class BSParam | |||
119 | public static float Gravity { get; private set; } | 119 | public static float Gravity { get; private set; } |
120 | 120 | ||
121 | // Physics Engine operation | 121 | // Physics Engine operation |
122 | public static float MaxPersistantManifoldPoolSize { get; private set; } | 122 | public static float MaxPersistantManifoldPoolSize { get; private set; } |
123 | public static float MaxCollisionAlgorithmPoolSize { get; private set; } | 123 | public static float MaxCollisionAlgorithmPoolSize { get; private set; } |
124 | public static bool ShouldDisableContactPoolDynamicAllocation { get; private set; } | 124 | public static bool ShouldDisableContactPoolDynamicAllocation { get; private set; } |
125 | public static bool ShouldForceUpdateAllAabbs { get; private set; } | 125 | public static bool ShouldForceUpdateAllAabbs { get; private set; } |
126 | public static bool ShouldRandomizeSolverOrder { get; private set; } | 126 | public static bool ShouldRandomizeSolverOrder { get; private set; } |
127 | public static bool ShouldSplitSimulationIslands { get; private set; } | 127 | public static bool ShouldSplitSimulationIslands { get; private set; } |
128 | public static bool ShouldEnableFrictionCaching { get; private set; } | 128 | public static bool ShouldEnableFrictionCaching { get; private set; } |
129 | public static float NumberOfSolverIterations { get; private set; } | 129 | public static float NumberOfSolverIterations { get; private set; } |
130 | public static bool UseSingleSidedMeshes { get; private set; } | 130 | public static bool UseSingleSidedMeshes { get; private set; } |
131 | public static float GlobalContactBreakingThreshold { get; private set; } | 131 | public static float GlobalContactBreakingThreshold { get; private set; } |
132 | public static float PhysicsUnmanLoggingFrames { get; private set; } | 132 | public static float PhysicsUnmanLoggingFrames { get; private set; } |
@@ -149,19 +149,19 @@ public static class BSParam | |||
149 | public static float AvatarFlyingGroundMargin { get; private set; } | 149 | public static float AvatarFlyingGroundMargin { get; private set; } |
150 | public static float AvatarFlyingGroundUpForce { get; private set; } | 150 | public static float AvatarFlyingGroundUpForce { get; private set; } |
151 | public static float AvatarTerminalVelocity { get; private set; } | 151 | public static float AvatarTerminalVelocity { get; private set; } |
152 | public static float AvatarContactProcessingThreshold { get; private set; } | 152 | public static float AvatarContactProcessingThreshold { get; private set; } |
153 | public static float AvatarAddForcePushFactor { get; private set; } | 153 | public static float AvatarAddForcePushFactor { get; private set; } |
154 | public static float AvatarStopZeroThreshold { get; private set; } | 154 | public static float AvatarStopZeroThreshold { get; private set; } |
155 | public static float AvatarStopZeroThresholdSquared { get; private set; } | 155 | public static float AvatarStopZeroThresholdSquared { get; private set; } |
156 | public static int AvatarJumpFrames { get; private set; } | 156 | public static int AvatarJumpFrames { get; private set; } |
157 | public static float AvatarBelowGroundUpCorrectionMeters { get; private set; } | 157 | public static float AvatarBelowGroundUpCorrectionMeters { get; private set; } |
158 | public static float AvatarStepHeight { get; private set; } | 158 | public static float AvatarStepHeight { get; private set; } |
159 | public static float AvatarStepAngle { get; private set; } | 159 | public static float AvatarStepAngle { get; private set; } |
160 | public static float AvatarStepGroundFudge { get; private set; } | 160 | public static float AvatarStepGroundFudge { get; private set; } |
161 | public static float AvatarStepApproachFactor { get; private set; } | 161 | public static float AvatarStepApproachFactor { get; private set; } |
162 | public static float AvatarStepForceFactor { get; private set; } | 162 | public static float AvatarStepForceFactor { get; private set; } |
163 | public static float AvatarStepUpCorrectionFactor { get; private set; } | 163 | public static float AvatarStepUpCorrectionFactor { get; private set; } |
164 | public static int AvatarStepSmoothingSteps { get; private set; } | 164 | public static int AvatarStepSmoothingSteps { get; private set; } |
165 | 165 | ||
166 | // Vehicle parameters | 166 | // Vehicle parameters |
167 | public static float VehicleMaxLinearVelocity { get; private set; } | 167 | public static float VehicleMaxLinearVelocity { get; private set; } |
@@ -193,31 +193,31 @@ public static class BSParam | |||
193 | public static float CSHullVolumeConservationThresholdPercent { get; private set; } | 193 | public static float CSHullVolumeConservationThresholdPercent { get; private set; } |
194 | public static int CSHullMaxVertices { get; private set; } | 194 | public static int CSHullMaxVertices { get; private set; } |
195 | public static float CSHullMaxSkinWidth { get; private set; } | 195 | public static float CSHullMaxSkinWidth { get; private set; } |
196 | public static float BHullMaxVerticesPerHull { get; private set; } // 100 | 196 | public static float BHullMaxVerticesPerHull { get; private set; } // 100 |
197 | public static float BHullMinClusters { get; private set; } // 2 | 197 | public static float BHullMinClusters { get; private set; } // 2 |
198 | public static float BHullCompacityWeight { get; private set; } // 0.1 | 198 | public static float BHullCompacityWeight { get; private set; } // 0.1 |
199 | public static float BHullVolumeWeight { get; private set; } // 0.0 | 199 | public static float BHullVolumeWeight { get; private set; } // 0.0 |
200 | public static float BHullConcavity { get; private set; } // 100 | 200 | public static float BHullConcavity { get; private set; } // 100 |
201 | public static bool BHullAddExtraDistPoints { get; private set; } // false | 201 | public static bool BHullAddExtraDistPoints { get; private set; } // false |
202 | public static bool BHullAddNeighboursDistPoints { get; private set; } // false | 202 | public static bool BHullAddNeighboursDistPoints { get; private set; } // false |
203 | public static bool BHullAddFacesPoints { get; private set; } // false | 203 | public static bool BHullAddFacesPoints { get; private set; } // false |
204 | public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false | 204 | public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false |
205 | public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD | 205 | public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD |
206 | // Parameters for VHACD 2.0: http://code.google.com/p/v-hacd | 206 | // Parameters for VHACD 2.0: http://code.google.com/p/v-hacd |
207 | // To enable, set both ShouldUseBulletHACD=true and WhichHACD=1 | 207 | // To enable, set both ShouldUseBulletHACD=true and WhichHACD=1 |
208 | // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html | 208 | // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html |
209 | public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage | 209 | public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage |
210 | public static float VHACDdepth { get; private set; } // 20 max number of clipping stages | 210 | public static float VHACDdepth { get; private set; } // 20 max number of clipping stages |
211 | public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity | 211 | public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity |
212 | public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane | 212 | public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane |
213 | public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process | 213 | public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process |
214 | public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes | 214 | public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes |
215 | public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis | 215 | public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis |
216 | public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging | 216 | public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging |
217 | public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp | 217 | public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp |
218 | public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based | 218 | public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based |
219 | public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull | 219 | public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull |
220 | public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls | 220 | public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls |
221 | 221 | ||
222 | // Linkset implementation parameters | 222 | // Linkset implementation parameters |
223 | public static float LinksetImplementation { get; private set; } | 223 | public static float LinksetImplementation { get; private set; } |
@@ -579,7 +579,7 @@ public static class BSParam | |||
579 | (s,v) => { ContactProcessingThreshold = v;}, | 579 | (s,v) => { ContactProcessingThreshold = v;}, |
580 | (s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ), | 580 | (s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ), |
581 | 581 | ||
582 | new ParameterDefn<float>("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)", | 582 | new ParameterDefn<float>("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)", |
583 | (float)BSTerrainPhys.TerrainImplementation.Heightmap ), | 583 | (float)BSTerrainPhys.TerrainImplementation.Heightmap ), |
584 | new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" , | 584 | new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" , |
585 | 2 ), | 585 | 2 ), |
@@ -631,31 +631,31 @@ public static class BSParam | |||
631 | 2.0f ), | 631 | 2.0f ), |
632 | new ParameterDefn<float>("AvatarTerminalVelocity", "Terminal Velocity of falling avatar", | 632 | new ParameterDefn<float>("AvatarTerminalVelocity", "Terminal Velocity of falling avatar", |
633 | -54.0f ), | 633 | -54.0f ), |
634 | new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", | 634 | new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", |
635 | 0.1f ), | 635 | 0.1f ), |
636 | new ParameterDefn<float>("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines", | 636 | new ParameterDefn<float>("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines", |
637 | 0.315f ), | 637 | 0.315f ), |
638 | new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped", | 638 | new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped", |
639 | 0.45f, | 639 | 0.45f, |
640 | (s) => { return (float)AvatarStopZeroThreshold; }, | 640 | (s) => { return (float)AvatarStopZeroThreshold; }, |
641 | (s,v) => { AvatarStopZeroThreshold = v; AvatarStopZeroThresholdSquared = v * v; } ), | 641 | (s,v) => { AvatarStopZeroThreshold = v; AvatarStopZeroThresholdSquared = v * v; } ), |
642 | new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", | 642 | new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", |
643 | 1.0f ), | 643 | 1.0f ), |
644 | new ParameterDefn<int>("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.", | 644 | new ParameterDefn<int>("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.", |
645 | 4 ), | 645 | 4 ), |
646 | new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction", | 646 | new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction", |
647 | 0.999f ) , | 647 | 0.999f ) , |
648 | new ParameterDefn<float>("AvatarStepAngle", "The angle (in radians) for a vertical surface to be considered a step", | 648 | new ParameterDefn<float>("AvatarStepAngle", "The angle (in radians) for a vertical surface to be considered a step", |
649 | 0.3f ) , | 649 | 0.3f ) , |
650 | new ParameterDefn<float>("AvatarStepGroundFudge", "Fudge factor subtracted from avatar base when comparing collision height", | 650 | new ParameterDefn<float>("AvatarStepGroundFudge", "Fudge factor subtracted from avatar base when comparing collision height", |
651 | 0.1f ) , | 651 | 0.1f ) , |
652 | new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", | 652 | new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", |
653 | 2f ), | 653 | 2f ), |
654 | new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", | 654 | new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", |
655 | 0f ), | 655 | 0f ), |
656 | new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", | 656 | new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", |
657 | 0.8f ), | 657 | 0.8f ), |
658 | new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", | 658 | new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", |
659 | 1 ), | 659 | 1 ), |
660 | 660 | ||
661 | new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", | 661 | new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", |
@@ -699,131 +699,131 @@ public static class BSParam | |||
699 | new ParameterDefn<bool>("VehicleEnableAngularBanking", "Turn on/off vehicle angular banking effect", | 699 | new ParameterDefn<bool>("VehicleEnableAngularBanking", "Turn on/off vehicle angular banking effect", |
700 | true ), | 700 | true ), |
701 | 701 | ||
702 | new ParameterDefn<float>("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", | 702 | new ParameterDefn<float>("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", |
703 | 0f, | 703 | 0f, |
704 | (s) => { return MaxPersistantManifoldPoolSize; }, | 704 | (s) => { return MaxPersistantManifoldPoolSize; }, |
705 | (s,v) => { MaxPersistantManifoldPoolSize = v; s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ), | 705 | (s,v) => { MaxPersistantManifoldPoolSize = v; s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ), |
706 | new ParameterDefn<float>("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)", | 706 | new ParameterDefn<float>("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)", |
707 | 0f, | 707 | 0f, |
708 | (s) => { return MaxCollisionAlgorithmPoolSize; }, | 708 | (s) => { return MaxCollisionAlgorithmPoolSize; }, |
709 | (s,v) => { MaxCollisionAlgorithmPoolSize = v; s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ), | 709 | (s,v) => { MaxCollisionAlgorithmPoolSize = v; s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ), |
710 | new ParameterDefn<bool>("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count", | 710 | new ParameterDefn<bool>("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count", |
711 | false, | 711 | false, |
712 | (s) => { return ShouldDisableContactPoolDynamicAllocation; }, | 712 | (s) => { return ShouldDisableContactPoolDynamicAllocation; }, |
713 | (s,v) => { ShouldDisableContactPoolDynamicAllocation = v; | 713 | (s,v) => { ShouldDisableContactPoolDynamicAllocation = v; |
714 | s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ), | 714 | s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ), |
715 | new ParameterDefn<bool>("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step", | 715 | new ParameterDefn<bool>("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step", |
716 | false, | 716 | false, |
717 | (s) => { return ShouldForceUpdateAllAabbs; }, | 717 | (s) => { return ShouldForceUpdateAllAabbs; }, |
718 | (s,v) => { ShouldForceUpdateAllAabbs = v; s.UnmanagedParams[0].shouldForceUpdateAllAabbs = NumericBool(v); } ), | 718 | (s,v) => { ShouldForceUpdateAllAabbs = v; s.UnmanagedParams[0].shouldForceUpdateAllAabbs = NumericBool(v); } ), |
719 | new ParameterDefn<bool>("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction", | 719 | new ParameterDefn<bool>("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction", |
720 | true, | 720 | true, |
721 | (s) => { return ShouldRandomizeSolverOrder; }, | 721 | (s) => { return ShouldRandomizeSolverOrder; }, |
722 | (s,v) => { ShouldRandomizeSolverOrder = v; s.UnmanagedParams[0].shouldRandomizeSolverOrder = NumericBool(v); } ), | 722 | (s,v) => { ShouldRandomizeSolverOrder = v; s.UnmanagedParams[0].shouldRandomizeSolverOrder = NumericBool(v); } ), |
723 | new ParameterDefn<bool>("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands", | 723 | new ParameterDefn<bool>("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands", |
724 | true, | 724 | true, |
725 | (s) => { return ShouldSplitSimulationIslands; }, | 725 | (s) => { return ShouldSplitSimulationIslands; }, |
726 | (s,v) => { ShouldSplitSimulationIslands = v; s.UnmanagedParams[0].shouldSplitSimulationIslands = NumericBool(v); } ), | 726 | (s,v) => { ShouldSplitSimulationIslands = v; s.UnmanagedParams[0].shouldSplitSimulationIslands = NumericBool(v); } ), |
727 | new ParameterDefn<bool>("ShouldEnableFrictionCaching", "Enable friction computation caching", | 727 | new ParameterDefn<bool>("ShouldEnableFrictionCaching", "Enable friction computation caching", |
728 | true, | 728 | true, |
729 | (s) => { return ShouldEnableFrictionCaching; }, | 729 | (s) => { return ShouldEnableFrictionCaching; }, |
730 | (s,v) => { ShouldEnableFrictionCaching = v; s.UnmanagedParams[0].shouldEnableFrictionCaching = NumericBool(v); } ), | 730 | (s,v) => { ShouldEnableFrictionCaching = v; s.UnmanagedParams[0].shouldEnableFrictionCaching = NumericBool(v); } ), |
731 | new ParameterDefn<float>("NumberOfSolverIterations", "Number of internal iterations (0 means default)", | 731 | new ParameterDefn<float>("NumberOfSolverIterations", "Number of internal iterations (0 means default)", |
732 | 0f, // zero says use Bullet default | 732 | 0f, // zero says use Bullet default |
733 | (s) => { return NumberOfSolverIterations; }, | 733 | (s) => { return NumberOfSolverIterations; }, |
734 | (s,v) => { NumberOfSolverIterations = v; s.UnmanagedParams[0].numberOfSolverIterations = v; } ), | 734 | (s,v) => { NumberOfSolverIterations = v; s.UnmanagedParams[0].numberOfSolverIterations = v; } ), |
735 | new ParameterDefn<bool>("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.", | 735 | new ParameterDefn<bool>("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.", |
736 | true, | 736 | true, |
737 | (s) => { return UseSingleSidedMeshes; }, | 737 | (s) => { return UseSingleSidedMeshes; }, |
738 | (s,v) => { UseSingleSidedMeshes = v; s.UnmanagedParams[0].useSingleSidedMeshes = NumericBool(v); } ), | 738 | (s,v) => { UseSingleSidedMeshes = v; s.UnmanagedParams[0].useSingleSidedMeshes = NumericBool(v); } ), |
739 | new ParameterDefn<float>("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))", | 739 | new ParameterDefn<float>("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))", |
740 | 0f, | 740 | 0f, |
741 | (s) => { return GlobalContactBreakingThreshold; }, | 741 | (s) => { return GlobalContactBreakingThreshold; }, |
742 | (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ), | 742 | (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ), |
743 | new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics", | 743 | new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics", |
744 | 0f, | 744 | 0f, |
745 | (s) => { return PhysicsUnmanLoggingFrames; }, | 745 | (s) => { return PhysicsUnmanLoggingFrames; }, |
746 | (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ), | 746 | (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ), |
747 | 747 | ||
748 | new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy", | 748 | new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy", |
749 | 7 ), | 749 | 7 ), |
750 | new ParameterDefn<int>("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes", | 750 | new ParameterDefn<int>("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes", |
751 | 2 ), | 751 | 2 ), |
752 | new ParameterDefn<float>("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)", | 752 | new ParameterDefn<float>("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)", |
753 | 5f ), | 753 | 5f ), |
754 | new ParameterDefn<float>("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)", | 754 | new ParameterDefn<float>("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)", |
755 | 5f ), | 755 | 5f ), |
756 | new ParameterDefn<int>("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.", | 756 | new ParameterDefn<int>("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.", |
757 | 32 ), | 757 | 32 ), |
758 | new ParameterDefn<float>("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.", | 758 | new ParameterDefn<float>("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.", |
759 | 0f ), | 759 | 0f ), |
760 | 760 | ||
761 | new ParameterDefn<float>("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull", | 761 | new ParameterDefn<float>("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull", |
762 | 200f ), | 762 | 200f ), |
763 | new ParameterDefn<float>("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh", | 763 | new ParameterDefn<float>("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh", |
764 | 10f ), | 764 | 10f ), |
765 | new ParameterDefn<float>("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls", | 765 | new ParameterDefn<float>("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls", |
766 | 20f ), | 766 | 20f ), |
767 | new ParameterDefn<float>("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull", | 767 | new ParameterDefn<float>("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull", |
768 | 0.1f ), | 768 | 0.1f ), |
769 | new ParameterDefn<float>("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be", | 769 | new ParameterDefn<float>("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be", |
770 | 10f ), | 770 | 10f ), |
771 | new ParameterDefn<bool>("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors", | 771 | new ParameterDefn<bool>("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors", |
772 | true ), | 772 | true ), |
773 | new ParameterDefn<bool>("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls", | 773 | new ParameterDefn<bool>("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls", |
774 | true ), | 774 | true ), |
775 | new ParameterDefn<bool>("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces", | 775 | new ParameterDefn<bool>("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces", |
776 | true ), | 776 | true ), |
777 | new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin", | 777 | new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin", |
778 | false ), | 778 | false ), |
779 | 779 | ||
780 | new ParameterDefn<float>("WhichHACD", "zero if Bullet HACD, non-zero says VHACD", | 780 | new ParameterDefn<float>("WhichHACD", "zero if Bullet HACD, non-zero says VHACD", |
781 | 0f ), | 781 | 0f ), |
782 | new ParameterDefn<float>("VHACDresolution", "max number of voxels generated during voxelization stage", | 782 | new ParameterDefn<float>("VHACDresolution", "max number of voxels generated during voxelization stage", |
783 | 100000f ), | 783 | 100000f ), |
784 | new ParameterDefn<float>("VHACDdepth", "max number of clipping stages", | 784 | new ParameterDefn<float>("VHACDdepth", "max number of clipping stages", |
785 | 20f ), | 785 | 20f ), |
786 | new ParameterDefn<float>("VHACDconcavity", "maximum concavity", | 786 | new ParameterDefn<float>("VHACDconcavity", "maximum concavity", |
787 | 0.0025f ), | 787 | 0.0025f ), |
788 | new ParameterDefn<float>("VHACDplaneDownsampling", "granularity of search for best clipping plane", | 788 | new ParameterDefn<float>("VHACDplaneDownsampling", "granularity of search for best clipping plane", |
789 | 4f ), | 789 | 4f ), |
790 | new ParameterDefn<float>("VHACDconvexHullDownsampling", "precision of hull gen process", | 790 | new ParameterDefn<float>("VHACDconvexHullDownsampling", "precision of hull gen process", |
791 | 4f ), | 791 | 4f ), |
792 | new ParameterDefn<float>("VHACDalpha", "bias toward clipping along symmetry planes", | 792 | new ParameterDefn<float>("VHACDalpha", "bias toward clipping along symmetry planes", |
793 | 0.05f ), | 793 | 0.05f ), |
794 | new ParameterDefn<float>("VHACDbeta", "bias toward clipping along revolution axis", | 794 | new ParameterDefn<float>("VHACDbeta", "bias toward clipping along revolution axis", |
795 | 0.05f ), | 795 | 0.05f ), |
796 | new ParameterDefn<float>("VHACDgamma", "max concavity when merging", | 796 | new ParameterDefn<float>("VHACDgamma", "max concavity when merging", |
797 | 0.00125f ), | 797 | 0.00125f ), |
798 | new ParameterDefn<float>("VHACDpca", "on/off normalizing mesh before decomp", | 798 | new ParameterDefn<float>("VHACDpca", "on/off normalizing mesh before decomp", |
799 | 0f ), | 799 | 0f ), |
800 | new ParameterDefn<float>("VHACDmode", "0:voxel based, 1: tetrahedron based", | 800 | new ParameterDefn<float>("VHACDmode", "0:voxel based, 1: tetrahedron based", |
801 | 0f ), | 801 | 0f ), |
802 | new ParameterDefn<float>("VHACDmaxNumVerticesPerCH", "max triangles per convex hull", | 802 | new ParameterDefn<float>("VHACDmaxNumVerticesPerCH", "max triangles per convex hull", |
803 | 64f ), | 803 | 64f ), |
804 | new ParameterDefn<float>("VHACDminVolumePerCH", "sampling of generated convex hulls", | 804 | new ParameterDefn<float>("VHACDminVolumePerCH", "sampling of generated convex hulls", |
805 | 0.0001f ), | 805 | 0.0001f ), |
806 | 806 | ||
807 | new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", | 807 | new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", |
808 | (float)BSLinkset.LinksetImplementation.Compound ), | 808 | (float)BSLinkset.LinksetImplementation.Compound ), |
809 | new ParameterDefn<bool>("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same", | 809 | new ParameterDefn<bool>("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same", |
810 | true ), | 810 | true ), |
811 | new ParameterDefn<bool>("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.", | 811 | new ParameterDefn<bool>("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.", |
812 | false ), | 812 | false ), |
813 | new ParameterDefn<bool>("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints", | 813 | new ParameterDefn<bool>("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints", |
814 | true ), | 814 | true ), |
815 | new ParameterDefn<float>("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints", | 815 | new ParameterDefn<float>("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints", |
816 | 5.0f ), | 816 | 5.0f ), |
817 | new ParameterDefn<float>("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints", | 817 | new ParameterDefn<float>("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints", |
818 | 0.1f ), | 818 | 0.1f ), |
819 | new ParameterDefn<float>("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1", | 819 | new ParameterDefn<float>("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1", |
820 | 0.1f ), | 820 | 0.1f ), |
821 | new ParameterDefn<float>("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2", | 821 | new ParameterDefn<float>("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2", |
822 | 0.1f ), | 822 | 0.1f ), |
823 | new ParameterDefn<float>("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)", | 823 | new ParameterDefn<float>("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)", |
824 | 40 ), | 824 | 40 ), |
825 | 825 | ||
826 | new ParameterDefn<float>("DebugNumber", "A console setable number sometimes used for debugging", | 826 | new ParameterDefn<float>("DebugNumber", "A console setable number sometimes used for debugging", |
827 | 1.0f ), | 827 | 1.0f ), |
828 | 828 | ||
829 | new ParameterDefn<int>("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)", | 829 | new ParameterDefn<int>("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)", |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs index a846869..6aa24d5 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs | |||
@@ -317,10 +317,10 @@ public abstract class BSPhysObject : PhysicsActor | |||
317 | 317 | ||
318 | public virtual bool ForceBodyShapeRebuild(bool inTaintTime) { return false; } | 318 | public virtual bool ForceBodyShapeRebuild(bool inTaintTime) { return false; } |
319 | 319 | ||
320 | public override bool PIDActive | 320 | public override bool PIDActive |
321 | { | 321 | { |
322 | get { return MoveToTargetActive; } | 322 | get { return MoveToTargetActive; } |
323 | set { MoveToTargetActive = value; } | 323 | set { MoveToTargetActive = value; } |
324 | } | 324 | } |
325 | 325 | ||
326 | public override OMV.Vector3 PIDTarget { set { MoveToTargetTarget = value; } } | 326 | public override OMV.Vector3 PIDTarget { set { MoveToTargetTarget = value; } } |
@@ -572,7 +572,7 @@ public abstract class BSPhysObject : PhysicsActor | |||
572 | newContact.RelativeSpeed = -OMV.Vector3.Dot(relvel, contactNormal); | 572 | newContact.RelativeSpeed = -OMV.Vector3.Dot(relvel, contactNormal); |
573 | // DetailLog("{0},{1}.Collision.AddCollider,vel={2},contee.vel={3},relvel={4},relspeed={5}", | 573 | // DetailLog("{0},{1}.Collision.AddCollider,vel={2},contee.vel={3},relvel={4},relspeed={5}", |
574 | // LocalID, TypeName, RawVelocity, (collidee == null ? OMV.Vector3.Zero : collidee.RawVelocity), relvel, newContact.RelativeSpeed); | 574 | // LocalID, TypeName, RawVelocity, (collidee == null ? OMV.Vector3.Zero : collidee.RawVelocity), relvel, newContact.RelativeSpeed); |
575 | 575 | ||
576 | lock (PhysScene.CollisionLock) | 576 | lock (PhysScene.CollisionLock) |
577 | { | 577 | { |
578 | CollisionCollection.AddCollider(collideeLocalID, newContact); | 578 | CollisionCollection.AddCollider(collideeLocalID, newContact); |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs index db2b9db..b153761 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs | |||
@@ -1144,14 +1144,14 @@ public class BSPrim : BSPhysObject | |||
1144 | } | 1144 | } |
1145 | } | 1145 | } |
1146 | 1146 | ||
1147 | public override bool PIDActive | 1147 | public override bool PIDActive |
1148 | { | 1148 | { |
1149 | get | 1149 | get |
1150 | { | 1150 | { |
1151 | return MoveToTargetActive; | 1151 | return MoveToTargetActive; |
1152 | } | 1152 | } |
1153 | 1153 | ||
1154 | set | 1154 | set |
1155 | { | 1155 | { |
1156 | MoveToTargetActive = value; | 1156 | MoveToTargetActive = value; |
1157 | 1157 | ||
@@ -1179,13 +1179,13 @@ public class BSPrim : BSPhysObject | |||
1179 | // if the actor exists, tell it to refresh its values. | 1179 | // if the actor exists, tell it to refresh its values. |
1180 | actor.Refresh(); | 1180 | actor.Refresh(); |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | } | 1183 | } |
1184 | } | 1184 | } |
1185 | // Used for llSetHoverHeight and maybe vehicle height | 1185 | // Used for llSetHoverHeight and maybe vehicle height |
1186 | // Hover Height will override MoveTo target's Z | 1186 | // Hover Height will override MoveTo target's Z |
1187 | public override bool PIDHoverActive { | 1187 | public override bool PIDHoverActive { |
1188 | get | 1188 | get |
1189 | { | 1189 | { |
1190 | return base.HoverActive; | 1190 | return base.HoverActive; |
1191 | } | 1191 | } |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index ee57f0c..7ff0a07 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs | |||
@@ -351,12 +351,12 @@ namespace OpenSim.Region.PhysicsModule.BulletS | |||
351 | if (BSParam.UseSeparatePhysicsThread) | 351 | if (BSParam.UseSeparatePhysicsThread) |
352 | { | 352 | { |
353 | // The physics simulation should happen independently of the heartbeat loop | 353 | // The physics simulation should happen independently of the heartbeat loop |
354 | m_physicsThread | 354 | m_physicsThread |
355 | = WorkManager.StartThread( | 355 | = WorkManager.StartThread( |
356 | BulletSPluginPhysicsThread, | 356 | BulletSPluginPhysicsThread, |
357 | string.Format("{0} ({1})", BulletEngineName, RegionName), | 357 | string.Format("{0} ({1})", BulletEngineName, RegionName), |
358 | ThreadPriority.Normal, | 358 | ThreadPriority.Normal, |
359 | true, | 359 | true, |
360 | true); | 360 | true); |
361 | } | 361 | } |
362 | } | 362 | } |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs b/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs index 2ba3c5a..ab5d4849 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs | |||
@@ -136,7 +136,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS | |||
136 | 136 | ||
137 | return; | 137 | return; |
138 | } | 138 | } |
139 | 139 | ||
140 | // Register as LSL functions all the [ScriptInvocation] marked methods. | 140 | // Register as LSL functions all the [ScriptInvocation] marked methods. |
141 | Comms.RegisterScriptInvocations(this); | 141 | Comms.RegisterScriptInvocations(this); |
142 | Comms.RegisterConstants(this); | 142 | Comms.RegisterConstants(this); |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs index 6ed7af1..91ce468 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs | |||
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices; | |||
3 | using System.Runtime.InteropServices; | 3 | using System.Runtime.InteropServices; |
4 | using Mono.Addins; | 4 | using Mono.Addins; |
5 | 5 | ||
6 | // General Information about an assembly is controlled through the following | 6 | // General Information about an assembly is controlled through the following |
7 | // set of attributes. Change these attribute values to modify the information | 7 | // set of attributes. Change these attribute values to modify the information |
8 | // associated with an assembly. | 8 | // associated with an assembly. |
9 | [assembly: AssemblyTitle("OpenSim.Region.Physics.BulletSPlugin")] | 9 | [assembly: AssemblyTitle("OpenSim.Region.Physics.BulletSPlugin")] |
@@ -15,8 +15,8 @@ using Mono.Addins; | |||
15 | [assembly: AssemblyTrademark("")] | 15 | [assembly: AssemblyTrademark("")] |
16 | [assembly: AssemblyCulture("")] | 16 | [assembly: AssemblyCulture("")] |
17 | 17 | ||
18 | // Setting ComVisible to false makes the types in this assembly not visible | 18 | // Setting ComVisible to false makes the types in this assembly not visible |
19 | // to COM components. If you need to access a type in this assembly from | 19 | // to COM components. If you need to access a type in this assembly from |
20 | // COM, set the ComVisible attribute to true on that type. | 20 | // COM, set the ComVisible attribute to true on that type. |
21 | [assembly: ComVisible(false)] | 21 | [assembly: ComVisible(false)] |
22 | 22 | ||
@@ -26,7 +26,7 @@ using Mono.Addins; | |||
26 | // Version information for an assembly consists of the following four values: | 26 | // Version information for an assembly consists of the following four values: |
27 | // | 27 | // |
28 | // Major Version | 28 | // Major Version |
29 | // Minor Version | 29 | // Minor Version |
30 | // Build Number | 30 | // Build Number |
31 | // Revision | 31 | // Revision |
32 | // | 32 | // |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs index 109e19c..3e8c1cd 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs | |||
@@ -80,7 +80,7 @@ public static class BulletSimTestsUtil | |||
80 | } | 80 | } |
81 | 81 | ||
82 | Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); | 82 | Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); |
83 | 83 | ||
84 | RegionInfo info = new RegionInfo(); | 84 | RegionInfo info = new RegionInfo(); |
85 | info.RegionName = "BSTestRegion"; | 85 | info.RegionName = "BSTestRegion"; |
86 | info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize; | 86 | info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize; |
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs index c0cf19a..c2be568 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs | |||
@@ -146,7 +146,7 @@ public class HullCreation : OpenSimTestCase | |||
146 | uint torusLocalID = 125; | 146 | uint torusLocalID = 125; |
147 | PhysicsScene.AddPrimShape("testTorus", pbs, pos, size, rot, isPhys, torusLocalID); | 147 | PhysicsScene.AddPrimShape("testTorus", pbs, pos, size, rot, isPhys, torusLocalID); |
148 | BSPrim primTypeTorus = (BSPrim)PhysicsScene.PhysObjects[torusLocalID]; | 148 | BSPrim primTypeTorus = (BSPrim)PhysicsScene.PhysObjects[torusLocalID]; |
149 | 149 | ||
150 | // The actual prim shape creation happens at taint time | 150 | // The actual prim shape creation happens at taint time |
151 | PhysicsScene.ProcessTaints(); | 151 | PhysicsScene.ProcessTaints(); |
152 | 152 | ||