added shapes/Makefile, shapes/Shape.h
git-svn-id: svn://anubis/gvsu@367 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
1 parent
5af5a9da1e
commit
cd4dc59bb4
2 files changed
+35
No files matched your search
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
OBJS := $(patsubst %.cc,%.o,$(wildcard *.cc))
|
||||||
|
|
||||||
|
all: $(OBJS)
|
||||||
|
|
||||||
|
%.o: %.cc
|
||||||
|
$(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:
|
||||||
|
-$(RM) -f *.o *.dep $(ARCHIVE)
|
||||||
|
|
||||||
|
# Include dependency files
|
||||||
|
include $(OBJS:.o=.dep)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
#ifndef SHAPE_H
|
||||||
|
#define SHAPE_H SHAPE_H
|
||||||
|
|
||||||
|
#include "util/Solver.h"
|
||||||
|
#include "util/Ray.h"
|
||||||
|
|
||||||
|
class Shape
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual Solver::Result intersect(const Ray & ray) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
Reference in new issue
Block a user