projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resman_waitall is now resman_wait_all
[laserbrain_demo]
/
src
/
metascene.cc
diff --git
a/src/metascene.cc
b/src/metascene.cc
index
ba5bdc2
..
ba05bce
100644
(file)
--- a/
src/metascene.cc
+++ b/
src/metascene.cc
@@
-203,8
+203,6
@@
Scene *MetaScene::extract_nodes(const char *qstr)
int MetaScene::calc_mirror_planes()
{
int MetaScene::calc_mirror_planes()
{
- FlatMirror *planes = 0;
-
int num_mirrors = 0;
while(mirrors) {
FlatMirror *m = mirrors;
int num_mirrors = 0;
while(mirrors) {
FlatMirror *m = mirrors;
@@
-252,7
+250,7
@@
int MetaScene::calc_mirror_planes()
// check to see if we have found this mirror plane already
bool found = false;
// 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);
while(node) {
float d1 = dot(mir->wplane.normal, mir->wplane.pt);
float d2 = dot(node->wplane.normal, node->wplane.pt);
@@
-275,12
+273,6
@@
int MetaScene::calc_mirror_planes()
mir->next = mirrors;
mirrors = mir;
mir->next = mirrors;
mirrors = mir;
- // also add a node to the mirror plane matching list
- FlatMirror *m = new FlatMirror;
- m->wplane = mir->wplane;
- m->next = planes;
- planes = node;
-
mir->objects.push_back(obj);
objmirror[obj] = mir; // associate with object
++num_mirrors;
mir->objects.push_back(obj);
objmirror[obj] = mir; // associate with object
++num_mirrors;
@@
-292,12
+284,6
@@
int MetaScene::calc_mirror_planes()
}
}
}
}
- while(planes) {
- FlatMirror *tmp = planes;
- planes = planes->next;
- delete tmp;
- }
-
return num_mirrors;
}
return num_mirrors;
}