I have a three dimensional pyramid given by four vectors **a**, **b**, **c**, **d** and want to test if a given vector **x** is inside that region or not. Here is an image:

![pyramid and tested vector](https://i.stack.imgur.com/LxhhK.jpg)

A related question can be found here: [2D problem](https://gamedev.stackexchange.com/questions/22392/what-is-a-good-way-to-determine-if-a-vector-is-between-two-other-vectors).

How can I test to see if the vector is contained by the others?