public void Test_IsRegistered() { var node = new Node (); var rb = new RigidBody (); rb.AddShape (new SphereShape (1)); rb.Material = new PhysicsMaterial (); node.Attach (rb); var phys = new PhysicsSimulator (); phys.AddRigidBody (node); Assert.AreEqual (true, phys.IsRegistered(node)); }
public void Test_AddRigidBody() { var node = new Node (); var rb = new RigidBody (); rb.AddShape(new SphereShape (1)); rb.Material = new PhysicsMaterial (); node.Attach (rb); var phys = new PhysicsSimulator (); phys.AddRigidBody (node); Assert.AreEqual (1, phys.RigidBodyCount); Assert.AreEqual (1, phys.RigidBodies.Count ()); }