Check if a point is inside a solid mesh

I’m trying to make voxels from 3d meshes.
first solution I thought of was making boolean operations between a horizontal plane or a box and the mesh itself, and make an orthogonal camera to view this intersection in each section.

Problem is, no addons I’ve tried to perform boolean operations between solids are compiling in XCode4 and Apple LLVM 5.1.
Any thoughts? Raytracing? GLSL?

I googled it http://gamedev.stackexchange.com/questions/31431/finding-if-a-point-is-inside-of-a-mesh-point-in-polyhedron

There is an ofxRay addon to do raycasting.