added shapes/Makefile, shapes/Shape.h
git-svn-id: svn://anubis/gvsu@367 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
5af5a9da1e
commit
cd4dc59bb4
20
cs658/final/shapes/Makefile
Normal file
20
cs658/final/shapes/Makefile
Normal file
@ -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)
|
15
cs658/final/shapes/Shape.h
Normal file
15
cs658/final/shapes/Shape.h
Normal file
@ -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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user