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 @ 40767
History | View | Annotate | Download (4.12 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 |
package org.gvsig.fmap.geom.primitive; |
26 |
|
27 |
import java.awt.Color; |
28 |
import java.awt.Image; |
29 |
|
30 |
/**
|
31 |
* This interface serves to set the appearance of a Solid in a CityGML model.
|
32 |
*
|
33 |
* @author <a href="mailto:jtorres@ai2.upv.es">Jordi Torres Fabra</a>
|
34 |
*
|
35 |
*/
|
36 |
|
37 |
public interface Appearance { |
38 |
|
39 |
public interface Material { |
40 |
|
41 |
|
42 |
|
43 |
public static final class Face { |
44 |
public static final int FRONT = 0; |
45 |
public static final int BACK = 1; |
46 |
public static final int FRONT_AND_BACK = 2; |
47 |
} |
48 |
/**
|
49 |
* Gets the face to apply the material
|
50 |
* @return the face
|
51 |
*/
|
52 |
public Face getFace();
|
53 |
|
54 |
/**
|
55 |
* Sets the face where the material will be applied
|
56 |
* @param face the face
|
57 |
*/
|
58 |
public void setFace(Face face); |
59 |
/**
|
60 |
* Get the ambient color of the material
|
61 |
* @return the ambien color
|
62 |
*/
|
63 |
public Color getAmbient(); |
64 |
/**
|
65 |
* Set the ambient color of the material
|
66 |
* @param ambient the ambien color
|
67 |
*/
|
68 |
public void setAmbient(Color ambient); |
69 |
/**
|
70 |
* Get the diffuse color of the material
|
71 |
* @return the diffuse color
|
72 |
*/
|
73 |
public Color getDiffuse(); |
74 |
/**
|
75 |
* Set the diffuse color of the material
|
76 |
* @param diffuse the diffuse color
|
77 |
*/
|
78 |
public void setDiffuse(Color diffuse); |
79 |
/**
|
80 |
* Get the specular color of the material
|
81 |
* @return the specular color
|
82 |
*/
|
83 |
public Color getSpecular(); |
84 |
/**
|
85 |
* Set the specular color of the material
|
86 |
* @param specular the specular color
|
87 |
*/
|
88 |
public void setSpecular(Color specular); |
89 |
/**
|
90 |
* Get the emissive color of the material
|
91 |
* @return the emissive color
|
92 |
*/
|
93 |
public Color getEmission(); |
94 |
/**
|
95 |
* Set the emissive color of the material
|
96 |
* @param emission the emissive color
|
97 |
*/
|
98 |
public void setEmission(Color emission); |
99 |
/**
|
100 |
* Get the shininess of the material
|
101 |
* @return a float representing the shininess
|
102 |
*/
|
103 |
public float getShininess(); |
104 |
/**
|
105 |
* Set the shininess of the material
|
106 |
* @param shininess a float representing the shininess
|
107 |
*/
|
108 |
public void setShininess(float shininess); |
109 |
|
110 |
} |
111 |
|
112 |
/**
|
113 |
* Enables/disables the blending in a solid
|
114 |
*
|
115 |
* @param value
|
116 |
* the value to set
|
117 |
*/
|
118 |
public void setEnabledBlending(boolean value); |
119 |
|
120 |
/**
|
121 |
* Gets if blending is enabled/disabled
|
122 |
*
|
123 |
* @return a boolean representing enabled(true)/disabled(false)
|
124 |
*/
|
125 |
public boolean getEnabledBlending(); |
126 |
|
127 |
/**
|
128 |
* Enables disables lighting in a solid
|
129 |
*
|
130 |
* @param value
|
131 |
* the value to set
|
132 |
*/
|
133 |
public void setEnabledLighting(boolean value); |
134 |
|
135 |
/**
|
136 |
* Gets if lighting is enabled/disabled
|
137 |
*
|
138 |
* @return a boolean representing enabled(true)/disabled(false)
|
139 |
*/
|
140 |
public boolean getEnabledLighting(); |
141 |
|
142 |
/**
|
143 |
* Sets the material of a solid
|
144 |
*
|
145 |
* @param mat
|
146 |
* the material to set
|
147 |
*/
|
148 |
public void setMaterial(Material mat); |
149 |
|
150 |
/**
|
151 |
* Gets the material of a Solid
|
152 |
*
|
153 |
* @return the material
|
154 |
*/
|
155 |
public Material getMaterial();
|
156 |
|
157 |
/**
|
158 |
* Add a texture to the whole Solid
|
159 |
*
|
160 |
* @param img
|
161 |
* the texture
|
162 |
* @param stage
|
163 |
* the texture stage
|
164 |
*/
|
165 |
public void addTexture(Image img, int stage); |
166 |
|
167 |
/**
|
168 |
* Get the texure of a solid in a concrete stage
|
169 |
*
|
170 |
* @param stage
|
171 |
* the concrete stage
|
172 |
* @return the texture
|
173 |
*/
|
174 |
public Image getTexture(int stage); |
175 |
|
176 |
} |