public PhysxPhysicWorld(CoreDescription CoreDescription, SceneDescription SceneDescription, bool connectToRemoteDebugger = false, bool safeAndSlowUpdate = true)
        {
            this.safeAndSlowUpdate = safeAndSlowUpdate;
            UserOutput output = new UserOutput();
            this.Core = new Core(CoreDescription, output);

            Core core = this.Core;
            core.SetParameter(PhysicsParameter.VisualizationScale, 2.0f);
            core.SetParameter(PhysicsParameter.VisualizeCollisionShapes, true);
            core.SetParameter(PhysicsParameter.VisualizeClothMesh, true);
            core.SetParameter(PhysicsParameter.VisualizeJointLocalAxes, true);
            core.SetParameter(PhysicsParameter.VisualizeJointLimits, true);
            core.SetParameter(PhysicsParameter.VisualizeFluidPosition, true);
            core.SetParameter(PhysicsParameter.VisualizeFluidEmitters, false); // Slows down rendering a bit too much
            core.SetParameter(PhysicsParameter.VisualizeForceFields, true);
            core.SetParameter(PhysicsParameter.VisualizeSoftBodyMesh, true);

            this.Scene = core.CreateScene(SceneDescription);

            // Connect to the remote debugger if it's there
            if (connectToRemoteDebugger)
                core.Foundation.RemoteDebugger.Connect("localhost");

            ControllerManager = Scene.CreateControllerManager();
            objs = new List<IPhysicObject>();
            ctns = new List<IPhysicConstraint>();
            TriggerReport = new Physics.TriggerReport();
            Scene.UserTriggerReport = TriggerReport;
            Utilities.ErrorReport = errorReport;
        }
Ejemplo n.º 2
0
        public PhysxPhysicWorld(CoreDescription CoreDescription, SceneDescription SceneDescription, bool connectToRemoteDebugger = false, bool safeAndSlowUpdate = true)
        {
            this.safeAndSlowUpdate = safeAndSlowUpdate;
            UserOutput output = new UserOutput();

            this.Core = new Core(CoreDescription, output);

            Core core = this.Core;

            core.SetParameter(PhysicsParameter.VisualizationScale, 2.0f);
            core.SetParameter(PhysicsParameter.VisualizeCollisionShapes, true);
            core.SetParameter(PhysicsParameter.VisualizeClothMesh, true);
            core.SetParameter(PhysicsParameter.VisualizeJointLocalAxes, true);
            core.SetParameter(PhysicsParameter.VisualizeJointLimits, true);
            core.SetParameter(PhysicsParameter.VisualizeFluidPosition, true);
            core.SetParameter(PhysicsParameter.VisualizeFluidEmitters, false); // Slows down rendering a bit too much
            core.SetParameter(PhysicsParameter.VisualizeForceFields, true);
            core.SetParameter(PhysicsParameter.VisualizeSoftBodyMesh, true);

            this.Scene = core.CreateScene(SceneDescription);

            // Connect to the remote debugger if it's there
            if (connectToRemoteDebugger)
            {
                core.Foundation.RemoteDebugger.Connect("localhost");
            }

            ControllerManager = Scene.CreateControllerManager();
            objs                    = new List <IPhysicObject>();
            ctns                    = new List <IPhysicConstraint>();
            TriggerReport           = new Physics.TriggerReport();
            Scene.UserTriggerReport = TriggerReport;
            Utilities.ErrorReport   = errorReport;
        }