private void queriesButton_Click(object sender, EventArgs e) { mmapi_util.RemoteControl rc = new mmapi_util.RemoteControl(); rc.Initialize(); StoredCommands sc = new StoredCommands(); uint resultKey = sc.AppendQueryCommand_GetBoundingBox(); rc.ExecuteCommands(sc); floatArray min = new floatArray(3); floatArray max = new floatArray(3); sc.GetQueryResult_GetBoundingBox(resultKey, min.cast(), max.cast()); float minx = min.getitem(0); float miny = min.getitem(1); float minz = min.getitem(2); float maxx = max.getitem(0); float maxy = max.getitem(1); float maxz = max.getitem(2); Debug.WriteLine("got box"); rc.Shutdown(); }
public mmMatrix(floatArray f) { for (int k = 0; k < 9; ++k) { m[k] = f.getitem(k); } }
public float ToScene(float fWorld) { StoredCommands sc = new StoredCommands(); uint key = sc.AppendQueryCommand_ConvertScalarToScene(fWorld); ExecuteCommands(sc); floatArray f = new floatArray(1); sc.GetQueryResult_ConvertScalarToScene(key, f.cast()); return(f.getitem(0)); }
public void Set(floatArray f) { v[0] = f.getitem(0); v[1] = f.getitem(1); v[2] = f.getitem(2); }
public Vector3(floatArray f) { v[0] = f.getitem(0); v[1] = f.getitem(1); v[2] = f.getitem(2); }
public static void Set(this Vector3f v, floatArray f) { v.x = f.getitem(0); v.y = f.getitem(1); v.z = f.getitem(2); }
public static Vector3f ToVector3f(floatArray f) { return(new Vector3f(f.getitem(0), f.getitem(1), f.getitem(2))); }