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


C# libsecondlife.LLVector3类代码示例

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


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

示例1: Execute

        public override string Execute(string[] args, LLUUID fromAgentID)
		{
		    if (args.Length == 1)
		    {
		        try
		        {
		            string treeName = args[0].Trim(new char[] { ' ' });
		            ObjectManager.Tree tree = (ObjectManager.Tree)Enum.Parse(typeof(ObjectManager.Tree), treeName);

		            LLVector3 treePosition = new LLVector3(Client.Self.Position.X, Client.Self.Position.Y,
		                Client.Self.Position.Z);
		            treePosition.Z += 3.0f;

		            Client.Objects.AddTree(Client.Network.CurrentSim, new LLVector3(0.5f, 0.5f, 0.5f),
		                LLQuaternion.Identity, treePosition, tree, Client.GroupID, false);

		            return "Attempted to rez a " + treeName + " tree";
		        }
		        catch (Exception)
		        {
		            return "Type !tree for usage";
		        }
		    }

		    string usage = "Usage: !tree [";
		    foreach (string value in Enum.GetNames(typeof(ObjectManager.Tree)))
		    {
		        usage += value + ",";
		    }
		    usage = usage.TrimEnd(new char[] { ',' });
		    usage += "]";
		    return usage;
		}
开发者ID:RavenB,项目名称:gridsearch,代码行数:33,代码来源:TreeCommand.cs

示例2: Self_OnChat

		void Self_OnChat(string message, byte audible, byte type, byte sourcetype, string fromName, LLUUID id, LLUUID ownerid, LLVector3 position)
		{
			if (message.Length > 0)
			{
				_speechSynthesizer.SpeakAsync(message);
			}
		}
开发者ID:chrbayer84,项目名称:SLAgentCSServer,代码行数:7,代码来源:TtsCommand.cs

示例3: Self_OnChat

 void Self_OnChat(string message, byte audible, byte type, byte sourcetype, string fromName, LLUUID id, LLUUID ownerid, LLVector3 position)
 {
     if (message.Length > 0 && TestClient.Master == fromName)
     {
         TestClient.Self.Chat(message, 0, MainAvatar.ChatType.Normal);
     }
 }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:7,代码来源:EchoMasterCommand.cs

示例4: Shoot

 /// <summary>
 /// Aims at the specified position, enters mouselook, presses and
 /// releases the left mouse button, and leaves mouselook
 /// </summary>
 /// <param name="target">Target to shoot at</param>
 /// <returns></returns>
 public static bool Shoot(SecondLife client, LLVector3 target)
 {
     if (client.Self.Movement.TurnToward(target))
         return Shoot(client);
     else
         return false;
 }
开发者ID:chrbayer84,项目名称:SLAgentCSServer,代码行数:13,代码来源:Utilities.cs

示例5: Self_OnChat

		void Self_OnChat(string message, MainAvatar.ChatAudibleLevel audible, MainAvatar.ChatType type, 
            MainAvatar.ChatSourceType sourcetype, string fromName, LLUUID id, LLUUID ownerid, LLVector3 position)
		{
			if (message.Length > 0 && Client.MasterKey == id)
			{
			    Client.Self.Chat(message, 0, MainAvatar.ChatType.Normal);
			}
		}
开发者ID:RavenB,项目名称:gridsearch,代码行数:8,代码来源:EchoMasterCommand.cs

示例6: GridManager

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="client">Instance of type SecondLife to associate with this GridManager instance</param>
        public GridManager(SecondLife client)
        {
            Client = client;
            SunDirection = LLVector3.Zero;

            Client.Network.RegisterCallback(PacketType.MapBlockReply, new NetworkManager.PacketCallback(MapBlockReplyHandler));
            Client.Network.RegisterCallback(PacketType.SimulatorViewerTimeMessage, new NetworkManager.PacketCallback(TimeMessageHandler));
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:12,代码来源:GridManager.cs

示例7: UserProfile

 public UserProfile()
 {
     Circuits = new Dictionary<LLUUID, uint>();
     Inventory = new AgentInventory();
     homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256));
     homepos = new LLVector3();
     homelookat = new LLVector3();
 }
开发者ID:BackupTheBerlios,项目名称:ulife-svn,代码行数:8,代码来源:UserProfile.cs

示例8: GridManager

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="client">Instance of type SecondLife to associate with this GridManager instance</param>
        public GridManager(SecondLife client)
        {
            Client = client;
            Regions = new Dictionary<string, GridRegion>();
            SunDirection = new LLVector3();

            Client.Network.RegisterCallback(PacketType.MapBlockReply, new PacketCallback(MapBlockReplyHandler));
            Client.Network.RegisterCallback(PacketType.SimulatorViewerTimeMessage, new PacketCallback(TimeMessageHandler));
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:13,代码来源:GridManager.cs

示例9: Entity

 /// <summary>
 /// Creates a new Entity (should not occur on it's own)
 /// </summary>
 public Entity()
 {
     uuid = new libsecondlife.LLUUID();
     localid = 0;
     m_pos = new LLVector3();
     velocity = new LLVector3();
     rotation = new Quaternion();
     m_name = "(basic entity)";
     children = new List<Entity>();
 }
开发者ID:BackupTheBerlios,项目名称:ulife-svn,代码行数:13,代码来源:Entity.cs

示例10: ChatEventArgs

 public ChatEventArgs(string message, ChatAudibleLevel audible, ChatType type, ChatSourceType sourceType, string fromName, LLUUID id, LLUUID ownerid, LLVector3 position)
 {
     this.message = message;
     this.audible = audible;
     this.type = type;
     this.sourceType = sourceType;
     this.fromName = fromName;
     this.id = id;
     this.ownerid = ownerid;
     this.position = position;
 }
开发者ID:SObS,项目名称:SLeek,代码行数:11,代码来源:ChatEventArgs.cs

示例11: Self_OnChat

        public void Self_OnChat(string message, ChatAudibleLevel audible, ChatType type, 
            ChatSourceType sourcetype, string fromName, LLUUID id, LLUUID ownerid, LLVector3 position)
        {
            Console.WriteLine(fromName+":" + message);

            if (message.Length > 0 && message.ToLower().Contains(Client.Self.FirstName.ToLower()) && Client.Self.AgentID != id) {
                WebRequest request = WebRequest.Create("http://www.mr-technicl.com/slfutura.php?nick="+ fromName + "&message="+ message);
                WebResponse response = request.GetResponse();
                StreamReader input = new StreamReader(response.GetResponseStream());
                string say = input.ReadToEnd();
                input.Close();
                libsecondlife.Utilities.Realism.Chat(Client, say, ChatType.Normal, 25);
            }
        }
开发者ID:santyr,项目名称:Futura-Testclient,代码行数:14,代码来源:Chat.cs

示例12: ChatEventArgs

 public ChatEventArgs(
     string message, SLChatType type, LLVector3 sourcePos, SLSourceType sourceType,
     LLUUID sourceId, LLUUID ownerId, string fromName,
     bool audible, byte command, LLUUID commandId)
 {
     _message = message;
     _type = type;
     _sourcePos = sourcePos;
     _sourceType = sourceType;
     _sourceId = sourceId;
     _ownerId = ownerId;
     _fromName = fromName;
     _audible = audible;
     _command = command;
     _commandId = commandId;
 }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:16,代码来源:SLNetComEvents.cs

示例13: MyOnFrame

        private void MyOnFrame(IScriptContext context)
        {
            LLVector3 pos = context.Entity.Pos;

            IScriptReadonlyEntity avatar;

            if (context.TryGetRandomAvatar(out avatar))
            {
                LLVector3 avatarPos = avatar.Pos;

                float x = pos.X + ((float)avatarPos.X.CompareTo(pos.X)) / 2;
                float y = pos.Y + ((float)avatarPos.Y.CompareTo(pos.Y)) / 2;

                LLVector3 newPos = new LLVector3(x, y, pos.Z);

                context.Entity.Pos = newPos;
            }
        }
开发者ID:BackupTheBerlios,项目名称:ulife-svn,代码行数:18,代码来源:FollowRandomAvatar.cs

示例14: PrimData

        public PrimData(byte[] data)
        {
            int i =0;

            this.OwnerID = new LLUUID(data, i); i += 16;
            this.PCode = data[i++];
            this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
            this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
            this.PathScaleX = data[i++];
            this.PathScaleY = data[i++];
            this.PathShearX = data[i++];
            this.PathShearY = data[i++];
            this.PathSkew = (sbyte)data[i++];
            this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
            this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
            this.Scale = new LLVector3(data, i); i += 12;
            this.PathCurve = data[i++];
            this.ProfileCurve = data[i++];
            this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
            this.PathRadiusOffset = (sbyte)data[i++];
            this.PathRevolutions = data[i++];
            this.PathTaperX = (sbyte)data[i++];
            this.PathTaperY =(sbyte) data[i++];
            this.PathTwist = (sbyte) data[i++];
            this.PathTwistBegin = (sbyte) data[i++];
            ushort length = (ushort)(data[i++] + (data[i++] << 8));
            this.Texture = new byte[length];
            Array.Copy(data, i, Texture, 0, length); i += length;
            this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.Position = new LLVector3(data, i); i += 12;
            this.Rotation = new LLQuaternion(data,i, true); i += 12;
            this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
            this.FullID = new LLUUID(data, i); i += 16;
        }
开发者ID:BackupTheBerlios,项目名称:ulife-svn,代码行数:40,代码来源:PrimData.cs

示例15: doStuff

        protected void doStuff(string sim, LLVector3 coords)
        {
            Client.Grid.OnRegionAdd += new GridRegionCallback(GridRegionHandler);

            Console.WriteLine("Caching estate sims...");
            Client.Grid.AddEstateSims();
            System.Threading.Thread.Sleep(3000);

            if (RegionHandle == 0)
            {
                Client.Grid.BeginGetGridRegion(sim, new GridRegionCallback(GridRegionHandler));

                int start = Environment.TickCount;

                while (RegionHandle == 0)
                {
                    Client.Tick();

                    if (Environment.TickCount - start > 10000)
                    {
                        Console.WriteLine("Region handle lookup failed");
                        Disconnect();
                        return;
                    }
                }
            }

            Client.Self.OnTeleport += new TeleportCallback(Avatar_OnTeleportMessage);

            DoneTeleporting = false;
            Client.Self.Teleport(RegionHandle, coords);

            while (!DoneTeleporting)
            {
                Client.Tick();
            }
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:37,代码来源:Teleport.cs


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