当前位置: 首页>>代码示例>>C#>>正文


C# IMesher类代码示例

本文整理汇总了C#中IMesher的典型用法代码示例。如果您正苦于以下问题:C# IMesher类的具体用法?C# IMesher怎么用?C# IMesher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IMesher类属于命名空间,在下文中一共展示了IMesher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

        public override void Initialize(IMesher meshmerizer, IConfigSource config, UUID regionId)
        {
            // Does nothing much right now
            _mesher = meshmerizer;

            //fire up our work loop
            HeartbeatThread = Watchdog.StartThread(new ThreadStart(Heartbeat), "Physics Heartbeat",
                ThreadPriority.Normal, false);

            TimingThread = Watchdog.StartThread(new ThreadStart(DoTiming), string.Format("Physics Timing"),
                ThreadPriority.Highest, false);
        }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:12,代码来源:BasicScene.cs

示例2: CreateWorld

        public static GameObject CreateWorld(string name, long seed, WorldGenerator<VoxelData> worldGenerator, IMesher mesher)
        {
            GameObject ob = new GameObject("World-" + name, typeof(Terrain.World));
            ob.transform.position = Vector3.zero;
            ob.transform.rotation = Quaternion.identity;

            Terrain.World world = ob.GetComponent<Terrain.World>();
            world.Seed = seed;
            world.Mesher = mesher;
            world.WorldGenerator = worldGenerator;
            world.GenerateWorld();

            LoadedWorlds[name] = ob;
            return ob;
        }
开发者ID:Arcanum2010,项目名称:UnityVoxelTest,代码行数:15,代码来源:Game.cs

示例3: Initialise

 public override void Initialise(IMesher meshmerizer, RegionInfo region)
 {
     m_region = region;
 }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:4,代码来源:BasicPhysicsScene.cs

示例4: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;

            mesher = scene.RequestModuleInterface<IMesher>();
            if (mesher == null)
                m_log.WarnFormat("[ODE SCENE]: No mesher in {0}. Things will not work well.", PhysicsSceneName);
        }
开发者ID:Gitlab11,项目名称:opensim,代码行数:9,代码来源:OdeScene.cs

示例5: Initialise

 public override void Initialise(IMesher meshmerizer, IScene scene)
 {
     m_region = scene.RegionInfo;
 }
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:4,代码来源:BasicPhysicsScene.cs

示例6: Initialize

 // Initialize the mesh plugin
 public override void Initialize(IMesher meshmerizer, IScene scene)
 {
     mesher = meshmerizer;
     m_region = scene.RegionInfo;
     m_scene = scene;
     WorldExtents = new Vector2(m_region.RegionSizeX, m_region.RegionSizeY);
 }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:8,代码来源:ODEPhysicsScene.cs

示例7: Initialise

    public override void Initialise(IMesher meshmerizer, IConfigSource config)
    {
        mesher = meshmerizer;
        _taintOperations = new List<TaintCallbackEntry>();
        _postTaintOperations = new Dictionary<string, TaintCallbackEntry>();
        _postStepOperations = new List<TaintCallbackEntry>();
        PhysObjects = new Dictionary<uint, BSPhysObject>();
        Shapes = new BSShapeCollection(this);

        m_simulatedTime = 0f;
        LastTimeStep = 0.1f;

        // Allocate pinned memory to pass parameters.
        UnmanagedParams = new ConfigurationParameters[1];

        // Set default values for physics parameters plus any overrides from the ini file
        GetInitialParameterValues(config);

        // Get the connection to the physics engine (could be native or one of many DLLs)
        PE = SelectUnderlyingBulletEngine(BulletEngineName);

        // Enable very detailed logging.
        // By creating an empty logger when not logging, the log message invocation code
        //     can be left in and every call doesn't have to check for null.
        if (m_physicsLoggingEnabled)
        {
            PhysicsLogging = new Logging.LogWriter(m_physicsLoggingDir, m_physicsLoggingPrefix, m_physicsLoggingFileMinutes, m_physicsLoggingDoFlush);
            PhysicsLogging.ErrorLogger = m_log; // for DEBUG. Let's the logger output its own error messages.
        }
        else
        {
            PhysicsLogging = new Logging.LogWriter();
        }

        // Allocate memory for returning of the updates and collisions from the physics engine
        m_collisionArray = new CollisionDesc[m_maxCollisionsPerFrame];
        m_updateArray = new EntityProperties[m_maxUpdatesPerFrame];

        // The bounding box for the simulated world. The origin is 0,0,0 unless we're
        //    a child in a mega-region.
        // Bullet actually doesn't care about the extents of the simulated
        //    area. It tracks active objects no matter where they are.
        Vector3 worldExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);

        World = PE.Initialize(worldExtent, Params, m_maxCollisionsPerFrame, ref m_collisionArray, m_maxUpdatesPerFrame, ref m_updateArray);

        Constraints = new BSConstraintCollection(World);

        TerrainManager = new BSTerrainManager(this);
        TerrainManager.CreateInitialGroundPlaneAndTerrain();

        // Put some informational messages into the log file.
        m_log.InfoFormat("{0} Linksets implemented with {1}", LogHeader, (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation);

        InTaintTime = false;
        m_initialized = true;

        // If the physics engine runs on its own thread, start same.
        if (BSParam.UseSeparatePhysicsThread)
        {
            // The physics simulation should happen independently of the heartbeat loop
            m_physicsThread = new Thread(BulletSPluginPhysicsThread);
            m_physicsThread.Name = BulletEngineName;
            m_physicsThread.Start();
        }
    }
