• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IMesher类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Initialise

 // Old version of initialization that assumes legacy sized regions (256x256)
 public override void Initialise(IMesher meshmerizer, IConfigSource config)
 {
     m_log.ErrorFormat("{0} WARNING WARNING WARNING! BulletSim initialized without region extent specification. Terrain will be messed up.");
     Vector3 regionExtent = new Vector3( Constants.RegionSize, Constants.RegionSize, Constants.RegionSize);
     Initialise(meshmerizer, config, regionExtent);
     
 }
开发者ID:Kubwa,项目名称:opensim,代码行数:8,代码来源:BSScene.cs


示例17: Initialise

 // Initialize the mesh plugin
 public override void Initialise(IMesher meshmerizer, RegionInfo region, IRegistryCore registry)
 {
     mesher = meshmerizer;
     m_region = region;
     m_registry = registry;
     WorldExtents = new Vector2(region.RegionSizeX, region.RegionSizeY);
 }
开发者ID:EnricoNirvana,项目名称:Aurora-Sim,代码行数:8,代码来源:AODEPhysicsScene.cs


示例18: Initialise

        public override void Initialise(IMesher meshmerizer, IConfigSource config)
        {
            mesher = meshmerizer;
            // m_config = config;
            /*
            if (Environment.OSVersion.Platform == PlatformID.Unix)
            {
                m_log.Fatal("[BulletDotNET]: This configuration is not supported on *nix currently");
                Thread.Sleep(5000);
                Environment.Exit(0);
            }
            */
            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:AlphaStaxLLC,项目名称:taiga,代码行数:22,代码来源:BulletDotNETScene.cs


示例19: Initialise

 public override void Initialise(IMesher meshmerizer, IConfigSource config)
 {
 }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:3,代码来源:BasicPhysicsScene.cs


示例20: Initialise

        // Initialize the mesh plugin
        public override void Initialise(IMesher meshmerizer, IConfigSource config)
        {
            mesher = meshmerizer;
            m_config = config;
            // Defaults

            if (Environment.OSVersion.Platform == PlatformID.Unix)
            {
                avPIDD = 3200.0f;
                avPIDP = 1400.0f;
                avStandupTensor = 2000000f;
            }
            else
            {
                avPIDD = 2200.0f;
                avPIDP = 900.0f;
                avStandupTensor = 550000f;
            }

            int contactsPerCollision = 80;

            if (m_config != null)
            {
                IConfig physicsconfig = m_config.Configs["ODEPhysicsSettings"];
                if (physicsconfig != null)
                {
                    gravityx = physicsconfig.GetFloat("world_gravityx", 0f);
                    gravityy = physicsconfig.GetFloat("world_gravityy", 0f);
                    gravityz = physicsconfig.GetFloat("world_gravityz", -9.8f);

                    worldHashspaceLow = physicsconfig.GetInt("world_hashspace_size_low", -4);
                    worldHashspaceHigh = physicsconfig.GetInt("world_hashspace_size_high", 128);

                    metersInSpace = physicsconfig.GetFloat("meters_in_small_space", 29.9f);
                    smallHashspaceLow = physicsconfig.GetInt("small_hashspace_size_low", -4);
                    smallHashspaceHigh = physicsconfig.GetInt("small_hashspace_size_high", 66);

                    contactsurfacelayer = physicsconfig.GetFloat("world_contact_surface_layer", 0.001f);

                    nmTerrainContactFriction = physicsconfig.GetFloat("nm_terraincontact_friction", 255.0f);
                    nmTerrainContactBounce = physicsconfig.GetFloat("nm_terraincontact_bounce", 0.1f);
                    nmTerrainContactERP = physicsconfig.GetFloat("nm_terraincontact_erp", 0.1025f);

                    mTerrainContactFriction = physicsconfig.GetFloat("m_terraincontact_friction", 75f);
                    mTerrainContactBounce = physicsconfig.GetFloat("m_terraincontact_bounce", 0.05f);
                    mTerrainContactERP = physicsconfig.GetFloat("m_terraincontact_erp", 0.05025f);

                    nmAvatarObjectContactFriction = physicsconfig.GetFloat("objectcontact_friction", 250f);
                    nmAvatarObjectContactBounce = physicsconfig.GetFloat("objectcontact_bounce", 0.2f);

                    mAvatarObjectContactFriction = physicsconfig.GetFloat("m_avatarobjectcontact_friction", 75f);
                    mAvatarObjectContactBounce = physicsconfig.GetFloat("m_avatarobjectcontact_bounce", 0.1f);

                    ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", 0.020f);
                    m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10);

                    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);
                    avCapsuleTilted = physicsconfig.GetBoolean("av_capsule_tilted", false);

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

                    geomContactPointsStartthrottle = physicsconfig.GetInt("geom_contactpoints_start_throttling", 3);
                    geomUpdatesPerThrottledUpdate = physicsconfig.GetInt("geom_updates_before_throttled_update", 15);
                    geomCrossingFailuresBeforeOutofbounds = physicsconfig.GetInt("geom_crossing_failures_before_outofbounds", 5);

                    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);

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

                    if (Environment.OSVersion.Platform == PlatformID.Unix)
                    {
                        avPIDD = physicsconfig.GetFloat("av_pid_derivative_linux", 2200.0f);
                        avPIDP = physicsconfig.GetFloat("av_pid_proportional_linux", 900.0f);
                        avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_linux", 550000f);
                        bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_linux", 5f);
                    }
                    else
                    {
                        avPIDD = physicsconfig.GetFloat("av_pid_derivative_win", 2200.0f);
                        avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 900.0f);
                        avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 550000f);
                        bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_win", 5f);
                    }

                    physics_logging = physicsconfig.GetBoolean("physics_logging", false);
                    physics_logging_interval = physicsconfig.GetInt("physics_logging_interval", 0);
                    physics_logging_append_existing_logfile = physicsconfig.GetBoolean("physics_logging_append_existing_logfile", false);
//.........这里部分代码省略.........
开发者ID:shangcheng,项目名称:Aurora,代码行数:101,代码来源:OdePlugin.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IMessage类代码示例发布时间:2022-05-24
下一篇:
C# IMesh类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap