/PhysicsEngines/Tests2D/Program.cs
C# | 756 lines | 418 code | 115 blank | 223 comment | 17 complexity | 6512b8c081070d00d4f4603c2fcce748 MD5 | raw file
Possible License(s): Apache-2.0
- using System.Collections.Generic;
- using Delta.Engine;
- using Delta.InputSystem;
- using Delta.Rendering.Basics.Fonts;
- using Delta.Rendering.Basics.Materials;
- using Delta.Utilities;
- using Delta.Utilities.Datatypes;
- using Delta.Utilities.Datatypes.Advanced;
- using Delta.Utilities.Helpers;
- using NUnit.Framework;
-
- namespace Delta.PhysicsEngines.Tests2D
- {
- /// <summary>
- /// Physics tests
- /// </summary>
- [Category("Visual")]
- internal class Program
- {
- #region Main (Static)
- /// <summary>
- /// Main entry point, will just call one of the tests, uncomment the rest
- /// </summary>
- public static void Main()
- {
- // Note: In the default settings Physics modules are not used, thus none
- // of the physics tests will work. For this project (which has the same
- // content project name: Delta.PhysicsEngines.Tests2D) Farseer is already
- // set in the content Settings.xml and will be used. Do the same for your
- // own projects or use a line like this to force a specific physics
- // module. All required files will be copied automatically.
- //Settings.Modules.PhysicsModule = "Farseer";
-
- #region Tests
- //TestSimpleSimulation2D();
- //TestJoints();
- //TestForceAndTorque();
- //TestSingleBodyTwoShapes();
- //TestFlummySimulation2D();
- //TestRayCast();
- //TestControlledSpherePlane();
- //TestRotatingBall();
- //TestBallMovement();
- //TestResize();
- //TestCollisionEvents();
- //BugTest();
- #endregion
-
- #region Tutorials
- //Tutorials.Simple2DSimulation();
- //Tutorials.JointsSimulation();
- //Tutorials.BouncyBallSimulation();
- //Tutorials.FlummySimulation();
- //Tutorials.RayCasting2D();
- //Tutorials.CollisionEvents();
- Tutorials.PyramidSimulation();
- #endregion
- }
- #endregion
-
- #region TestSimpleSimulation2D (Static)
- /// <summary>
- /// Test a simple simulation with 2D physics
- /// </summary>
- [Test]
- public static void TestSimpleSimulation2D()
- {
- Physics.Gravity = new Vector(0.0f, 0.0981f, 0.0f);
- // Enable debug drawing
- Physics.DebugEnabled = true;
-
- // Create some (2 balls and 1 box) and the ground and let them
- // collide due to gravity
- List<PhysicsBody> balls = new List<PhysicsBody>();
-
- PhysicsBody box = null;
- PhysicsBody ground = null;
- float radius = 0.05f;
- float mass = 1.0f;
-
- Rectangle rectangle = new Rectangle(0.1f, 0.65f, 0.8f, 0.1f);
- Rectangle boxRect = new Rectangle(0.0f, 0.0f, 0.05f, 0.05f);
-
- for (int index = 0; index < 10; index++)
- {
- PhysicsBody ball = Physics.CreateCircle(radius, mass);
- ball.Position = new Vector(RandomHelper.RandomFloat(-0.5f, 0.5f),
- RandomHelper.RandomFloat(-0.5f, 0.5f), 0.0f);
- ball.Friction = 1.0f;
- ball.IsStatic = false;
-
- // Set debug color to red.
- ball.DebugColor = Color.Red;
-
- balls.Add(ball);
- }
-
- box = Physics.CreateRectangle(
- boxRect.Width, boxRect.Height, 1.0f);
- box.Position = new Vector(.5f, .4f, 0.0f);
- box.IsStatic = false;
- box.Friction = 1.0f;
- box.DebugColor = Color.Green;
-
- // set our ground
- ground = Physics.CreateRectangle(
- rectangle.Width, rectangle.Height, 1f);
- ground.Position = new Vector(rectangle.Center, 0.0f);
- ground.IsStatic = true;
- ground.Friction = 1.0f;
- ground.DebugColor = Color.Yellow;
-
- Application.Start(delegate
- {
- //Font.DrawTopLeftInformation("Fps: "+Time.Fps);
- });
- }
- #endregion
-
- #region TestJoints (Static)
- /// <summary>
- /// Test a simple simulation with 2D physics and joints
- /// </summary>
- [Test]
- public static void TestJoints()
- {
- Physics.Gravity = new Vector(0.0f, 0.0981f, 0.0f);
- // Enable debug drawing
- Physics.DebugEnabled = true;
-
- // Create some (2 balls and 1 box) and the ground and let them
- // collide due to gravity
- List<PhysicsBody> balls = new List<PhysicsBody>();
-
- PhysicsBody box = null;
- PhysicsBody ground = null;
- float radius = 0.05f;
- float mass = 1.0f;
-
- Rectangle rectangle = new Rectangle(0.1f, 0.65f, 0.8f, 0.1f);
- Rectangle boxRect = new Rectangle(0.0f, 0.0f, 0.05f, 0.05f);
-
- for (int index = 0; index < 10; index++)
- {
- PhysicsBody ball = Physics.CreateCircle(radius, mass);
- ball.Position = new Vector(RandomHelper.RandomFloat(-0.5f, 0.5f),
- RandomHelper.RandomFloat(-0.5f, 0.5f), 0.0f);
- ball.Friction = 1.0f;
- ball.IsStatic = false;
-
- // Set debug color to red.
- ball.DebugColor = Color.Red;
-
- balls.Add(ball);
- } // for
-
- box = Physics.CreateRectangle(
- boxRect.Width, boxRect.Height, 1.0f);
- box.Position = new Vector(.5f, .4f, 0.0f);
- box.IsStatic = false;
- box.Friction = 1.0f;
- box.DebugColor = Color.Green;
-
- PhysicsBody box2 = Physics.CreateRectangle(
- boxRect.Width, boxRect.Height, 1.0f);
- box2.Position = new Vector(.6f, .4f, 0.0f);
- box2.IsStatic = false;
- box2.Friction = 1.0f;
- box2.DebugColor = Color.Green;
-
- // Create angle joint
- PhysicsJoint joint = Physics.CreateAngleJoint(box, box2, 0.0f);
-
- // set our ground
- ground = Physics.CreateRectangle(
- rectangle.Width, rectangle.Height, 1f);
- ground.Position = new Vector(rectangle.Center, 0.0f);
- ground.IsStatic = true;
- ground.Friction = 1.0f;
- ground.DebugColor = Color.Yellow;
-
- Application.Start(delegate
- {
- Font.DrawTopLeftInformation("Fps: " + Time.Fps);
- });
- }
- #endregion
-
- #region TestForceAndTorque (Static)
- /// <summary>
- /// Test a simple simulation with 2D physics with no gravity and
- /// how to apply force and torque
- /// </summary>
- [Test]
- public static void TestForceAndTorque()
- {
- Physics.Gravity = new Vector(0.0f, 0.0981f, 0.0f);
- // Enable debug drawing
- Physics.DebugEnabled = true;
-
- PhysicsBody box = null;
- PhysicsBody ground = null;
-
- Rectangle rectangle = new Rectangle(0.1f, 0.65f, 0.8f, 0.1f);
- Rectangle boxRect = new Rectangle(0.0f, 0.0f, 0.05f, 0.05f);
-
- box = Physics.CreateRectangle(
- boxRect.Width, boxRect.Height, 1.0f);
- box.Position = new Vector(.5f, .4f, 0.0f);
- box.IsStatic = false;
- box.Friction = 1.0f;
- box.DebugColor = Color.Green;
-
- // Set our ground
- ground = Physics.CreateRectangle(
- rectangle.Width, rectangle.Height, 1f);
- ground.Position = new Vector(rectangle.Center, 0.0f);
- ground.IsStatic = true;
- ground.Friction = 1.0f;
- ground.DebugColor = Color.Yellow;
-
- // Farseer
- PhysicsBody rectBody = Physics.CreateRectangle(.05f, .05f, 1);
- rectBody.Position = new Vector(0.3f, 0.3f, 0.0f);
- rectBody.IsStatic = false;
- rectBody.DebugColor = Color.Gold;
-
- Application.Start(delegate
- {
- const float forceAmount = 60;
- const float torqueAmount = 40;
- Vector force = Vector.Zero;
-
- // Apply left force
- if (Input.Keyboard.IsPressed(InputButton.A))
- {
- force += new Vector(-forceAmount, 0, 0);
- }
-
- // Apply down force
- if (Input.Keyboard.IsPressed(InputButton.S))
- {
- force += new Vector(0, forceAmount, 0);
- }
-
- // Apply right force
- if (Input.Keyboard.IsPressed(InputButton.D))
- {
- force += new Vector(forceAmount, 0, 0);
- }
-
- // Apply up force
- if (Input.Keyboard.IsPressed(InputButton.W))
- {
- force += new Vector(0, -forceAmount, 0);
- }
-
- rectBody.ApplyForce(force);
-
- float torque = 0;
-
- if (Input.Keyboard.IsPressed(InputButton.Q))
- {
- torque += torqueAmount;
- }
- if (Input.Keyboard.IsPressed(InputButton.E))
- {
- torque -= torqueAmount;
- }
-
- rectBody.ApplyTorque(torque);
-
- Font.DrawTopLeftInformation("Fps: " + Time.Fps);
- });
- }
- #endregion
-
- #region TestSingleBodyTwoShapes (Static)
- /// <summary>
- /// Test a simple simulation with 2D physics with no gravity and
- /// single body with two shapes.
- /// </summary>
- [Test]
- public static void TestSingleBodyTwoShapes()
- {
- Physics.Gravity = new Vector(0.0f, 0.0981f, 0.0f);
- // Enable debug drawing
- Physics.DebugEnabled = true;
-
- //PhysicsBody box = null;
- //PhysicsBody ground = null;
-
- //Rectangle rectangle = new Rectangle(0.1f, 0.65f, 0.8f, 0.1f);
-
- //// set our ground
- //ground = Physics.CreateRectangle(
- // rectangle.Width, rectangle.Height, 1f);
- //ground.Position = new Vector(rectangle.Center, 0.0f);
- //ground.IsStatic = true;
- //ground.Friction = 1.0f;
- //ground.DebugColor = Color.Yellow;
-
- //// Farseer
- //PhysicsBody rectBody = Physics.Create2DBody(
- // new Point(0.3f, 0.3f));
- //rectBody.IsStatic = false;
-
- //Application.Start(delegate
- //{
- // const float forceAmount = 60;
- // const float torqueAmount = 40;
- // Vector force = Vector.Zero;
-
- // // Apply left force
- // if (Input.Keyboard.IsPressed(InputButton.A))
- // {
- // force += new Vector(-forceAmount, 0, 0);
- // }
-
- // // Apply down force
- // if (Input.Keyboard.IsPressed(InputButton.S))
- // {
- // force += new Vector(0, forceAmount, 0);
- // }
-
- // // Apply right force
- // if (Input.Keyboard.IsPressed(InputButton.D))
- // {
- // force += new Vector(forceAmount, 0, 0);
- // }
-
- // // Apply up force
- // if (Input.Keyboard.IsPressed(InputButton.W))
- // {
- // force += new Vector(0, -forceAmount, 0);
- // }
-
- // rectBody.ApplyForce(force);
-
- // float torque = 0;
-
- // if (Input.Keyboard.IsPressed(InputButton.Q))
- // {
- // torque += torqueAmount;
- // }
- // if (Input.Keyboard.IsPressed(InputButton.E))
- // {
- // torque -= torqueAmount;
- // }
-
- // rectBody.ApplyTorque(torque);
-
- // //Font.DrawTopLeftInformation(Time.Fps.ToString());
- //});
- }
- #endregion
-
- #region TestFlummySimulation2D (Static)
- /// <summary>
- /// Test flummy simulation 2D
- /// </summary>
- [Test]
- public static void TestFlummySimulation2D()
- {
- Physics.Gravity = new Vector(0.0f, 0.0981f, 0.0f);
- Physics.DebugEnabled = true;
-
- // Border properties
- float density = 5.0f;
- float friction = 1.0f;
- float restitution = 1.0f;
-
- // Border rectangle
- Rectangle leftRect = new Rectangle(0.0f, 0.0f, 0.1f, 1.0f);
- Rectangle topRect = new Rectangle(0.1f, 0.1f, 0.8f, 0.1f);
- Rectangle rightRect = new Rectangle(0.9f, 0.0f, 0.1f, 1.0f);
- Rectangle bottomRect = new Rectangle(0.1f, 0.8f, 0.8f, 0.1f);
-
- PhysicsBody leftBorder =
- Physics.CreateRectangle(leftRect.Width, leftRect.Height, density);
- leftBorder.Friction = friction;
- leftBorder.Restitution = restitution;
- leftBorder.Position2D = leftRect.Center;
- leftBorder.IsStatic = true;
- leftBorder.DebugColor = Color.White;
-
- PhysicsBody topBorder =
- Physics.CreateRectangle(topRect.Width, topRect.Height, density);
- topBorder.Friction = friction;
- topBorder.Restitution = restitution;
- topBorder.Position2D = topRect.Center;
- topBorder.IsStatic = true;
- topBorder.DebugColor = Color.White;
-
- PhysicsBody rightBorder =
- Physics.CreateRectangle(rightRect.Width, rightRect.Height, density);
- rightBorder.Friction = friction;
- rightBorder.Restitution = restitution;
- rightBorder.Position2D = rightRect.Center;
- rightBorder.IsStatic = true;
- rightBorder.DebugColor = Color.White;
-
- PhysicsBody bottomBorder =
- Physics.CreateRectangle(bottomRect.Width, bottomRect.Height, density);
- bottomBorder.Friction = friction;
- bottomBorder.Restitution = restitution;
- bottomBorder.Position2D = bottomRect.Center;
- bottomBorder.IsStatic = true;
-
- // Create a ball;
- PhysicsBody ball = Physics.CreateCircle(0.035f, 1.0f);
- ball.Friction = 0.3f;
- ball.Restitution = 1.0f;
- ball.IsStatic = false;
- ball.Position2D = Point.Half;
- ball.DebugColor = Color.CornflowerBlue;
-
- // The Physics engine performs debug shape draw for us.
- Application.Start();
- }
- #endregion
-
- #region TestRotatingBall (Static)
- [Test]
- public static void TestRotatingBall()
- {
- const float BallRadius = 0.02f;
- const float BallMass = 1.0f;
- Point startPosition = new Point(0.1f, 0.5f);
- float setRotationVelocity = 180.0f;
- // Disable gravity
- Physics.Gravity = Vector.Zero;
-
- // Create ball
- var ball = Physics.CreateCircle(BallRadius, BallMass);
- ball.Position2D = startPosition;
- // No friction or restitution, fly ball, fly ;)
- ball.Friction = 0.0f;
- //not longer used: ball.Restitution = 0.0f;
- // Set the body type (the ball should fly, default is static)
- ball.IsStatic = false;
-
- Material2DColored ballMaterial = new Material2DColored(
- //"SmokeBrightTransparency");
- //"SmokeAdditive");
- "DeltaEngineLogo");
-
- Application.Start(delegate
- {
- // When we press the mouse or touch the screen, rotate!
- if (Input.Mouse.LeftButtonReleased ||
- Input.Touch.TouchReleased)
- {
- ball.AngularVelocity2D = setRotationVelocity;
- }
- // Draw the physics shape as a line circle
- //Circle.DrawOutline(ball.Position, ball.Radius, Color.Red);
- ballMaterial.Draw(Rectangle.FromCenter(ball.Position2D,
- ballMaterial.Size), ball.Rotation);
-
- Font.DrawTopLeftInformation(
- "AngularVelocity=" + ball.AngularVelocity2D +
- ", Rotation=" + ball.Rotation);
- });
- }
- #endregion
-
- #region TestBallMovement (Static)
- /// <summary>
- /// Test ball movement
- /// </summary>
- [Test]
- public static void TestBallMovement()
- {
- const float BallRadius = 0.02f;
- const float BallMass = 1.0f;
- Point startPosition = new Point(0.1f, 0.5f);
- Point setVelocity = new Point(50.0f, 0.0f);
- // Disable gravity
- Physics.Gravity = Vector.Zero;
-
- // Create ball
- var ball = Physics.CreateCircle(BallRadius, BallMass);
- ball.Position2D = startPosition;
- // No friction or restitution, fly ball, fly ;)
- ball.Friction = 0.0f;
- //not longer used: ball.Restitution = 0.0f;
- // Set the body type (the ball should fly, default is static)
- ball.IsStatic = false;
-
- Material2D ballMaterial = new Material2D(
- //"SmokeBrightTransparency");
- //"SmokeAdditive");
- "DeltaEngineLogo");
- //Second ball without physics
- Point ballPosition = startPosition + new Point(0, 0.2f);
- Point ballVelocity = Point.Zero;
-
- Application.Start(delegate
- {
- // When we press, give a velocity to the ball
- if (Input.Mouse.LeftButtonReleased ||
- Input.Touch.TouchReleased)
- {
- ball.LinearVelocity = new Vector(setVelocity, 0.0f);
- ballVelocity = setVelocity / 1000.0f;
- }
- else if (Input.Mouse.RightButtonReleased)
- {
- ball.Position2D = startPosition;
- ballPosition = startPosition + new Point(0, 0.2f);
- }
- else if (Input.Mouse.MiddleButtonReleased)
- {
- ball.Stop();
- }
-
- // Draw the physics shape as a line circle
- //Circle.DrawOutline(ball.Position, ball.Radius, Color.Red);
- ballMaterial.Draw(Rectangle.FromCenter(ball.Position2D,
- ballMaterial.Size));
-
- // And a second ball without physics
- ballMaterial.Draw(Rectangle.FromCenter(ballPosition,
- ballMaterial.Size));
-
- ballPosition += ballVelocity * Time.Delta;
-
- if (Input.Keyboard.ShiftIsPressed)
- {
- Font.DrawTopLeftInformation("ballPosition=" + ballPosition);
- }
- });
- }
- #endregion
-
- #region BugTest (Static)
- /// <summary>
- /// Test method for bug #3496 to check if 2 balls and a box collide properly
- /// </summary>
- [Test]
- public static void BugTest()
- {
- Physics.Gravity = new Vector(0.0f, 0.0981f, 0.0f);
- // Enable debug drawing
- Physics.DebugEnabled = true;
-
- // Create some (2 balls and 1 box) and the ground and let them
- // collide due to gravity
- List<PhysicsBody> balls = new List<PhysicsBody>();
-
- PhysicsBody box = null;
- PhysicsBody ground = null;
- float radius = 0.05f;
- float mass = 1.0f;
-
- Rectangle rectangle = new Rectangle(0.1f, 0.65f, 0.8f, 0.1f);
- Rectangle boxRect = new Rectangle(0.0f, 0.0f, 0.05f, 0.05f);
-
- for (int index = 0; index < 10; index++)
- {
- PhysicsBody ball = Physics.CreateCircle(radius, mass);
- ball.Position = new Vector(RandomHelper.RandomFloat(-0.5f, 0.5f),
- RandomHelper.RandomFloat(-0.5f, 0.5f), 0.0f);
- ball.Friction = 1.0f;
- ball.IsStatic = false;
-
- // Set debug color to red.
- ball.DebugColor = Color.Red;
-
- balls.Add(ball);
- }
-
- box = Physics.CreateRectangle(
- boxRect.Width, boxRect.Height, 1.0f);
- box.Position = new Vector(.5f, .4f, 0.0f);
- box.IsStatic = false;
- box.Friction = 1.0f;
- box.DebugColor = Color.Green;
-
- // set our ground
- ground = Physics.CreateRectangle(
- rectangle.Width, rectangle.Height, 1f);
- ground.Position = new Vector(rectangle.Center, 0.0f);
- ground.IsStatic = true;
- ground.Friction = 1.0f;
- ground.DebugColor = Color.Yellow;
-
- Application.Start();
- }
- #endregion
-
- #region TestRayCast (Static)
- /// <summary>
- /// Test ray cast
- /// </summary>
- [Test]
- public static void TestRayCast()
- {
- Physics.Gravity = new Vector(0.0f, 0.0981f, 0.0f);
- // create a plane so that every ray that doesnt hit an object will hit
- // the plane
- //const int size = 24;
- //const int height = -5;
-
- //// add a plane to the physics world
- //VisualPhysicsPlane visualPhysicsPlane = new VisualPhysicsPlane(size, size, new Vector(0, 0, height));
-
- //// create a box and a sphere
- //VisualPhysicsBox visualBox = new VisualPhysicsBox(new Vector(-2, 0, 0), 4);
- //VisualPhysicsSphere visualSphere = new VisualPhysicsSphere(new Vector(5, 0, 0), 2);
-
- //// this line of code also sets the camera, i.e. ViewProjection matrix
- //LookAtCamera cam = new LookAtCamera(new Vector(0, 25, 10));
-
- //// create a moving ray
- //Vector rayStart = new Vector(0, 0, 10);
- //Vector lookTarget = new Vector();
- //Ray testRay = new Ray(rayStart, lookTarget - rayStart);
-
- //Application.Start(delegate
- //{
- // IPhysicsShape3D catchedObject;
- // Vector intersection;
- // Vector normal;
-
- // //Draw the sphere and box
- // visualBox.Draw();
- // visualSphere.Draw();
-
- // // perform ray cast
- // bool rayCasted = PhysicsManager.RayCast(testRay,
- // out catchedObject, out intersection, out normal);
-
- // // update the objects color according to the result of the ray cast
- // if (catchedObject == visualBox.PhysicsBox)
- // visualBox.DebugDrawColor = Color.Red;
- // else
- // visualBox.DebugDrawColor = Color.Green;
-
- // if (catchedObject == visualSphere.PhysicsSphere)
- // visualSphere.DebugDrawColor = Color.Red;
- // else
- // visualSphere.DebugDrawColor = Color.Green;
-
- // //Draw the physics plane
- // visualPhysicsPlane.Draw();
-
- // // render the line according to the deleted intersection
- // if (rayCasted)
- // {
- // // render up to the intersection point
- // Line.Draw(testRay.Position, intersection, Color.Yellow);
-
- // // render the surface normal at this point
- // Line.Draw(intersection, intersection + normal, Color.White);
- // }
- // else
- // {
- // Line.Draw(testRay.Position,
- // testRay.Position + 15.0f * testRay.Direction, Color.Yellow);
- // }
-
- // // update the direction of the ray
- // lookTarget.X = 8 * (float)Math.Cos(0.3f * Time.CurrentExactTime); ;
- // lookTarget.Y = 2.0f * (float)Math.Sin(5.0f * Time.CurrentExactTime);
- // testRay.Direction = Vector.Normalize(lookTarget - testRay.Position);
- //});
- }
- #endregion
-
- #region TestCollisionEvents (Static)
- /// <summary>
- /// Performs collision check between two bodies with events.
- /// </summary>
- [Test]
- public static void TestCollisionEvents()
- {
- Physics.Gravity = new Vector(0.0f, 0.0981f, 0.0f);
- // Enable debug drawing
- Physics.DebugEnabled = true;
-
- // Create some (2 balls and 1 box) and the ground and let them
- // collide due to gravity
- List<PhysicsBody> balls = new List<PhysicsBody>();
-
- PhysicsBody box = null;
- PhysicsBody ground = null;
- float radius = 0.05f;
- float mass = 1.0f;
-
- Rectangle rectangle = new Rectangle(0.1f, 0.65f, 0.8f, 0.1f);
- Rectangle boxRect = new Rectangle(0.0f, 0.0f, 0.05f, 0.05f);
-
- for (int index = 0; index < 10; index++)
- {
- PhysicsBody ball = Physics.CreateCircle(radius, mass);
- ball.Position = new Vector(RandomHelper.RandomFloat(-0.5f, 0.5f),
- RandomHelper.RandomFloat(-0.5f, 0.5f), 0.0f);
- ball.Friction = 1.0f;
- ball.IsStatic = false;
-
- // Set debug color to red.
- ball.DebugColor = Color.Red;
- ball.Name = "Ball_" + index;
- balls.Add(ball);
- } // for
-
- box = Physics.CreateRectangle(
- boxRect.Width, boxRect.Height, 1.0f);
- box.Position = new Vector(.5f, .4f, 0.0f);
- box.IsStatic = false;
- box.Friction = 1.0f;
- box.DebugColor = Color.Green;
- box.Name = "Box";
-
- // set our ground
- ground = Physics.CreateRectangle(
- rectangle.Width, rectangle.Height, 1f);
- ground.Position = new Vector(rectangle.Center, 0.0f);
- ground.IsStatic = true;
- ground.Friction = 1.0f;
- ground.DebugColor = Color.Yellow;
- ground.Name = "PlaneBody";
- ground.CollisionBegin += ground_CollisionBegin;
- ground.CollisionEnd += ground_CollisionEnd;
-
- Application.Start();
- }
- #endregion
-
- #region Methods (Private)
-
- #region ground_CollisionBegin
- private static void ground_CollisionBegin(PhysicsBody other)
- {
- Log.Info(
- string.Format("Given body '{0}' ends collision with this plane body.",
- other.Name)
- );
- }
- #endregion
-
- #region ground_CollisionEnd
- private static void ground_CollisionEnd(PhysicsBody other)
- {
- Log.Info(
- string.Format("Given body '{0}' collide with this plane body.",
- other.Name)
- );
- }
- #endregion
-
- #endregion
- }
- }