开发者ID:Michelle-Argus,项目名称:opensim,代码行数:66,代码来源:BSScene.cs

示例8: Initialise

 public abstract void Initialise(IMesher meshmerizer, IScene scene);
开发者ID:emperorstarfinder,项目名称:Virtual-Universe,代码行数:1,代码来源:PhysicsScene.cs

示例9: Initialise

 public override void Initialise(IMesher meshmerizer, IConfigSource config)
 {
     mesher = meshmerizer;
     // m_config = config;
 }
开发者ID:dirkhusemann,项目名称:opensim,代码行数:5,代码来源:BulletXPlugin.cs

示例10: Initialise

        public override void Initialise(IMesher meshmerizer, IConfigSource config)
        {
            mesher = meshmerizer;
            //m_config = config;
            if (config != null)
            {
                IConfig physicsconfig = config.Configs["BulletPhysicsSettings"];
                if (physicsconfig != null)
                {
                    gravityx = physicsconfig.GetFloat("world_gravityx", 0f);
                    gravityy = physicsconfig.GetFloat("world_gravityy", 0f);
                    gravityz = physicsconfig.GetFloat("world_gravityz", -9.8f);

                    avDensity = physicsconfig.GetFloat("av_density", 80f);
                    avHeightFudgeFactor = physicsconfig.GetFloat("av_height_fudge_factor", 0.52f);
                    avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f);
                    avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f);
                    avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f);

                    //contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", 80);

                    geomCrossingFailuresBeforeOutofbounds = physicsconfig.GetInt("geom_crossing_failures_before_outofbounds", 4);

                    geomDefaultDensity = physicsconfig.GetFloat("geometry_default_density", 10.000006836f);
                    bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", 20);

                    bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f);
                    bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f);

                    meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true);
                    meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f);
                    MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f);

                    if (Environment.OSVersion.Platform == PlatformID.Unix)
                    {
                        avPIDD = physicsconfig.GetFloat("av_pid_derivative_linux", 65f);
                        avPIDP = physicsconfig.GetFloat("av_pid_proportional_linux", 25);
                        avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_linux", 2000000f);
                        bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_linux", 2f);
                    }
                    else
                    {
                        avPIDD = physicsconfig.GetFloat("av_pid_derivative_win", 65f);
                        avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 25);
                        avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 2000000f);
                        bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_win", 2f);
                    }

                    forceSimplePrimMeshing = physicsconfig.GetBoolean("force_simple_prim_meshing", forceSimplePrimMeshing);
                    minimumGroundFlightOffset = physicsconfig.GetFloat("minimum_ground_flight_offset", 3f);
                    maximumMassObject = physicsconfig.GetFloat("maximum_mass_object", 10000.01f);
                }
            }
            lock (BulletLock)
            {
                m_broadphase = new btAxisSweep3(worldAabbMin, worldAabbMax, 16000);
                m_collisionConfiguration = new btDefaultCollisionConfiguration();
                m_solver = new btSequentialImpulseConstraintSolver();
                m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration);
                m_world = new btDiscreteDynamicsWorld(m_dispatcher, m_broadphase, m_solver, m_collisionConfiguration);
                m_world.setGravity(m_gravity);
                EnableCollisionInterface();
            }
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:64,代码来源:BulletDotNETScene.cs

