You don't mean "cube" here- all cubes are about as "regular" as you can get. But, anyway, one method of determining whether or not a point lies inside any given figure is to look at points on a single line, parallel to an axis if that helps, from the point to infinity. If that line crosses a boundary of the figure (an odd number of times) then the point is inside the figure.