Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3e7ac9e

Browse files
committed
Regen for latest Box2D commits
1 parent ddbd4ba commit 3e7ac9e

8 files changed

Lines changed: 98 additions & 208 deletions

File tree

Box2dNet.OldSamples/ConsoleDebugDraw.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public static b2DebugDraw Create()
2525
debugDraw.drawBounds = true;
2626
debugDraw.drawMass = true;
2727
debugDraw.drawBodyNames = true;
28-
debugDraw.drawContacts = true;
28+
debugDraw.drawContactPoints = true;
2929
debugDraw.drawGraphColors = true;
3030
debugDraw.drawContactNormals = true;
31-
debugDraw.drawContactImpulses = true;
32-
debugDraw.drawFrictionImpulses = true;
31+
debugDraw.drawContactForces = true;
3332
debugDraw.drawContactFeatures = true;
33+
debugDraw.drawFrictionForces = true;
3434
debugDraw.drawIslands = true;
3535

3636
return debugDraw;

Box2dNet.Samples/Box2dMeshDrawer.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public void DrawPolygon(IntPtr vertices, int vertexCount, b2HexColor color, IntP
2222
var verticesSpan = vertices.NativeArrayAsSpan<Vector2>(vertexCount);
2323
var p = Polygon8.FromSpan(verticesSpan);
2424
Mesh.PolygonEdges(p, PxWorldSize, 0, color.ToDotNet());
25-
2625
}
2726

2827
public void DrawSolidPolygon(b2Transform transform, IntPtr vertices, int vertexCount, float radius, b2HexColor color, IntPtr context)
@@ -90,18 +89,17 @@ public void DrawWorld(b2WorldId worldId)
9089
DrawPoint = Marshal.GetFunctionPointerForDelegate((DrawPoint)DrawPoint),
9190
DrawString = Marshal.GetFunctionPointerForDelegate((DrawString)DrawString),
9291
drawingBounds = bounds,
93-
// useDrawingBounds = false,
9492
drawShapes = true,
9593
drawJoints = true,
9694
drawJointExtras = false,
9795
drawBounds = false,
9896
drawMass = false,
99-
drawContacts = false,
97+
drawContactPoints = false,
10098
drawGraphColors = false,
10199
drawContactNormals = false,
102-
drawContactImpulses = false,
100+
drawContactForces = false,
103101
drawContactFeatures = false,
104-
drawFrictionImpulses = false,
102+
drawFrictionForces = false,
105103
drawIslands = false,
106104
context = meshHandle
107105
};

Box2dNet.Samples/Sample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public virtual void Step(Box2dMeshDrawer meshDrawer)
9898
//m_context.draw.m_debugDraw.drawBounds = m_context.drawBounds;
9999
//m_context.draw.m_debugDraw.drawMass = m_context.drawMass;
100100
//m_context.draw.m_debugDraw.drawBodyNames = m_context.drawBodyNames;
101-
//m_context.draw.m_debugDraw.drawContacts = m_context.drawContactPoints;
101+
//m_context.draw.m_debugDraw.drawContactPoints = m_context.drawContactPoints;
102102
//m_context.draw.m_debugDraw.drawGraphColors = m_context.drawGraphColors;
103103
//m_context.draw.m_debugDraw.drawContactNormals = m_context.drawContactNormals;
104104
//m_context.draw.m_debugDraw.drawContactImpulses = m_context.drawContactImpulses;

Box2dNet/Box2dNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<RepositoryUrl>https://github.com/thomasvt/Box2D3Net</RepositoryUrl>
1515
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1616
<NoWarn>$(NoWarn);1591</NoWarn> <!-- suppress warnings for missing docs -->
17-
<Version>3.1.8.5</Version>
17+
<Version>3.1.8.6</Version>
1818
</PropertyGroup>
1919

2020
<ItemGroup>

Box2dNet/Interop/B2Api.DebugDraw.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,12 @@ public struct b2DebugDraw
114114

115115
/// Bounds to use if restricting drawing to a rectangular region
116116
public b2AABB drawingBounds;
117+
118+
/// Scale to use when drawing forces
119+
public float forceScale;
117120

118-
/// Option to restrict drawing to a rectangular region. May suffer from unstable depth sorting.
119-
//[MarshalAs(UnmanagedType.U1)] public bool useDrawingBounds;
121+
/// Global scaling for joint drawing
122+
public float jointScale;
120123

121124
/// Option to draw shapes
122125
[MarshalAs(UnmanagedType.U1)] public bool drawShapes;
@@ -137,22 +140,22 @@ public struct b2DebugDraw
137140
[MarshalAs(UnmanagedType.U1)] public bool drawBodyNames;
138141

139142
/// Option to draw contact points
140-
[MarshalAs(UnmanagedType.U1)] public bool drawContacts;
143+
[MarshalAs(UnmanagedType.U1)] public bool drawContactPoints;
141144

142145
/// Option to visualize the graph coloring used for contacts and joints
143146
[MarshalAs(UnmanagedType.U1)] public bool drawGraphColors;
144147

148+
/// Option to draw contact feature ids
149+
[MarshalAs(UnmanagedType.U1)] public bool drawContactFeatures;
150+
145151
/// Option to draw contact normals
146152
[MarshalAs(UnmanagedType.U1)] public bool drawContactNormals;
147153

148-
/// Option to draw contact normal impulses
149-
[MarshalAs(UnmanagedType.U1)] public bool drawContactImpulses;
150-
151154
/// Option to draw contact feature ids
152-
[MarshalAs(UnmanagedType.U1)] public bool drawContactFeatures;
155+
[MarshalAs(UnmanagedType.U1)] public bool drawContactForces;
153156

154157
/// Option to draw contact friction impulses
155-
[MarshalAs(UnmanagedType.U1)] public bool drawFrictionImpulses;
158+
[MarshalAs(UnmanagedType.U1)] public bool drawFrictionForces;
156159

157160
/// Option to draw islands as bounding boxes
158161
[MarshalAs(UnmanagedType.U1)] public bool drawIslands;

0 commit comments

Comments
 (0)