示例#1
0
        public bool GetToolParameter(string paramName, ref Vector3 v)
        {
            any_result r   = new any_result();
            bool       bOK = GetToolParameter(paramName, ref r);

            v[0] = r.x; v[1] = r.y; v[2] = r.z;
            return(bOK);
        }
示例#2
0
        public bool GetToolParameter(string paramName, ref float f)
        {
            any_result r   = new any_result();
            bool       bOK = GetToolParameter(paramName, ref r);

            f = r.f;
            return(bOK);
        }
示例#3
0
        public bool GetToolParameter(string paramName, ref bool b)
        {
            any_result r   = new any_result();
            bool       bOK = GetToolParameter(paramName, ref r);

            b = r.b;
            return(bOK);
        }
示例#4
0
        public bool GetToolParameter(string paramName, ref any_result r)
        {
            StoredCommands sc  = new StoredCommands();
            uint           key = sc.AppendGetToolParameterCommand(paramName);

            ExecuteCommands(sc);
            return(sc.GetToolParameterCommandResult(key, r));
        }
示例#5
0
        private int get_object_id(mm.RemoteControl rc, string name)
        {
            StoredCommands sc  = new StoredCommands();
            uint           key = sc.AppendSceneCommand_FindObjectByName(name);

            rc.ExecuteCommands(sc);
            any_result r   = new any_result();
            bool       bOK = sc.GetSceneCommandResult_FindObjectByName(key, r);

            return((bOK) ? r.i : -1);
        }
示例#6
0
        public int GetTriangleCount(int nObjectID)
        {
            StoredCommands sc  = new StoredCommands();
            uint           key = sc.AppendSceneCommand_GetTriangleCount(nObjectID);

            ExecuteCommands(sc);
            any_result r   = new any_result();
            bool       bOK = sc.GetSceneCommandResult_GetTriangleCount(key, r);

            return((bOK) ? r.i : -1);
        }
示例#7
0
        public int ListNumberOfHoles()
        {
            StoredCommands sc  = new StoredCommands();
            uint           key = sc.AppendQueryCommand_ListNumberOfHoles();

            ExecuteCommands(sc);
            any_result r = new any_result();

            sc.GetQueryResult_ListNumberOfHoles(key, r);
            return(r.i);
        }
示例#8
0
        public int GetObjectType(int id)
        {
            StoredCommands sc  = new StoredCommands();
            uint           key = sc.AppendSceneCommand_GetObjectType(id);

            ExecuteCommands(sc);
            any_result a      = new any_result();
            bool       bFound = sc.GetSceneCommandResult_GetObjectType(key, a);

            return((bFound) ? a.i : -1);
        }
示例#9
0
        public int CreatePivot()
        {
            StoredCommands sc  = new StoredCommands();
            frame3f        f   = WorldFrame();
            uint           key = sc.AppendSceneCommand_CreatePivot(f);

            ExecuteCommands(sc);

            any_result r = new any_result();

            sc.GetSceneCommandResult_CreatePivot(key, r);
            return(r.i);
        }
示例#10
0
        public int FindObjectByName(string name)
        {
            StoredCommands sc  = new StoredCommands();
            uint           key = sc.AppendSceneCommand_FindObjectByName(name);

            ExecuteCommands(sc);
            any_result r   = new any_result();
            bool       bOK = sc.GetSceneCommandResult_FindObjectByName(key, r);

            if (bOK)
            {
                return(r.i);
            }
            else
            {
                return(-1);
            }
        }
示例#11
0
        public int[] GetFaceGroupsInRange(int nObjectID, int nTriangleIDStart, int nCount)
        {
            StoredCommands sc = new StoredCommands();

            uint[] keys = new uint[nCount];
            for (int k = 0; k < nCount; ++k)
            {
                keys[k] = sc.AppendSceneCommand_GetTriangleGroup(nObjectID, nTriangleIDStart + k);
            }
            ExecuteCommands(sc);
            int[] vGroups = new int[nCount];
            for (int k = 0; k < nCount; ++k)
            {
                any_result r   = new any_result();
                bool       bOK = sc.GetSceneCommandResult_GetTriangleGroup(keys[k], r);
                vGroups[k] = (bOK) ? r.i : -1;
            }
            return(vGroups);
        }