示例11: Initialize

        public override void Initialize(IMesher meshmerizer, IScene scene)
        {
            Scene = scene;
            mesher = meshmerizer;
            _taintOperations = new List<TaintCallbackEntry>();
            _postTaintOperations = new Dictionary<string, TaintCallbackEntry>();
            _postStepOperations = new List<TaintCallbackEntry>();
            PhysObjects = new Dictionary<uint, BSPhysObject>();
            Shapes = new BSShapeCollection(this);

            // some identifiers
            RegionName = scene.RegionInfo.RegionName;
            PhysicsSceneName = RegionName;

            // Allocate pinned memory to pass parameters.
            UnmanagedParams = new ConfigurationParameters[1];

            // Set default values for physics parameters plus any overrides from the ini file
            GetInitialParameterValues(scene.Config);

            // Get the connection to the physics engine (could be native or one of many DLLs)
            PE = SelectUnderlyingBulletEngine(BulletEngineName);

            // Enable very detailed logging.
            // By creating an empty logger when not logging, the log message invocation code
            //     can be left in and every call doesn't have to check for null.
            /*if (m_physicsLoggingEnabled)
            {
                PhysicsLogging = new Logging.LogWriter(m_physicsLoggingDir, m_physicsLoggingPrefix, m_physicsLoggingFileMinutes);
                PhysicsLogging.ErrorLogger = m_log; // for DEBUG. Let's the logger output error messages.
            }
            else
            {
                PhysicsLogging = new Logging.LogWriter();
            }*/

            // Allocate memory for returning of the updates and collisions from the physics engine
            m_collisionArray = new CollisionDesc[m_maxCollisionsPerFrame];
            m_updateArray = new EntityProperties[m_maxUpdatesPerFrame];

            // The bounding box for the simulated world. The origin is 0,0,0 unless we're
            //    a child in a mega-region.
            // Bullet actually doesn't care about the extents of the simulated
            //    area. It tracks active objects no matter where they are.
            Vector3 worldExtent = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeX, Constants.RegionHeight);
               // Vector3 worldExtent = regionExtent;

            World = PE.Initialize(worldExtent, Params, m_maxCollisionsPerFrame, ref m_collisionArray,
                m_maxUpdatesPerFrame, ref m_updateArray);

            Constraints = new BSConstraintCollection(World);

            TerrainManager = new BSTerrainManager(this);
            TerrainManager.CreateInitialGroundPlaneAndTerrain();

            MainConsole.Instance.WarnFormat("{0} Linksets implemented with {1}", LogHeader,
                (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation);

            InTaintTime = false;
            m_initialized = true;
        }
开发者ID:VirtualReality,项目名称:Universe,代码行数:61,代码来源:BSScene.cs

示例12: Initialise

 public override void Initialise(IMesher meshmerizer, RegionInfo region)
 {
     mesher = meshmerizer;
     m_region = region;
     _origheightmap = new float[m_region.RegionSizeX * m_region.RegionSizeY];
 }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:6,代码来源:BulletDotNETScene.cs

示例13: Initialise

        public override void Initialise(IMesher meshmerizer, IConfigSource config)
	    {
	        throw new System.NotImplementedException();
	    }
开发者ID:AdamFrisby,项目名称:DTL-PhysX.Net,代码行数:4,代码来源:DTLPhysXScene.cs

示例14: RegionLoaded

 public void RegionLoaded()
 {
     mesher = m_frameWorkScene.RequestModuleInterface<IMesher>();
     if (mesher == null)
     {
         m_log.ErrorFormat("[ubOde] No mesher. module disabled");
         return;
     }
     
     m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig);
     m_frameWorkScene.PhysicsEnabled = true;
 }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:12,代码来源:ODEScene.cs

示例15: Initialise

 public abstract void Initialise (IMesher meshmerizer, RegionInfo region, IRegistryCore registry);
开发者ID:LOG123,项目名称:Aurora-Sim-PhysX,代码行数:1,代码来源:PhysicsScene.cs


注:本文中的IMesher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。