示例#1
0
 public void OnFrameEnd(Object o, EventArgs e)
 {
     // return;
     CLI.ZobObjectWrapper z = m_zobObjectManagerWrapper.GetRootObject();
     if (z != null && z.IsValid())
     {
         CLI.ManagedVector3 v = z.GetRotation();
         v.y += 0.8f;
         z.SetRotation(v);
     }
 }
示例#2
0
 public void OnZobObjectSelectionChanged(object s, ObjectSelectionEventArg e)
 {
     m_zobObjectWrapper = e.newZobObject;
     if (m_zobObjectWrapper != null && m_zobObjectWrapper.IsValid())
     {
         SetValues();
         RefreshMeshList();
     }
     else
     {
         ClearValues();
     }
 }
示例#3
0
 public CLI.ZobObjectWrapper SelectObjectAtCoords(int x, int y, CLI.ZobObjectManagerWrapper.eObjectTypes t)
 {
     CLI.ZobObjectWrapper z = GetObjectAtCoords(x, y, t);
     if (z != null && z.IsValid())
     {
         string   s  = z.GetFullNodeName();
         string[] s2 = s.Split('/');
         TreeNode n  = ZobObjectTree.Nodes[0];
         for (int i = 1; i < s2.Length; i++)
         {
             n = n.Nodes[s2[i]];
         }
         ZobObjectTree.SelectedNode = n;
     }
     OnZobObjectSelectionChange(z);
     return(z);
 }
示例#4
0
        private void UpdateValues()
        {
            if (m_zobObjectWrapper != null && m_zobObjectWrapper.IsValid())
            {
                CLI.ManagedVector3 p = m_zobObjectWrapper.GetTransform();
                CLI.ManagedVector3 r = m_zobObjectWrapper.GetRotation();
                CLI.ManagedVector3 s = m_zobObjectWrapper.GetScale();

                float px = p.x;
                float py = p.y;
                float pz = p.z;
                float rx = r.x;
                float ry = r.y;
                float rz = r.z;
                float sx = s.x;
                float sy = s.y;
                float sz = s.z;
                float f;
                if (float.TryParse(zobPosX.Text, out f))
                {
                    p.x = f;
                }
                if (float.TryParse(zobPosY.Text, out f))
                {
                    p.y = f;
                }
                if (float.TryParse(zobPosZ.Text, out f))
                {
                    p.z = f;
                }
                if (float.TryParse(zobRotX.Text, out f))
                {
                    r.x = f;
                }
                if (float.TryParse(zobRotY.Text, out f))
                {
                    r.y = f;
                }
                if (float.TryParse(zobRotZ.Text, out f))
                {
                    r.z = f;
                }
                if (float.TryParse(zobScaleX.Text, out f))
                {
                    s.x = f;
                }
                if (float.TryParse(zobScaleY.Text, out f))
                {
                    s.y = f;
                }
                if (float.TryParse(zobScaleZ.Text, out f))
                {
                    s.z = f;
                }

                m_zobObjectWrapper.SetTransform(p);
                m_zobObjectWrapper.SetRotation(r);
                m_zobObjectWrapper.SetScale(s);
                SetValues();
            }
        }