コード例 #1
0
ファイル: MainSample.cs プロジェクト: dkushner/PhysX.NET
		/// <summary>Simple examples of all the PhysX bits running together.</summary>
		protected override void LoadPhysics(Scene scene)
		{
			// The ground plane (if created) sould be the first actor
			var groundActor = scene.Actors.First();
			groundActor.Name = "Default Ground Plane";

			//

			// Create most of the PhysX objects available
			RigidBodySample.SimpleBoxes(scene);
			ClothSample.FlagOfCloth(scene);
			JointSample.RevoluteJoint(scene);
			JointSample.PrismaticJointWithLimit(scene);
			FluidSample.FluidWithEmitterAndDrain(scene);
			ForceFieldSample.CreateForceField(scene);
			HeightfieldSample.HeightfieldGrid(scene);
			_torusModel = ConvexSample.ActorWithConvexShape(scene, Engine.GraphicsDevice);
			ControllerSample.CapsuleController(scene);

			// Enable to view soft bodies, they run slowly
			if (false)
				SoftBodySample.TeapotSoftBody(scene);

			_basicVehicle = new VehicleSample(Engine.Scene);
		}
コード例 #2
0
        /// <summary>Simple examples of all the PhysX bits running together.</summary>
        protected override void LoadPhysics(Scene scene)
        {
            // The ground plane (if created) sould be the first actor
            var groundActor = scene.Actors.First();

            groundActor.Name = "Default Ground Plane";

            //

            // Create most of the PhysX objects available
            RigidBodySample.SimpleBoxes(scene);
            ClothSample.FlagOfCloth(scene);
            JointSample.RevoluteJoint(scene);
            JointSample.PrismaticJointWithLimit(scene);
            FluidSample.FluidWithEmitterAndDrain(scene);
            ForceFieldSample.CreateForceField(scene);
            HeightfieldSample.HeightfieldGrid(scene);
            _torusModel = ConvexSample.ActorWithConvexShape(scene, Engine.GraphicsDevice);
            ControllerSample.CapsuleController(scene);

            // Enable to view soft bodies, they run slowly
            if (false)
            {
                SoftBodySample.TeapotSoftBody(scene);
            }

            _basicVehicle = new VehicleSample(Engine.Scene);
        }