Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i=0; i<objects.size(); i++) {
- WavefrontObj* wfo = dynamic_cast<WavefrontObj*>( objects[i] );
- if (wfo || i != thisObjIndex) { // don't check for int with the originating object
- vec3 point, normal;
- Material *intMat;
- float t;
- int intPartIndex;
- if (objects[i]->rayInt( rayStart, rayDir, ((i != thisObjIndex) ? -1 : thisObjPartIndex), point, normal, t, intMat, intPartIndex ))
- if (0 < t && t < param) {
- param = t;
- P = point;
- N = normal;
- objIndex = i;
- objPartIndex = intPartIndex;
- mat = intMat;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement