fart/shapes/Extrude.h
Josh Holtrop c1f39da3e2 added shape definition processing and shape cloning capabilities
git-svn-id: svn://anubis/fart/trunk@284 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-09 17:11:14 +00:00

38 lines
871 B
C++

#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);
void addOffset(double distance,
const Vector & scale, const Vector & shift);
class Offset
{
public:
Offset(double d, const Vector & s, const Vector & p)
: distance(d), scale(s), shift(p)
{
}
double distance;
Vector scale;
Vector shift;
};
virtual refptr<Shape> clone();
protected:
std::vector< refptr<Polygon> > m_polygons;
std::vector<Offset> m_offsets;
};
#endif