If I understand raytracing correctly, then you could get this by shooting a ray out from the coordinate in the opposite direction of the normals at that point, and then see if it hits another face of the object with its normals in the other direction. Is something like that possible (incase you couldn't tell, I'm new to a lot of this...)?
Also, I'm curious about another thing. It seems easy enough to setup a shader through Maya and Mental Ray such that the user can add lights from the scene to a light list array, and then the shader will access information from all of those lights. Is it possible to do the same for geometric objects in the scene? For a more specific example of what I'm talking about, let's say you're examining the coordinates of the object that your shader has been applied to, and you want to compare those coordinates directly with the coordinates of objects in your shader list. Can that be done through Mental Ray, and if so what would the syntax be like? I dug through the public shader source files, but I can't find any examples where they've done anything like this.