Frustum_gt and Ortho_gt

This is a QCPlugin (standard API), that creates a matrix for a perspective-view frustum and multiplies the current matrix by it. This allows one to change top/bottom/left/right perspective, and manipulate zNear and zFar clip inside of Quartz Composer by placing this plugin the layer below the layers one wishes to change. Disabling it returns the matrix to default.

This stuff is super analogous to Frustum (and Ortho, below) because it's making the same sort of GL invocations, but the code is totally from-scratch, because it's standard API QCPlugin, not "skanky SDK" where the plugin construction is a bit different.

In a QCPlugin, you can't have a macro environment like you can in a QCPatch/SkankySDK, so this changes the matrix by being a layer that's placed below the other layers one wishes to change. The flipside, is that that this can be used in something like an Apple App Store app, because there is no SPI used... and it's also arguably beneficial and easier to use for certain scenarios. If anyone needs the code for such use for an app store thing, contact me. I'm not making this code available for public with the dl bundle, because I feel that this type of patch is a bit special use and maybe foreign to some QC users (but probably super familiar to Pixelshox old timers).

In the shot above, I have a sphere renderer with lighting, the layer below Frustum_gt. Above it, a sphere is getting the front clipped due to translation settings working in conjunction with Frustum_gt.

I've also made a similar plugin to invoke Orthographic Projection.

Some pictures taken with the Heightfield_gt, using the Frustum_gt to cull geometry from heightfield. I used the iSight as the cam source for these pictures... so the culled geometry doesn't map exactly to depth, like it would if I had hooked up the kinect, but just luminance from the iSight image. I'm culling some of the near geometry in these images:

[EDIT: Since this, I've incorporated clipping planes into Heightfield_gt, making this method still totally viable, but not really needed for clipping geometry with that particular patch.]
...and here I'm using the Frustum_gt to cull a thin slice of luminance - culling from back and front, by some careful tweaking: