static bool once;
if(!once) {
float x = ImGui::GetColumnOffset(1);
- ImGui::SetColumnOffset(1, x * 1.7);
+ ImGui::SetColumnOffset(1, x * 1.55);
once = true;
}
}
int MetaScene::calc_mirror_planes()
{
- FlatMirror *planes = 0;
-
int num_mirrors = 0;
while(mirrors) {
FlatMirror *m = mirrors;
// check to see if we have found this mirror plane already
bool found = false;
- FlatMirror *node = planes;
+ FlatMirror *node = mirrors;
while(node) {
float d1 = dot(mir->wplane.normal, mir->wplane.pt);
float d2 = dot(node->wplane.normal, node->wplane.pt);
mir->next = mirrors;
mirrors = mir;
- node = new FlatMirror;
- node->wplane = mir->wplane;
- node->next = planes;
- planes = node;
-
mir->objects.push_back(obj);
objmirror[obj] = mir; // associate with object
++num_mirrors;
} else {
+ node->objects.push_back(obj);
delete mir;
}
}
}
}
- while(planes) {
- FlatMirror *tmp = planes;
- planes = planes->next;
- delete tmp;
- }
-
return num_mirrors;
}