Compute the volume of a cube not axis-aligned I have objects in 3D which have 8 corners and most of the time they look like cubes. I need to compute the volume of those objects. Since they are not axis-aligned I can't use the standard formula $V = l^3$.
Are there other solutions?

Example image


Divide your cuboid into tetrahedra, compute the volume of each tetrahedron and add them.
The volume of a tetrahedron with vertices $OPQR$ is given by:
$$
V={1\over6}|(P-O)\cdot(Q-O)\times(R-O)|.
$$
A possible decomposition is shown below: a cuboid with opposite faces $ABCD$ and $EFGH$ is the sum of five tetrahedra $ABCF$, $ACDH$, $AFEH$, $CFGH$, $ACFH$.

