Subversion Repositories gelsvn

Rev

Rev 595 | Rev 610 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 595 Rev 609
Line 65... Line 65...
65
 
65
 
66
AABox AABox::box_and_split(const std::vector<Triangle>& invec,
66
AABox AABox::box_and_split(const std::vector<Triangle>& invec,
67
													 std::vector<Triangle>& lvec,
67
													 std::vector<Triangle>& lvec,
68
													 std::vector<Triangle>& rvec)
68
													 std::vector<Triangle>& rvec)
69
{
69
{
70
	const int N = invec.size();
70
	const size_t N = invec.size();
71
	Vec3f tri_pmin(FLT_MAX), tri_pmax(-FLT_MAX);
71
	Vec3f tri_pmin(FLT_MAX), tri_pmax(-FLT_MAX);
72
			
72
			
73
	for(int i=0;i<N;++i)
73
	for(size_t i=0;i<N;++i)
74
		{
74
		{
75
			tri_pmin = v_min(invec[i].get_pmin(), tri_pmin);
75
			tri_pmin = v_min(invec[i].get_pmin(), tri_pmin);
76
			tri_pmax = v_max(invec[i].get_pmax(), tri_pmax);
76
			tri_pmax = v_max(invec[i].get_pmax(), tri_pmax);
77
		}
77
		}
78
	Vec3f diff = tri_pmax - tri_pmin;
78
	Vec3f diff = tri_pmax - tri_pmin;