Statistics
| Revision:

root / org.gvsig.toolbox / trunk / org.gvsig.toolbox / org.gvsig.toolbox.algorithm / src / main / java / es / unex / sextante / lighting / viewshed / VisibilitySegment.java @ 59

History | View | Annotate | Download (1.64 KB)

1
/*******************************************************************************
2
VisibilitySegment.java
3
Copyright (C) Aviad Segev, 2010
4

5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9

10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 *******************************************************************************/
19

    
20
package es.unex.sextante.lighting.viewshed;
21

    
22
import com.vividsolutions.jts.geom.Coordinate;
23
import com.vividsolutions.jts.geom.LineSegment;
24

    
25
/**
26
 * A Line segment with added visibility value Visibility may be VISIBLE or HIDDEN
27
 *
28
 */
29
class VisibilitySegment
30
         extends
31
            LineSegment {
32
   private static final long serialVersionUID = -1834372981852774886L;
33
   private final int               m_visibility;
34

    
35

    
36
   public VisibilitySegment(final Coordinate startPoint,
37
                            final Coordinate endPoint,
38
                            final int visibility) {
39
      p0 = startPoint;
40
      p1 = endPoint;
41
      m_visibility = visibility;
42
   }
43

    
44

    
45
   public int getVisibility() {
46
      return m_visibility;
47
   }
48
}