Here's a fairly straightforward solution for polyhedra (3 dimensions), with running time O(v+ve), where v is the number of vertices and e is the number of edges. I suppose it could be extended to higher dimensions, but it would probably have much worse running time (I fear roughly exponential as in O(v^{n}), where n is the number of dimensions).

Let our polyhedron have n vertices, defined by their x,y,z coordinates: v_{1}, v_{2}, ..., v_{n} and let the lowest point be v_{1} and the origin (modify the values for the others accordingly), and let it have e edges, defined by the vertices which they connect. Then, since we have coordinates for the vertices (as that is how we defined them), there must be a "ground level" plane p_{0} running through the x and z axes (the y-axis being height, and the ground never having an elevation). Then, let v_{2} be the point closest to the ground plane (shortest line perpendicular to the plane), and let v_{3} be the next closest, etc, through v_{n}.

Through each of the points v_{2} through v_{n}, draw a plane perpendicular to the ground, and let them be numbered p_{m}, where m is the subscript of the vertex through which it was drawn. Then, the volume of our polyhedron is equal to the sum of the volumes of the figures between the planes. We should have something resembling this:

Let the heights between the segments be h_{1} through h_{n-1}, where height h_{j} is the height between planes p_{j} and p_{j+1}.

Now, through each plane, we have a polygon (or more, if the figure is concave), whose vertices' coordinates can be calculated easily as follows:

Let the edge that runs through the plane p_{j} have endpoints v_{a} and v_{b}. Then, the displacement vector is v_{b} - v_{a} (assuming the coordinates of v are in vector-form), and the percentage travelled up is $\frac{h_j-h_a}{h_{b-1}-h_a}$. Multiply this by v_{b} - v_{a} and add to v_{a} to calculate the new point of intersection for that edge:

Intersection point = $(v_b-v_a)\frac{h_j-h_a}{h_{b-1}-h_a}+v_a$

The area of these polygons can be determined using triangles, or a simplification of this very process in just 2 dimensions.

PlanetMath says that the volume of a prismatoid (which is the type of figure contained between sequential planes) is $h\frac{B_1 + B_2 + 4M}{6}$, where the Bs are the areas of the parallel polygons and M is the area of the midway polygon, which is exactly halfway between them (and parallel to them). Since we already know the area of each of the end polygons, and we can easily calculate the vertices of the midway polygon (using the previous paragraph's method), we can calculate the volume of the resulting prismatoids. Adding them up yields the total volume of the polyhedron.

I suppose that the only real issue in this case, then, is, via code, determining which edges run through any particular plane, but if we were to actually look at it, we could tell very easily.

A simpler version of this can be used to figure out the area of any polygon; simply draw lines through the vertices parallel to the x-axis and calculate the area of the resulting trapezoids as (b_{1}+b_{2})/2