Depressed Buttons and the Walls that Hold Them

Given two Geoms or NodePaths, is there a means of using one to produce the depth values for the other? That is to say, if I have a 3D model and a simple quad, it there a way of having the depth results for the quad used for the model?

(I’m honestly not sure of how such a thing might work, but it’s worth asking, it seems to me.)

To explain, I’m thinking about how to implement a (3D) button that depresses into a wall without requiring the the wall be modelled with a hole in place, allowing one to place the button object as desired, without modelling geometry around it.

If–as to be honest I expect–the depth idea that I ask about above isn’t feasible, or is simply a poor method of going about it, does anyone have any other suggestions?

I’m tempted to use the stencil buffer, but I’m not sure of how well that suits my purpose here. I do want the button to be occluded by other parts of the wall, and other objects in the scene: a cupboard placed in front of the button should obscure it, and looking at a depressed button close to edge on shouldn’t allow the inside to be visible through nearer walls, etc.