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

C# OpenSim类代码示例

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

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



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

示例1: Initialize

 public void Initialize(OpenSim.Framework.IOpenSimBase openSim)
 {
     m_log.Info("[AURORADATA]: Setting up the data service");
     OpenSimBase = openSim;
     Aurora.Services.DataService.LocalDataService service = new Aurora.Services.DataService.LocalDataService();
     service.Initialise(openSim.ConfigSource);
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:7,代码来源:AuroraDataStartupPlugin.cs


示例2: RegionStatsHandler

        //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

        public RegionStatsHandler(OpenSim.Framework.RegionInfo region_info)
        {
            regionInfo = region_info;
            osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret);
            osXStatsURI = Util.SHA1Hash(regionInfo.osSecret);
  
        }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:9,代码来源:RegionStatsHandler.cs


示例3: AddRegion

        public void AddRegion(OpenSim.Region.Framework.Scenes.Scene scene)
        {
            m_log.Error("[SCENEIMPORT]: Add Region: ");
            m_scenes.Add(scene);
            m_scene = scene;

             //           scene.EventManager.OnClientConnect += new EventManager.OnClientConnectCoreDelegate(HandleOnClientConnect);
        }
开发者ID:b2rex,项目名称:b2rex,代码行数:8,代码来源:SceneUploadReceiver.cs


示例4: client_OnChatFromClient

        void client_OnChatFromClient(object sender, OpenSim.Framework.OSChatMessage e)
        {
            if (e.Message != "")
            {
                switch (e.Message.Split(' ')[0])
                {
                    case "fog":
                        if (e.Sender is RexClientViewBase)
                        {
                            ((RexClientViewBase)e.Sender).SendRexFog(0, 50, 50, 50, 50);
                        }
                        break;
                    case "water":
                        if (e.Sender is RexClientViewBase)
                        {
                            if (e.Message.Split(' ').Length > 1)
                            {
                                ((RexClientViewBase)e.Sender).SendRexWaterHeight(Convert.ToSingle(e.Message.Split(' ')[1]));
                            }
                            else
                            {
                                ((RexClientViewBase)e.Sender).SendRexWaterHeight(50);
                            }
                        }
                        break;
                    case "postp":
                        if (e.Sender is RexClientViewBase)
                        {
                            if (e.Message.Split(' ').Length > 2)
                            {
                                bool toggle = Convert.ToBoolean(e.Message.Split(' ')[2]);
                                int id = Convert.ToInt32(e.Message.Split(' ')[1]);
                                ((RexClientViewBase)e.Sender).SendRexPostProcess(id, toggle);
                            }
                        }
                        break;
                    case "wind":
                        if (e.Sender is RexClientViewBase)
                        {
                            ((RexClientViewBase)e.Sender).SendRexToggleWindSound(!this.windToggle);
                            windToggle = !windToggle;
                            //((RexClientView)e.Sender).SendRexScriptCommand("hud", "ShowInventoryMessage(\"wind ="+windToggle.ToString()+" \")", "");
                        }
                        break;
                    default:

                        //Test code. Not to any relese.
                        //e.Sender.SendAlertMessage("Hello there");

                        //if (e.Sender is RexClientView)
                        //{
                        //    ((RexClientView)e.Sender).SendRexScriptCommand("hud", "ShowInventoryMessage(\"Test\")", "");
                        //}
                        break;
                }
            }
        }
开发者ID:jonnenauha,项目名称:ModreX,代码行数:57,代码来源:RexScriptTestModule.cs


示例5: WindConfig

 public void WindConfig(OpenSim.Region.Framework.Scenes.Scene scene, Nini.Config.IConfig windConfig)
 {
     if (windConfig != null)
     {
         if (windConfig.Contains("strength"))
         {
             m_strength = windConfig.GetFloat("strength", 1.0F);
         }
     }
 }
开发者ID:BogusCurry,项目名称:halcyon,代码行数:10,代码来源:SimpleRandomWind.cs


示例6: SerializeGroupToBytes

        public byte[] SerializeGroupToBytes(OpenSim.Region.Framework.Scenes.SceneObjectGroup group, SerializationFlags flags)
        {
            Serialization.SceneObjectGroupSnapshot snap = Serialization.SceneObjectGroupSnapshot.FromSceneObjectGroup(group, flags);

            using (MemoryStream ms = new MemoryStream())
            {
                ProtoBuf.Serializer.Serialize<Serialization.SceneObjectGroupSnapshot>(ms, snap);
                return ms.ToArray();
            }
        }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:10,代码来源:SceneObjectSerializer.cs


示例7: SerializeObjectToBytes

        public byte[] SerializeObjectToBytes(OpenSim.Region.Framework.Scenes.CoalescedObject csog, SerializationFlags flags)
        {
            Serialization.CoalescedObjectSnapshot snap = Serialization.CoalescedObjectSnapshot.FromCoalescedObject(csog, flags);

            using (MemoryStream ms = new MemoryStream())
            {
                ProtoBuf.Serializer.Serialize<Serialization.CoalescedObjectSnapshot>(ms, snap);

                return ms.ToArray();
            }
        }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:11,代码来源:CoalescedObjectSerializer.cs


