Beispiel #1
0
        private void AssetsView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow vrow = AssetsView.Rows[e.RowIndex];
            MSceneObject    row  = (MSceneObject)vrow.DataBoundItem;

            MMessageBus.TeleportRequest(this, row.transform.Position + row.BoundingBox.Size(), row.transform.Rotation);
        }
Beispiel #2
0
        void Go()
        {
            string sText = SiteBox.Text;

            if (string.IsNullOrEmpty(sText))
            {
                return;
            }
            sText        = sText.Trim();
            SiteBox.Text = sText;
            Vector3d dest = Decoder.Decode(sText);

            if (Globals.Network.Connected == true)
            {
                MMessageBus.TeleportRequest(this, dest, Globals.LocalUpRotation());
            }
            else
            {
                MScene.Camera.transform.Position    = dest;
                Globals.UserAccount.CurrentPosition = MassiveTools.ArrayFromVector(dest);
                Globals.Avatar.SetPosition(dest);
                MMessageBus.AvatarMoved(this, Globals.UserAccount.UserID, dest, Quaterniond.Identity);
            }
            MMessageBus.Navigate(this, dest);
        }
Beispiel #3
0
 private void GotoMapPointButton_Click(object sender, EventArgs e)
 {
     if (Globals.Network.Connected == true)
     {
         MMessageBus.TeleportRequest(this, WorldLocationPoint, Quaterniond.Identity);
     }
     else
     {
         Globals.Avatar.SetPosition(WorldLocationPoint);
         MMessageBus.AvatarMoved(this, Globals.UserAccount.UserID, WorldLocationPoint, Quaterniond.Identity);
     }
 }
Beispiel #4
0
        public static void Mc_DoubleClick(MObject mo)
        {
            string sTag = (string)mo.Tag;

            string[] parms = sTag.Split('|');
            if (parms.Length > 0)
            {
                NavigationBarDecoder dec = new NavigationBarDecoder();
                Vector3d             v   = dec.Decode(parms[1]);
                MMessageBus.Status(mo, "Teleporting to:" + parms[1] + " - " + parms[2]);
                MMessageBus.TeleportRequest(mo, v, Quaterniond.Identity);
            }
        }
Beispiel #5
0
        private void HomeButton_Click(object sender, EventArgs e)
        {
            MServerZone zone = MZoneService.Find("Earth");
            //Vector3d pos = MassiveTools.Vector3dFromVector3_Server(zone.Position);

            //cape town
            Vector3d pos = MassiveTools.VectorFromArray(Globals.UserAccount.HomePosition);

            if (Globals.Network.Connected == true)
            {
                MMessageBus.TeleportRequest(Globals.UserAccount.UserID, pos, Quaterniond.Identity);
            }
            else
            {
                MScene.Camera.transform.Position    = pos;
                Globals.UserAccount.CurrentPosition = MassiveTools.ArrayFromVector(pos);
                Globals.Avatar.SetPosition(pos);
                MMessageBus.AvatarMoved(this, Globals.UserAccount.UserID, pos, Quaterniond.Identity);
            }
        }
Beispiel #6
0
        private void But_Click(object sender, EventArgs e)
        {
            Button    b  = (Button)sender;
            MBookmark bm = (MBookmark)b.Tag;

            if (bm != null)
            {
                if (Globals.Network.Connected == true)
                {
                    MMessageBus.TeleportRequest(this,
                                                MassiveTools.VectorFromArray(bm.Position),
                                                MassiveTools.QuaternionFromArray(bm.Rotation));
                }
                else
                {
                    MScene.Camera.transform.Position    = MassiveTools.VectorFromArray(bm.Position);
                    Globals.UserAccount.CurrentPosition = bm.Position;
                    Globals.Avatar.SetPosition(MScene.Camera.transform.Position);
                    MMessageBus.AvatarMoved(this, Globals.UserAccount.UserID,
                                            MScene.Camera.transform.Position,
                                            MassiveTools.QuaternionFromArray(bm.Rotation));
                }
            }
        }
Beispiel #7
0
        private void GoLatLon_Click(object sender, EventArgs e)
        {
            Vector3d d = GetLonLatInMeters();

            MMessageBus.TeleportRequest(this, d, Quaterniond.Identity);
        }