src/octree.cc
branchpyrit
changeset 91 9d66d323c354
parent 49 558fde7da82a
child 92 9af5c039b678
equal deleted inserted replaced
90:f6a72eb99631 91:9d66d323c354
     1 /*
     1 /*
     2  * octree.cc: Octree class
     2  * octree.cc: Octree class
     3  *
     3  *
     4  * This file is part of Pyrit Ray Tracer.
     4  * This file is part of Pyrit Ray Tracer.
     5  *
     5  *
     6  * Copyright 2007  Radek Brich
     6  * Copyright 2007, 2008  Radek Brich
     7  *
     7  *
     8  * Permission is hereby granted, free of charge, to any person obtaining a copy
     8  * Permission is hereby granted, free of charge, to any person obtaining a copy
     9  * of this software and associated documentation files (the "Software"), to deal
     9  * of this software and associated documentation files (the "Software"), to deal
    10  * in the Software without restriction, including without limitation the rights
    10  * in the Software without restriction, including without limitation the rights
    11  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    11  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   168 #	define txm	st_cur->txm
   168 #	define txm	st_cur->txm
   169 #	define tym	st_cur->tym
   169 #	define tym	st_cur->tym
   170 #	define tzm	st_cur->tzm
   170 #	define tzm	st_cur->tzm
   171 
   171 
   172 	int a = 0;
   172 	int a = 0;
   173 	Vector3 ro(ray.o);
   173 	Vector ro(ray.o);
   174 	Vector3 rdir(ray.dir);
   174 	Vector rdir(ray.dir);
   175 
   175 
   176 	if (rdir.x < 0.0)
   176 	if (rdir.x < 0.0)
   177 	{
   177 	{
   178 		ro.x = (bbox.L.x+bbox.H.x) - ro.x;
   178 		ro.x = (bbox.L.x+bbox.H.x) - ro.x;
   179 		rdir.x = -rdir.x;
   179 		rdir.x = -rdir.x;