Ejemplo n.º 1
0
        public MeshingStage(PhysX.Scene scene, OpenSim.Region.Physics.Manager.IMesher mesher, TerrainMesher terrainMesher)
        {
            _scene         = scene;
            _mesher        = mesher;
            _terrainMesher = terrainMesher;

            PhysX.CookingParams cookParms = new PhysX.CookingParams
            {
                SkinWidth = 0.025f,
                SuppressTriangleMeshRemapTable = true,
                TargetPlatform = PhysX.Platform.PC
            };

            _cooking = _scene.Physics.CreateCooking(cookParms);

            _singleConvexHullCache.OnShapeNeedsFreeing += new ShapeCache.ShapeNeedsFreeingDelegate(_shapeCache_OnShapeNeedsFreeing);
            _acdHullCache.OnShapeNeedsFreeing          += new ShapeCache.ShapeNeedsFreeingDelegate(_shapeCache_OnShapeNeedsFreeing);
            _trimeshCache.OnShapeNeedsFreeing          += new ShapeCache.ShapeNeedsFreeingDelegate(_shapeCache_OnShapeNeedsFreeing);

            _runThread      = new Thread(new ThreadStart(this.QueueProcessorLoop));
            _runThread.Name = "MeshingStage";
            _runThread.Start();
        }
Ejemplo n.º 2
0
        public MeshingStage(PhysX.Scene scene, OpenSim.Region.Physics.Manager.IMesher mesher, TerrainMesher terrainMesher)
        {
            _scene = scene;
            _mesher = mesher;
            _terrainMesher = terrainMesher;

            PhysX.CookingParams cookParms = new PhysX.CookingParams
            {
                SkinWidth = 0.025f,
                SuppressTriangleMeshRemapTable = true,
                TargetPlatform = PhysX.Platform.PC
            };

            _cooking = _scene.Physics.CreateCooking(cookParms);

            _singleConvexHullCache.OnShapeNeedsFreeing += new ShapeCache.ShapeNeedsFreeingDelegate(_shapeCache_OnShapeNeedsFreeing);
            _acdHullCache.OnShapeNeedsFreeing += new ShapeCache.ShapeNeedsFreeingDelegate(_shapeCache_OnShapeNeedsFreeing);
            _trimeshCache.OnShapeNeedsFreeing += new ShapeCache.ShapeNeedsFreeingDelegate(_shapeCache_OnShapeNeedsFreeing);

            _runThread = new Thread(new ThreadStart(this.QueueProcessorLoop));
            _runThread.Name = "MeshingStage";
            _runThread.Start();
        }