示例8: FromItemPermissionBlock

 internal static ItemPermissionBlockSnapshot FromItemPermissionBlock(OpenSim.Framework.ItemPermissionBlock itemPermissionBlock)
 {
     return new ItemPermissionBlockSnapshot
     {
         BasePermissions = itemPermissionBlock.BasePermissions,
         NextPermissions = itemPermissionBlock.NextPermissions,
         EveryonePermissions = itemPermissionBlock.EveryOnePermissions,
         GroupPermissions = itemPermissionBlock.GroupPermissions,
         CurrentPermissions = itemPermissionBlock.CurrentPermissions
     };
 }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:11,代码来源:ItemPermissionBlockSnapshot.cs


示例9: SerializeGroupToInventoryBytes

        /// <summary>
        /// Serializes a group into a byte array suitable for storage and retrieval from inventory
        /// </summary>
        /// <param name="group"></param>
        /// <returns></returns>
        public byte[] SerializeGroupToInventoryBytes(OpenSim.Region.Framework.Scenes.SceneObjectGroup group, SerializationFlags flags)
        {
            Serialization.SceneObjectGroupSnapshot snap = Serialization.SceneObjectGroupSnapshot.FromSceneObjectGroup(group, flags);

            using (MemoryStream ms = new MemoryStream())
            {
                ms.Write(GROUP_HEADER, 0, GROUP_HEADER.Length);
                snap.SerializeToStream(ms);

                return ms.ToArray();
            }
        }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:17,代码来源:InventoryObjectSerializer.cs


示例10: HandleAgentUpdate

 private void HandleAgentUpdate(OpenSim.Framework.IClientAPI remoteClient, OpenSim.Framework.AgentUpdateArgs agentData)
 {
     if (m_maxHeight != 0)
     {
         ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId);
         if (sp.AbsolutePosition.Z > m_maxHeight)
         {
             Vector3 newPos = sp.AbsolutePosition;
             newPos.Z = m_maxHeight;
             sp.Teleport(newPos);
         }
     }
 }
开发者ID:jonnenauha,项目名称:ModreX,代码行数:13,代码来源:MovementHeight.cs


示例11: link

    public override void link(OpenSim.Region.PhysicsModules.SharedBase.PhysicsActor obj)
    {
        BSPrimLinkable parent = obj as BSPrimLinkable;
        if (parent != null)
        {
            BSPhysObject parentBefore = Linkset.LinksetRoot;    // DEBUG
            int childrenBefore = Linkset.NumberOfChildren;      // DEBUG

            Linkset = parent.Linkset.AddMeToLinkset(this);

            DetailLog("{0},BSPrimLinkable.link,call,parentBefore={1}, childrenBefore=={2}, parentAfter={3}, childrenAfter={4}",
                LocalID, parentBefore.LocalID, childrenBefore, Linkset.LinksetRoot.LocalID, Linkset.NumberOfChildren);
        }
        return;
    }
开发者ID:CassieEllen,项目名称:opensim,代码行数:15,代码来源:BSPrimLinkable.cs


示例12: WindConfig

        public void WindConfig(OpenSim.Region.Framework.Scenes.Scene scene, Nini.Config.IConfig windConfig)
        {
            if (windConfig != null)
            {
                // Uses strength value if avg_strength not specified
                m_avgStrength = windConfig.GetFloat("strength", 5.0F);
                m_avgStrength = windConfig.GetFloat("avg_strength", 5.0F);

                m_avgDirection = windConfig.GetFloat("avg_direction", 0.0F);
                m_varStrength  = windConfig.GetFloat("var_strength", 5.0F);
                m_varDirection = windConfig.GetFloat("var_direction", 30.0F);
                m_rateChange   = windConfig.GetFloat("rate_change", 1.0F);

                LogSettings();
            }
        }
开发者ID:openmetaversefoundation,项目名称:fortis-opensim,代码行数:16,代码来源:ConfigurableWind.cs


示例13: CreateObjectCmd

 public CreateObjectCmd(PhysxPrim parent, string primName, OpenSim.Framework.PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position,
     OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation, OpenMetaverse.Vector3 velocity, OpenMetaverse.Vector3 angularVelocity,
     float lod, PhysicsScene.AddPrimShapeFlags flags, Material material, byte[] serializedPhysicsProperties, byte[] serializedPhysicsShapes,
     ulong interpolateTime)
 {
     _parent = parent;
     _primName = primName;
     _pbs = pbs;
     _position = position;
     _size = size;
     _rotation = rotation;
     _velocity = velocity;
     _angularVelocity = angularVelocity;
     _lod = lod;
     _flags = flags;
     _material = material;
     _serializedPhysicsProperties = serializedPhysicsProperties;
     _serializedPhysicsShapes = serializedPhysicsShapes;
     _interpolateTime = interpolateTime;
 }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:20,代码来源:CreateObjectCmd.cs


