Esempio n. 1
0
		public void TestCleanup()
		{
			_physics.Dispose();
			_physics = null;

			_shape = null;
		}
Esempio n. 2
0
        public void SetupHeightField()
        {
            _physics = CreatePhysicsAndScene();

            const int rows = 25, columns = 40;
            var       samples = HeightFieldTestUtil.CreateSampleGrid(rows, columns);

            var heightFieldDesc = new HeightFieldDesc()
            {
                NumberOfRows        = rows,
                NumberOfColumns     = columns,
                Samples             = samples,
                Thickness           = 4.2f,
                ConvexEdgeThreshold = 6.6f,
                Flags = HeightFieldFlag.NoBoundaryEdges
            };

            var cooking = _physics.Physics.CreateCooking();

            var  stream     = new MemoryStream();
            bool cookResult = cooking.CookHeightField(heightFieldDesc, stream);

            stream.Position = 0;

            _heightField = _physics.Physics.CreateHeightField(stream);

            Assert.IsNotNull(_heightField);
            Assert.IsFalse(_heightField.Disposed);
        }
Esempio n. 3
0
		public void TestCleanup()
		{
			_physics.Dispose();
			_physics = null;

			_fluid = null;
		}
Esempio n. 4
0
        public void TestCleanup()
        {
            _physics.Dispose();
            _physics = null;

            _shape = null;
        }
Esempio n. 5
0
		public void TestCleanup()
		{
			_physics.Dispose();
			_physics = null;

			_actor = null;
		}
        public void TestCleanup()
        {
            _physics.Dispose();
            _physics = null;

            _fluid = null;
        }
Esempio n. 7
0
        public void TestCleanup()
        {
            _physics.Dispose();
            _physics = null;

            _actor = null;
        }
Esempio n. 8
0
        public void Cleanup()
        {
            _heightField.Dispose();
            _heightField = null;

            _physics.Dispose();
            _physics = null;
        }
Esempio n. 9
0
		public void TestInitalize()
		{
			_physics = CreatePhysicsAndScene();

			ParticleSystem particleSystem = _physics.Physics.CreateParticleSystem(100);

			_fluid = _physics.Physics.CreateParticleFluid(100);
		}
        public void TestInitalize()
        {
            _physics = CreatePhysicsAndScene();

            ParticleSystem particleSystem = _physics.Physics.CreateParticleSystem(100);

            _fluid = _physics.Physics.CreateParticleFluid(100);
        }
		public void Cleanup()
		{
			_heightField.Dispose();
			_heightField = null;

			_physics.Dispose();
			_physics = null;
		}
Esempio n. 12
0
        public void TestInitalize()
        {
            _physics = CreatePhysicsAndScene();

            _material = _physics.Physics.CreateMaterial(0.5f, 0.5f, 0.1f);

            _actor = _physics.Physics.CreateRigidDynamic();

            _physics.Scene.AddActor(_actor);
        }
Esempio n. 13
0
		public void TestInitalize()
		{
			_physics = CreatePhysicsAndScene();

			_material = _physics.Physics.CreateMaterial(0.5f, 0.5f, 0.1f);

			_actor = _physics.Physics.CreateRigidDynamic();

			_physics.Scene.AddActor(_actor);
		}
Esempio n. 14
0
		public void TestInitalize()
		{
			_physics = CreatePhysicsAndScene();

			var material = _physics.Physics.CreateMaterial(0.5f, 0.5f, 0.1f);

			var actor = _physics.Physics.CreateRigidDynamic();

			_shape = actor.CreateShape(new BoxGeometry(5, 5, 5), material);

			_physics.Scene.AddActor(actor);
		}
Esempio n. 15
0
        public void TestInitalize()
        {
            _physics = CreatePhysicsAndScene();

            var material = _physics.Physics.CreateMaterial(0.5f, 0.5f, 0.1f);

            var actor = _physics.Physics.CreateRigidDynamic();

            _shape = actor.CreateShape(new BoxGeometry(5, 5, 5), material);

            _physics.Scene.AddActor(actor);
        }
Esempio n. 16
0
		public void TestInitalize()
		{
			_physics = CreatePhysicsAndScene();

			_material = _physics.Physics.CreateMaterial(0.5f, 0.5f, 0.1f);

			_actor = _physics.Physics.CreateRigidDynamic();

			// Make the actor kinematic because Triangle mesh, heightfield and plane geometry shapes require it.
			_actor.Flags = RigidDynamicFlags.Kinematic;

			_physics.Scene.AddActor(_actor);
		}
Esempio n. 17
0
        public void TestInitalize()
        {
            _physics = CreatePhysicsAndScene();

            _material = _physics.Physics.CreateMaterial(0.5f, 0.5f, 0.1f);

            _actor = _physics.Physics.CreateRigidDynamic();

            // Make the actor kinematic because Triangle mesh, heightfield and plane geometry shapes require it.
            _actor.RigidBodyFlags = RigidBodyFlag.Kinematic;

            _physics.Scene.AddActor(_actor);
        }
		public void SetupHeightField()
		{
			_physics = CreatePhysicsAndScene();

			const int rows = 25, columns = 40;
			var samples = HeightFieldTestUtil.CreateSampleGrid(rows, columns);

			var heightFieldDesc = new HeightFieldDesc()
			{
				NumberOfRows = rows,
				NumberOfColumns = columns,
				Samples = samples,
				Thickness = 4.2f,
				ConvexEdgeThreshold = 6.6f,
				Flags = HeightFieldFlag.NoBoundaryEdges
			};

			_heightField = _physics.Physics.CreateHeightField(heightFieldDesc);

			Assert.IsNotNull(_heightField);
			Assert.IsFalse(_heightField.Disposed);
		}
        public void SetupHeightField()
        {
            _physics = CreatePhysicsAndScene();

            const int rows = 25, columns = 40;
            var       samples = HeightFieldTestUtil.CreateSampleGrid(rows, columns);

            var heightFieldDesc = new HeightFieldDesc()
            {
                NumberOfRows        = rows,
                NumberOfColumns     = columns,
                Samples             = samples,
                Thickness           = 4.2f,
                ConvexEdgeThreshold = 6.6f,
                Flags = HeightFieldFlag.NoBoundaryEdges
            };

            _heightField = _physics.Physics.CreateHeightField(heightFieldDesc);

            Assert.IsNotNull(_heightField);
            Assert.IsFalse(_heightField.Disposed);
        }
Esempio n. 20
0
 protected void AssertNoPhysXErrors(PhysicsAndSceneTestUnit physics)
 {
     Assert.IsFalse(physics.ErrorOutput.HasErrors, physics.ErrorOutput.LastError);
 }
Esempio n. 21
0
		protected void AssertNoPhysXErrors(PhysicsAndSceneTestUnit physics)
		{
			Assert.IsFalse(physics.ErrorOutput.HasErrors, physics.ErrorOutput.LastError);
		}