es.unex.sextante.tin.smoothTinBezier
Class TriangleDT

java.lang.Object
  extended by es.unex.sextante.tin.smoothTinBezier.TriangleDT
All Implemented Interfaces:
java.io.Serializable

public class TriangleDT
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 com.vividsolutions.jts.geom.Coordinate A
           
 com.vividsolutions.jts.geom.Coordinate B
           
 com.vividsolutions.jts.geom.Coordinate C
           
 boolean haveBreakLine
           
 int typeBreakLine
           
 
Constructor Summary
TriangleDT()
          implicit Constructor
TriangleDT(com.vividsolutions.jts.geom.Coordinate[] coords)
           
TriangleDT(com.vividsolutions.jts.geom.Coordinate A, com.vividsolutions.jts.geom.Coordinate B, com.vividsolutions.jts.geom.Coordinate C)
          Constructor
TriangleDT(TriangleDT T)
          Constructor
 
Method Summary
 boolean compare(TriangleDT T)
          The method which comparing two triangles, if the triangles have same coordinates of vertexes
 char compareReturnIndex(com.vividsolutions.jts.geom.Coordinate P)
          The method which compare points
 boolean contains(com.vividsolutions.jts.geom.Coordinate P)
          The method which testing, if the triangle contains the point
 boolean containsLine(com.vividsolutions.jts.geom.LineString newL)
          The method which testing, if the line intersect the triangle
protected  boolean containsOneSamePointWith(TriangleDT T)
          The method which testing two triangles, if the triangles have one same point
 boolean containsPointAsVertex(com.vividsolutions.jts.geom.Coordinate P)
          The method which testing, if the triangle contains the point
 boolean containsTwoPoints(com.vividsolutions.jts.geom.Coordinate P1, com.vividsolutions.jts.geom.Coordinate P2)
          The method which testing two triangles, if the triangles have two same points
protected  com.vividsolutions.jts.geom.Coordinate getCentroid()
           
 com.vividsolutions.jts.geom.Envelope getEnvelope()
          Protected method for getting envelope of triangle
protected  boolean isTriangle()
          The method which testing triangle, if the triangles is'nt line
 void normalizePolygon()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

A

public com.vividsolutions.jts.geom.Coordinate A

B

public com.vividsolutions.jts.geom.Coordinate B

C

public com.vividsolutions.jts.geom.Coordinate C

haveBreakLine

public boolean haveBreakLine

typeBreakLine

public int typeBreakLine
Constructor Detail

TriangleDT

public TriangleDT()
implicit Constructor


TriangleDT

public TriangleDT(com.vividsolutions.jts.geom.Coordinate[] coords)

TriangleDT

public TriangleDT(com.vividsolutions.jts.geom.Coordinate A,
                  com.vividsolutions.jts.geom.Coordinate B,
                  com.vividsolutions.jts.geom.Coordinate C)
Constructor

Parameters:
A - - first vertex
B - - second vertex
C - - third vertex

TriangleDT

public TriangleDT(TriangleDT T)
Constructor

Parameters:
T - - triangle will be cloned
Method Detail

compare

public boolean compare(TriangleDT T)
The method which comparing two triangles, if the triangles have same coordinates of vertexes

Parameters:
T - - triangle to test
Returns:
boolean true - the triangles are same false - the triangles aren't same

compareReturnIndex

public char compareReturnIndex(com.vividsolutions.jts.geom.Coordinate P)
The method which compare points

Parameters:
P - - points for comparing
Returns:
index A,B,C which point is same or N if point P not exist in triangle

contains

public boolean contains(com.vividsolutions.jts.geom.Coordinate P)
The method which testing, if the triangle contains the point

Parameters:
P - - point which will be tested
Returns:
boolean true - the triangle contains the point false - the triangle doesn't contains point

containsLine

public boolean containsLine(com.vividsolutions.jts.geom.LineString newL)
The method which testing, if the line intersect the triangle

Parameters:
newL - - Geometry of line
Returns:
boolean true - line intersect triangle false - line doesn't intersect triangle

containsOneSamePointWith

protected boolean containsOneSamePointWith(TriangleDT T)
The method which testing two triangles, if the triangles have one same point

Parameters:
T - - triangle to test
Returns:
boolean true - the triangles have one same point false - the triangles haven't one same point

containsPointAsVertex

public boolean containsPointAsVertex(com.vividsolutions.jts.geom.Coordinate P)
The method which testing, if the triangle contains the point

Parameters:
P - - point which will be tested
Returns:
boolean true - the triangle contains the point false - the triangle doesn't contains point

containsTwoPoints

public boolean containsTwoPoints(com.vividsolutions.jts.geom.Coordinate P1,
                                 com.vividsolutions.jts.geom.Coordinate P2)
The method which testing two triangles, if the triangles have two same points

Parameters:
P1 - - point for testing
P2 - - point for testing
Returns:
boolean true - the triangles have two same point false - the triangles haven't two same point

getCentroid

protected com.vividsolutions.jts.geom.Coordinate getCentroid()

getEnvelope

public com.vividsolutions.jts.geom.Envelope getEnvelope()
Protected method for getting envelope of triangle

Returns:
envelope of triangle

isTriangle

protected boolean isTriangle()
The method which testing triangle, if the triangles is'nt line

Returns:
boolean true - the triangle is triangle false - the triangle is line

normalizePolygon

public void normalizePolygon()


Copyright © 2014 gvSIG Association. All Rights Reserved.