示例14: FromKeyframeAnimation

        public static KeyframeAnimationSnapshot FromKeyframeAnimation(OpenSim.Framework.KeyframeAnimation keyframeAnimation)
        {
            if (keyframeAnimation == null)
                return null;

            return new KeyframeAnimationSnapshot()
            {
                CurrentAnimationPosition = keyframeAnimation.CurrentAnimationPosition,
                CurrentMode = (int)keyframeAnimation.CurrentMode,
                CurrentCommand = (int)keyframeAnimation.CurrentCommand,
                InitialPosition = keyframeAnimation.InitialPosition,
                InitialRotation = keyframeAnimation.InitialRotation,
                PingPongForwardMotion = keyframeAnimation.PingPongForwardMotion,
                PositionList = keyframeAnimation.PositionList,
                RotationList = keyframeAnimation.RotationList,
                TimeLastTick = keyframeAnimation.TimeLastTick,
                TimeElapsed = keyframeAnimation.TimeElapsed,
                TimeList = keyframeAnimation.TimeList
            };
        }
开发者ID:kf6kjg,项目名称:halcyon,代码行数:20,代码来源:KeyframeAnimationSnapshot.cs


示例15: SetUpLindenLoginData

        LindenLoginData SetUpLindenLoginData(OpenSim.Grid.UserServer.Modules.RexLogin.Avatar avatar, string account,
            string welcomeMessage, UUID sessionID) 
        {
            LindenLoginData response = new LindenLoginData();

            response.AgentID = avatar.ID;
            response.BuddyList = LindenLoginHelper.GetBuddyList(avatar.ID);
            LindenLoginHelper.SetClassifiedCategories(ref response);
            response.FirstName = avatar.GetAttribute(AvatarAttributes.FIRST_NAME).AsString() + " " + avatar.GetAttribute(AvatarAttributes.LAST_NAME).AsString();
            avatar.Attributes[AvatarAttributes.FIRST_NAME] = OSD.FromString(response.FirstName);
            response.HomeLookAt = avatar.GetAttribute(AvatarAttributes.HOME_LOOKAT).AsVector3();
            response.HomePosition = avatar.GetAttribute(AvatarAttributes.HOME_POSITION).AsVector3();
            response.HomeRegionX = avatar.GetAttribute(AvatarAttributes.HOME_REGION_X).AsUInteger();
            response.HomeRegionY = avatar.GetAttribute(AvatarAttributes.HOME_REGION_Y).AsUInteger();
            response.LastName = "<" + account + ">";
            avatar.Attributes[AvatarAttributes.LAST_NAME] = OSD.FromString(response.LastName);
            response.Login = true;
            response.Message = welcomeMessage;
            response.SessionID = sessionID;
            response.SecureSessionID = UUID.Random();

            return response;
        }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:23,代码来源:RealXtendLogin.SetUpLindenLoginData.cs


示例16: AddRegion

        public void AddRegion(OpenSim.Region.Framework.Scenes.Scene scene)
        {
            if (m_connectorEnabled)
            {

                if (m_accountService == null)
                {
                    m_accountService = scene.UserAccountService;
                }


                scene.RegisterModuleInterface<IGroupsServicesConnector>(this);
            }
        }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:14,代码来源:XmlRpcGroupsServicesConnectorModule.cs


示例17: GetUserInventory

 public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback)
 {
 }
开发者ID:Ideia-Boa,项目名称:Diva-s-OpenSim-Tests,代码行数:3,代码来源:TestInventoryService.cs


示例18: UserLoginService

 public UserLoginService(
     OpenSim.Framework.Communications.UserProfileManager userManager,
     LibraryRootFolder libraryRootFolder, string mapServerURI, string profileServerURI,
     UserConfig config, string welcomeMess, IRegionProfileRouter regionProfileService)
     : base(userManager, libraryRootFolder, welcomeMess, mapServerURI, profileServerURI)
 {
     m_config = config;
     m_defaultHomeX = m_config.DefaultX;
     m_defaultHomeY = m_config.DefaultY;
     m_regionProfileService = regionProfileService;
 }
开发者ID:M-O-S-E-S,项目名称:halcyon,代码行数:11,代码来源:UserLoginService.cs


示例19: Start

 public void Start (IConfigSource config, OpenSim.Framework.IRegistryCore registry)
 {
 }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:3,代码来源:HeloHandler.cs


示例20: Initialize

 public void Initialize (IConfigSource config, OpenSim.Framework.IRegistryCore registry)
 {
     MainServer.Instance.AddStreamHandler (new HeloServerGetHandler ("aurora"));
 }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:4,代码来源:HeloHandler.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Capabilities.Caps类代码示例发布时间:2022-05-24
下一篇:
C# OpenMode类代码示例发布时间: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