Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Editor.h
Go to the documentation of this file.
1
/* Project Magic 2.0
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: Magic.exe
6
FILE: Editor.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Classes for rendering solid meshes of polygons
13
*/
14
15
#ifndef Editor_h
16
#define Editor_h
17
18
#include "
MagicDoc.h
"
19
#include "
Command.h
"
20
#include "
Polygon.h
"
21
#include "
Solid.h
"
22
#include "
Video.h
"
23
#include "
List.h
"
24
25
// +--------------------------------------------------------------------+
26
27
class
Selection
;
28
class
ModelView
;
29
30
// +--------------------------------------------------------------------+
31
32
class
Editor
33
{
34
public
:
35
Editor
(
MagicDoc
* doc) :
document
(doc),
model
(0) { }
36
37
// accessors / mutators
38
void
UseModel
(
Model
* m) {
model
= m; }
39
Model
*
GetModel
()
const
{
return
model
; }
40
41
// operations
42
43
enum
{
MAP_NONE
,
MAP_PLANAR
,
MAP_CYLINDRICAL
,
MAP_SPHERICAL
,
MAP_STRETCH
};
44
45
void
ApplyMaterial
(
Material
* material,
List<Poly>
& polys,
46
int
mapping,
int
axis,
float
scale_u,
float
scale_v,
47
int
flip,
int
mirror,
int
rotate);
48
49
void
ApplyMaterialCylindrical
(
Material
* material,
List<Poly>
& polys,
50
int
axis,
float
scale_u,
float
scale_v,
51
int
flip,
int
mirror,
int
rotate);
52
53
void
ApplyMaterialSpherical
(
Material
* material,
List<Poly>
& polys,
54
int
axis,
float
scale_u,
float
scale_v,
55
int
flip,
int
mirror,
int
rotate);
56
57
58
void
Resegment
();
59
60
protected
:
61
MagicDoc
*
document
;
62
Model
*
model
;
63
};
64
65
// +--------------------------------------------------------------------+
66
67
class
EditCommand
:
public
Command
68
{
69
public
:
70
EditCommand
(
const
char
*
name
,
MagicDoc
* doc);
71
virtual
~EditCommand
();
72
73
virtual
void
Do
();
74
virtual
void
Undo
();
75
76
private
:
77
Model
* model1;
78
Model
* model2;
79
};
80
81
// +--------------------------------------------------------------------+
82
83
#endif Editor_h
84
Magic2
Editor.h
Generated on Tue Jun 5 2012 20:46:14 for Starshatter_Open by
1.8.1