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