added trimesh class, support for it in demos, and collision against planes