Revision 18219 trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/Polygon3DFeature.java
Polygon3DFeature.java | ||
---|---|---|
5 | 5 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
6 | 6 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
7 | 7 |
|
8 |
import es.upv.ai2.libjosg.Group;
|
|
9 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
8 |
import es.upv.ai2.osgvp.Group;
|
|
9 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
10 | 10 |
|
11 | 11 |
public class Polygon3DFeature extends AbstractFeature3D { |
12 | 12 |
|
13 | 13 |
Polygon3DGeometry p3DGeometry; |
14 | 14 |
SimplePolygon3DSymbol pp3DSymbol; |
15 |
|
|
15 | 16 |
public Polygon3DFeature(ISymbol symbol, IGeometry geometry) { |
16 | 17 |
super(symbol, geometry); |
17 | 18 |
// TODO Auto-generated constructor stub |
18 |
// p3DGeometry = (Polygon3DGeometry) this.getGeometry();
|
|
19 |
// pp3DSymbol = (SimplePolygon3DSymbol) this.getSymbol();
|
|
20 |
p3DGeometry = new Polygon3DGeometry(geometry);
|
|
19 |
// p3DGeometry = (Polygon3DGeometry) this.getGeometry();
|
|
20 |
// pp3DSymbol = (SimplePolygon3DSymbol) this.getSymbol();
|
|
21 |
p3DGeometry = new Polygon3DGeometry(geometry); |
|
21 | 22 |
pp3DSymbol = new SimplePolygon3DSymbol(symbol); |
22 | 23 |
} |
23 | 24 |
|
24 | 25 |
public Group Draw(Group group) { |
25 | 26 |
// TODO Auto-generated method stub |
26 |
group.addChild(p3DGeometry.generateGeometry(pp3DSymbol));
|
|
27 |
group.addChild(p3DGeometry.generateGeometry(pp3DSymbol)); |
|
27 | 28 |
return group; |
28 | 29 |
} |
29 | 30 |
|
30 | 31 |
public void setPlanet(Planet planet) { |
31 |
if (this.p3DGeometry != null){ |
|
32 |
if (this.p3DGeometry != null) {
|
|
32 | 33 |
this.p3DGeometry.setPlanet(planet); |
33 | 34 |
} |
34 | 35 |
} |
35 | 36 |
|
36 | 37 |
public void setHeigth(float heigth) { |
37 |
if (this.p3DGeometry != null){ |
|
38 |
if (this.p3DGeometry != null) {
|
|
38 | 39 |
this.p3DGeometry.setHeigth(heigth); |
39 | 40 |
} |
40 | 41 |
} |
41 | 42 |
|
42 |
|
|
43 |
|
|
44 |
|
|
45 | 43 |
} |
Also available in: Unified diff