The holodeck concept still gives me problems since the TNG days when it comes to food and drink. Originally it was presented as everything being photons and force fields. Then there's mention of replicator technology also involved. I used to think everything in the environment was simulated, including edibles. But with replicator technology, it means there might be an entire banquet table laid out, though all you eat is an olive.
I think the way it works is that the computer is sensitive enough to anticipate what you are going to do and quick enough to adapt to what you're doing. For example if you see a banquet in front of you, it is nothing but a simulation, you reach for something and the projection hides the replication of the item you are going for, by the time your hand reaches it, you're grabbing a real replicated item. If you put it back down and walk away, the computer takes that energy back and it once again becomes nothing more than an image.
If really would have to work like that, for example you always hear the joke about the person who has to clean out the holodeck after the orgies etc, but the reality is if you swallow any bodily fluid of a holographic person, it can't be good for you if that suddenly disappears from your stomach when you leave. Instead it would be replicated, and anything you leave in the holographic person is going to be broken down in the same way you put used plates back in the replicator.
If this were the case a holographic person would be part replicated matter part projection in some cases.