updated util/Ray module, util/Makefile for automatic prerequisite generation

git-svn-id: svn://anubis/gvsu@366 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2009-01-16 22:20:18 +00:00
parent 00a6331fe9
commit 5af5a9da1e
2 changed files with 13 additions and 1 deletions

View File

@ -6,5 +6,15 @@ all: $(OBJS)
%.o: %.cc %.o: %.cc
$(CXX) -c -o $@ $(CXXFLAGS) $< $(CXX) -c -o $@ $(CXXFLAGS) $<
# Make dependency files
%.dep: %.cc
@set -e; rm -f $@; \
$(CXX) -MM $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
clean: clean:
-$(RM) -f *.o $(ARCHIVE) -$(RM) -f *.o *.dep $(ARCHIVE)
# Include dependency files
include $(OBJS:.o=.dep)

View File

@ -9,6 +9,8 @@ class Ray
public: public:
Ray(); Ray();
Ray(const Vector & origin, const Vector & direction); Ray(const Vector & origin, const Vector & direction);
Vector getOrigin() const { return m_origin; }
Vector getDirection() const { return m_direction; }
private: private:
Vector m_origin; Vector m_origin;