48 VuoPoint4d point = {0,0,0,0};
50 json_type t = json_object_get_type(js);
51 if (t == json_type_string)
53 const char *s = json_object_get_string(js);
55 sscanf(s,
"%20g, %20g, %20g, %20g", &x, &y, &z, &w);
56 return (VuoPoint4d){x, y, z, w};
58 else if (t == json_type_array)
60 int len = json_object_array_length(js);
62 point.x = json_object_get_double(json_object_array_get_idx(js, 0));
64 point.y = json_object_get_double(json_object_array_get_idx(js, 1));
66 point.z = json_object_get_double(json_object_array_get_idx(js, 2));
68 point.w = json_object_get_double(json_object_array_get_idx(js, 3));
72 json_object *o = NULL;
74 if (json_object_object_get_ex(js,
"x", &o))
76 else if (json_object_object_get_ex(js,
"X", &o))
79 if (json_object_object_get_ex(js,
"y", &o))
81 else if (json_object_object_get_ex(js,
"Y", &o))
84 if (json_object_object_get_ex(js,
"z", &o))
86 else if (json_object_object_get_ex(js,
"Z", &o))
89 if (json_object_object_get_ex(js,
"w", &o))
91 else if (json_object_object_get_ex(js,
"W", &o))
103 json_object *js = json_object_new_object();
106 json_object_object_add(js,
"x", xObject);
109 json_object_object_add(js,
"y", yObject);
112 json_object_object_add(js,
"z", zObject);
115 json_object_object_add(js,
"w", wObject);
185 return minimum.x <= value.x && value.x <= maximum.x
186 && minimum.y <= value.y && value.y <= maximum.y
187 && minimum.z <= value.z && value.z <= maximum.z
188 && minimum.w <= value.w && value.w <= maximum.w;