Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.api / src / main / java / org / gvsig / fmap / geom / primitive / Appearance.java @ 40559

History | View | Annotate | Download (4.22 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
/*
25
 * AUTHORS (In addition to CIT):
26
 * 2009 Instituto de Autom?tica e Inform?tica Industrial, UPV.
27
 */
28

    
29
package org.gvsig.fmap.geom.primitive;
30

    
31
import java.awt.Color;
32
import java.awt.Image;
33

    
34
/**
35
 * This interface serves to set the appearance of a Solid in a CityGML model.
36
 * 
37
 * @author <a href="mailto:jtorres@ai2.upv.es">Jordi Torres Fabra</a>
38
 * 
39
 */
40

    
41
public interface Appearance {
42

    
43
        public interface Material {
44

    
45
        
46

    
47
                public static final class Face {
48
                        public static final int FRONT = 0;
49
                        public static final int BACK = 1;
50
                        public static final int FRONT_AND_BACK = 2;
51
                }
52
                /**
53
                 * Gets the face to apply the material
54
                 * @return the face
55
                 */
56
                public Face getFace();
57
                
58
                /**
59
                 * Sets the face where the material will be applied
60
                 * @param face the face
61
                 */
62
                public void setFace(Face face);
63
                /**
64
                 * Get the ambient color of the material
65
                 * @return the ambien color
66
                 */
67
                public Color getAmbient();
68
                /**
69
                 * Set the ambient color of the material
70
                 * @param ambient the ambien color
71
                 */
72
                public void setAmbient(Color ambient);
73
                /**
74
                 * Get the diffuse color of the material
75
                 * @return the diffuse color
76
                 */
77
                public Color getDiffuse();
78
                /**
79
                 * Set the diffuse color of the material
80
                 * @param diffuse the diffuse color
81
                 */
82
                public void setDiffuse(Color diffuse);
83
                /**
84
                 * Get the specular color of the material 
85
                 * @return the specular color
86
                 */
87
                public Color getSpecular();
88
                /**
89
                 * Set the specular color of the material
90
                 * @param specular the specular color
91
                 */
92
                public void setSpecular(Color specular);
93
                /**
94
                 * Get the emissive color of the material
95
                 * @return        the emissive color
96
                 */
97
                public Color getEmission();
98
                /**
99
                 * Set the emissive color of the material
100
                 * @param emission the emissive color 
101
                 */
102
                public void setEmission(Color emission);
103
                /**
104
                 * Get the shininess of the material
105
                 * @return a float representing the shininess
106
                 */
107
                public float getShininess();
108
                /**
109
                 * Set the shininess of the material
110
                 * @param shininess a float representing the shininess
111
                 */
112
                public void setShininess(float shininess);
113

    
114
        }
115

    
116
        /**
117
         * Enables/disables the blending in a solid
118
         * 
119
         * @param value
120
         *            the value to set
121
         */
122
        public void setEnabledBlending(boolean value);
123

    
124
        /**
125
         * Gets if blending is enabled/disabled
126
         * 
127
         * @return a boolean representing enabled(true)/disabled(false)
128
         */
129
        public boolean getEnabledBlending();
130

    
131
        /**
132
         * Enables disables lighting in a solid
133
         * 
134
         * @param value
135
         *            the value to set
136
         */
137
        public void setEnabledLighting(boolean value);
138

    
139
        /**
140
         * Gets if lighting is enabled/disabled
141
         * 
142
         * @return a boolean representing enabled(true)/disabled(false)
143
         */
144
        public boolean getEnabledLighting();
145

    
146
        /**
147
         * Sets the material of a solid
148
         * 
149
         * @param mat
150
         *            the material to set
151
         */
152
        public void setMaterial(Material mat);
153

    
154
        /**
155
         * Gets the material of a Solid
156
         * 
157
         * @return the material
158
         */
159
        public Material getMaterial();
160

    
161
        /**
162
         * Add a texture to the whole Solid
163
         * 
164
         * @param img
165
         *            the texture
166
         * @param stage
167
         *            the texture stage
168
         */
169
        public void addTexture(Image img, int stage);
170

    
171
        /**
172
         * Get the texure of a solid in a concrete stage
173
         * 
174
         * @param stage
175
         *            the concrete stage
176
         * @return the texture
177
         */
178
        public Image getTexture(int stage);
179

    
180
}