summaryrefslogtreecommitdiffhomepage
path: root/Magic2/Editor.h
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
commite33e19d0587146859d48a134ec9fd94e7b7ba5cd (patch)
tree69d048c8801858d2756ab3a487090a7a1b74bf14 /Magic2/Editor.h
downloadstarshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.zip
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.gz
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.bz2
Initial upload
Diffstat (limited to 'Magic2/Editor.h')
-rw-r--r--Magic2/Editor.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/Magic2/Editor.h b/Magic2/Editor.h
new file mode 100644
index 0000000..c0326e2
--- /dev/null
+++ b/Magic2/Editor.h
@@ -0,0 +1,84 @@
+/* Project Magic 2.0
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
+
+ SUBSYSTEM: Magic.exe
+ FILE: Editor.h
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ Classes for rendering solid meshes of polygons
+*/
+
+#ifndef Editor_h
+#define Editor_h
+
+#include "MagicDoc.h"
+#include "Command.h"
+#include "Polygon.h"
+#include "Solid.h"
+#include "Video.h"
+#include "List.h"
+
+// +--------------------------------------------------------------------+
+
+class Selection;
+class ModelView;
+
+// +--------------------------------------------------------------------+
+
+class Editor
+{
+public:
+ Editor(MagicDoc* doc) : document(doc), model(0) { }
+
+ // accessors / mutators
+ void UseModel(Model* m) { model = m; }
+ Model* GetModel() const { return model; }
+
+ // operations
+
+ enum { MAP_NONE, MAP_PLANAR, MAP_CYLINDRICAL, MAP_SPHERICAL, MAP_STRETCH };
+
+ void ApplyMaterial(Material* material, List<Poly>& polys,
+ int mapping, int axis, float scale_u, float scale_v,
+ int flip, int mirror, int rotate);
+
+ void ApplyMaterialCylindrical(Material* material, List<Poly>& polys,
+ int axis, float scale_u, float scale_v,
+ int flip, int mirror, int rotate);
+
+ void ApplyMaterialSpherical(Material* material, List<Poly>& polys,
+ int axis, float scale_u, float scale_v,
+ int flip, int mirror, int rotate);
+
+
+ void Resegment();
+
+protected:
+ MagicDoc* document;
+ Model* model;
+};
+
+// +--------------------------------------------------------------------+
+
+class EditCommand : public Command
+{
+public:
+ EditCommand(const char* name, MagicDoc* doc);
+ virtual ~EditCommand();
+
+ virtual void Do();
+ virtual void Undo();
+
+private:
+ Model* model1;
+ Model* model2;
+};
+
+// +--------------------------------------------------------------------+
+
+#endif Editor_h
+