mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
This commit is contained in:
@@ -249,7 +249,7 @@ public enum CollisionFlags : uint
|
||||
BS_VEHICLE_COLLISIONS = 1 << 12, // return collisions for vehicle ground checking
|
||||
BS_RETURN_ROOT_COMPOUND_SHAPE = 1 << 13, // return the pos/rot of the root shape in a compound shape
|
||||
BS_NONE = 0,
|
||||
BS_ALL = 0xFFFFFFFF
|
||||
BS_ALL = 0x7FFF // collision flags are a signed short
|
||||
};
|
||||
|
||||
// Values f collisions groups and masks
|
||||
@@ -265,14 +265,14 @@ public enum CollisionFilterGroups : uint
|
||||
BDebrisGroup = 1 << 3, // 0008
|
||||
BSensorTrigger = 1 << 4, // 0010
|
||||
BCharacterGroup = 1 << 5, // 0020
|
||||
BAllGroup = 0x000FFFFF,
|
||||
BAllGroup = 0x0007FFF, // collision flags are a signed short
|
||||
// Filter groups defined by BulletSim
|
||||
BGroundPlaneGroup = 1 << 10, // 0400
|
||||
BTerrainGroup = 1 << 11, // 0800
|
||||
BRaycastGroup = 1 << 12, // 1000
|
||||
BSolidGroup = 1 << 13, // 2000
|
||||
BGroundPlaneGroup = 1 << 8, // 0400
|
||||
BTerrainGroup = 1 << 9, // 0800
|
||||
BRaycastGroup = 1 << 10, // 1000
|
||||
BSolidGroup = 1 << 11, // 2000
|
||||
// BLinksetGroup = xx // a linkset proper is either static or dynamic
|
||||
BLinksetChildGroup = 1 << 14, // 4000
|
||||
BLinksetChildGroup = 1 << 12, // 4000
|
||||
};
|
||||
|
||||
// CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0
|
||||
|
||||
@@ -120,6 +120,7 @@ public static class BSParam
|
||||
public static float NumberOfSolverIterations { get; private set; }
|
||||
public static bool UseSingleSidedMeshes { get; private set; }
|
||||
public static float GlobalContactBreakingThreshold { get; private set; }
|
||||
public static float PhysicsUnmanLoggingFrames { get; private set; }
|
||||
|
||||
// Avatar parameters
|
||||
public static float AvatarFriction { get; private set; }
|
||||
@@ -671,6 +672,10 @@ public static class BSParam
|
||||
0f,
|
||||
(s) => { return GlobalContactBreakingThreshold; },
|
||||
(s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ),
|
||||
new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics",
|
||||
0f,
|
||||
(s) => { return PhysicsUnmanLoggingFrames; },
|
||||
(s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ),
|
||||
|
||||
new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy",
|
||||
7 ),
|
||||
|
||||
@@ -112,15 +112,14 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
|
||||
m_physicsScene.PE.SetRestitution(m_mapInfo.terrainBody, BSParam.TerrainRestitution);
|
||||
m_physicsScene.PE.SetCollisionFlags(m_mapInfo.terrainBody, CollisionFlags.CF_STATIC_OBJECT);
|
||||
|
||||
m_mapInfo.terrainBody.collisionType = CollisionType.Terrain;
|
||||
|
||||
// Return the new terrain to the world of physical objects
|
||||
m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_mapInfo.terrainBody);
|
||||
|
||||
// redo its bounding box now that it is in the world
|
||||
m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_mapInfo.terrainBody);
|
||||
|
||||
m_mapInfo.terrainBody.collisionType = CollisionType.Terrain;
|
||||
m_mapInfo.terrainBody.ApplyCollisionMask(m_physicsScene);
|
||||
|
||||
// Make it so the terrain will not move or be considered for movement.
|
||||
m_physicsScene.PE.ForceActivationState(m_mapInfo.terrainBody, ActivationState.DISABLE_SIMULATION);
|
||||
|
||||
|
||||
@@ -138,13 +138,14 @@ public sealed class BSTerrainManager : IDisposable
|
||||
m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape,
|
||||
BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity);
|
||||
|
||||
m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane);
|
||||
m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane);
|
||||
// Ground plane does not move
|
||||
m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION);
|
||||
// Everything collides with the ground plane.
|
||||
m_groundPlane.collisionType = CollisionType.Groundplane;
|
||||
m_groundPlane.ApplyCollisionMask(m_physicsScene);
|
||||
|
||||
m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane);
|
||||
m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane);
|
||||
|
||||
// Ground plane does not move
|
||||
m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION);
|
||||
|
||||
BSTerrainPhys initialTerrain = new BSTerrainHeightmap(m_physicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize);
|
||||
lock (m_terrains)
|
||||
|
||||
@@ -235,7 +235,8 @@ public static Dictionary<CollisionType, CollisionTypeFilterGroup> CollisionTypeM
|
||||
{ CollisionType.Groundplane,
|
||||
new CollisionTypeFilterGroup(CollisionType.Groundplane,
|
||||
(uint)CollisionFilterGroups.BGroundPlaneGroup,
|
||||
(uint)CollisionFilterGroups.BAllGroup)
|
||||
// (uint)CollisionFilterGroups.BAllGroup)
|
||||
(uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup))
|
||||
},
|
||||
{ CollisionType.Terrain,
|
||||
new CollisionTypeFilterGroup(CollisionType.Terrain,
|
||||
|
||||
Reference in New Issue
Block a user