summaryrefslogtreecommitdiffstats
path: root/src/TriangleRecord.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/TriangleRecord.h')
-rw-r--r--src/TriangleRecord.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/TriangleRecord.h b/src/TriangleRecord.h
new file mode 100644
index 0000000..13b3248
--- /dev/null
+++ b/src/TriangleRecord.h
@@ -0,0 +1,58 @@
+/*
+ * TriangleRecord.h
+ *
+ * Copyright (C) 2009 Matthias Schiffer <matthias@gamezock.de>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ZOOM_TRIANGLERECORD_H_
+#define ZOOM_TRIANGLERECORD_H_
+
+#include "Triangle.h"
+
+#include <boost/shared_ptr.hpp>
+
+namespace Zoom {
+
+class TriangleRecord {
+ public:
+ class TriangleData {
+ protected:
+ TriangleData() {}
+
+ public:
+ virtual ~TriangleData() {}
+ };
+
+ TriangleRecord(const Triangle& triangle0, boost::shared_ptr<TriangleData> data0)
+ : triangle(triangle0), data(data0) {}
+ TriangleRecord(const Triangle& triangle0) : triangle(triangle0) {}
+ TriangleRecord() {}
+
+ const Triangle& getTriangle() const {return triangle;}
+ Triangle& getTriangle() {return triangle;}
+ void setTriangle(const Triangle &t) {triangle = t;}
+
+ boost::shared_ptr<TriangleData> getData() const {return data;}
+ void setData(boost::shared_ptr<TriangleData> d) {data = d;}
+
+ private:
+ Triangle triangle;
+ boost::shared_ptr<TriangleData> data;
+};
+
+}
+
+#endif /* ZOOM_TRIANGLERECORD_H_ */