creating polygons for extrude objects, ngon takes radius parameter
git-svn-id: svn://anubis/fart/trunk@270 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
7d844667c3
commit
4c5444f053
4 files changed
+70
-4
No files matched your search
@@ -24,4 +24,11 @@ Shape::IntersectionList Extrude::intersect(refptr<Shape> _this, const Ray & ray)
|
||||
|
||||
void Extrude::addPolygon(refptr<Polygon> polygon)
|
||||
{
|
||||
m_polygons.push_back(polygon);
|
||||
}
|
||||
|
||||
void Extrude::addOffset(double distance,
|
||||
const Vector & scale, const Vector & shift)
|
||||
{
|
||||
m_offsets.push_back(Offset(distance, scale, shift));
|
||||
}
|
||||
@@ -13,9 +13,23 @@ class Extrude : public Shape
|
||||
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;
|
||||
};
|
||||
|
||||
protected:
|
||||
std::vector< refptr<Polygon> > m_polygons;
|
||||
std::vector<Offset> m_offsets;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user