samedi 4 mars 2017

calling a function in my main.cpp

I'm trying to call this function in my main.cpp file, any suggestions on how to do so?

// get new reflected direction
 point ReflectivePlane::reflect( ray r ) {
 assert( std::fabs( eval( r.pos ) ) <std::numeric_limits<float>::epsilon());
 point  u = r.dir;
 double t = 2.0 * ( a * u.x  +  b * u.y  +  c * u.z ) / ( a*a + b*b + c*c );
 return point( u.x - a*t, u.y - b*t, u.z - c*t );
 }

Aucun commentaire:

Enregistrer un commentaire