For one of the other CSG objects, simply replace 'Union' with 'Intersection' or 'Difference'. CSG objects call these functions on their subobjects to calculate their own intersections and normals. I modified the lexer and parser to accept the new input files described above. All the functions declared in classes.hh are defined here. The return is whether or not there exists an intersetion.
Planes are a bit more complicated since they're treated as hemispaces.
For instance, if the ray is parallel to the plane, we need to check which side of the plane the ray is on. If it's not on the side of the normal, there is no intersection. But if it is, the ray is entirely contained within the hemispace. Similarly, if we find the point of intersection is behind the ray, we have to perform a similar test. For spheres, planes, and triangles, the normal is calculated as usual.