added support for pillars
some new helper methods/classes
This commit is contained in:
@@ -28,6 +28,11 @@ namespace Ray3D {
|
||||
transform(mat);
|
||||
}
|
||||
|
||||
void translate(const Point3 pos) {
|
||||
const Matrix4 mPos = Matrix4::getTranslation(pos.x, pos.y, pos.z);
|
||||
transform(mPos);
|
||||
}
|
||||
|
||||
void transform(const Matrix4& mat) {
|
||||
|
||||
for (Triangle3& tria : trias) {
|
||||
@@ -53,6 +58,10 @@ namespace Ray3D {
|
||||
trias.push_back( Triangle3(p1,p3,p4) );
|
||||
}
|
||||
|
||||
void addTriangle(Point3 p1, Point3 p2, Point3 p3) {
|
||||
trias.push_back( Triangle3(p1,p2,p3) );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user