Check if a point is inside a rectangular shaped area (3D)? I am having a hard time figuring out if a 3D point lies in a cuboid (like the one in the picture below). I found a lot of examples to check if a point lies inside a rectangle in a 2D space for example this on but none for 3D space. 

I have a cuboid in 3D space. This cuboid can be of any size and can have any rotation. I can calculate the vertices $P_1$ to $P_8$ of the cuboid. 
Can anyone point me in a direction on how to determine if a point lies inside the cuboid? 

Since 2-D problem is known, divide the problem into 3 parts.
Disregard z-coordinate. If any point is within box bounds $ x_2-x_1,y_2-y_1, $ select it and all other such points. Similarly y-z and z-x boxes.
Next choose points that the are common to three selections.
