added Extrude and Polygon classes, still in progress

git-svn-id: svn://anubis/fart/trunk@269 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop committed 2010-07-01 20:04:44 +00:00
1 parent ad017df3b5
commit 7d844667c3
8 files changed
+157 -1

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#include <math.h>
#include <iostream>
#include "Extrude.h"
#include "util/Solver.h"
using namespace std;
#define FP_EQUAL(x,y) (fabs((x)-(y)) < 0.000001)
Extrude::Extrude()
{
}
Shape::IntersectionList Extrude::intersect(refptr<Shape> _this, const Ray & ray)
{
Ray ray_inv = m_inverse.transform_ray(ray);
IntersectionList res;
return res;
}
void Extrude::addPolygon(refptr<Polygon> polygon)
{
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef EXTRUDE_H
#define EXTRUDE_H EXTRUDE_H
#include <vector>
#include "util/Polygon.h"
#include "Shape.h"
class Extrude : public Shape
{
public:
Extrude();
IntersectionList intersect(refptr<Shape> _this, const Ray & ray);
void addPolygon(refptr<Polygon> polygon);
protected:
std::vector< refptr<Polygon> > m_polygons;
};
#endif
+1
View File
@@ -2,6 +2,7 @@
#include "BoolShape.h"
#include "Box.h"
#include "Cyl.h"
#include "Extrude.h"
#include "Intersect.h"
#include "Plane.h"
#include "Sphere.h"