mitsuba-af602c6fd98a/src/librender/scene.cpp
// ===========================================================================
//             Ray tracing support for bidirectional algorithms
// ===========================================================================
Ray tracing support for bidirectional algorithms
Ray tracing support for bidirectional algorithms
bool Scene::rayIntersectAll(const Ray &ray) const {
	if (rayIntersect(ray))
		return true;
	Float mint = ray.mint;
	if (mint == Epsilon)
		mint *= std::max(std::max(std::max(std::abs(ray.o.x),
			std::abs(ray.o.y)), std::abs(ray.o.z)), Epsilon);
	for (size_t i=0; i<m_specialShapes.size(); ++i) {
		if (m_specialShapes[i]->rayIntersect(ray, mint, ray.maxt))
			return true;
	}
	return false;
}
bool Scene :: rayIntersectAll ( const Ray & ray ) const { if ( rayIntersect ( ray ) ) return true ; Float mint = ray . mint ; if ( mint == Epsilon ) mint *= std :: max ( std :: max ( std :: max ( std :: abs ( ray . o . x ) , std :: abs ( ray . o . y ) ) , std :: abs ( ray . o . z ) ) , Epsilon ) ; for ( size_t i = 0 ; i < m_specialShapes . size ( ) ; ++ i ) { if ( m_specialShapes [ i ] -> rayIntersect ( ray , mint , ray . maxt ) ) return true ; } return false ; }
Ray tracing support for bidirectional algorithms
Ray tracing support for bidirectional algorithms