io fixes in segment.h, will compile now
added some typedefs
added intersection operations + triangle primitive + tests