Package org.h2gis.functions.spatial.mesh
Class Triangle
- java.lang.Object
-
- org.h2gis.functions.spatial.mesh.Triangle
-
public class Triangle extends Object
A triangle built from the combination of the 3 vertices index.- Author:
- Nicolas Fortin, UMRAE, Université Gustave Eiffel - Cerema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTriangle.TriangleBuilderGenerate a triangle from Tinfour structure
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intget(int id)Get vertex indexintgetA()intgetAttribute()intgetB()intgetC()voidset(int id, int index)Set the vertex index for one of the vertex of the trianglevoidsetA(int a)Set the vertex index for one of the vertex of the trianglevoidsetB(int b)Set the vertex index for one of the vertex of the trianglevoidsetC(int c)Set the vertex index for one of the vertex of the triangle
-
-
-
Constructor Detail
-
Triangle
public Triangle(int a, int b, int c, int attribute)Constructor- Parameters:
a- Vertex index of the first vertexb- Vertex index of the second vertexc- Vertex index of the third vertexattribute- Attribute of the triangle
-
Triangle
public Triangle(int a, int b, int c)Constructor- Parameters:
a- Vertex index of the first vertexb- Vertex index of the second vertexc- Vertex index of the third vertex
-
-
Method Detail
-
getA
public int getA()
- Returns:
- Vertex A index
-
get
public int get(int id)
Get vertex index- Parameters:
id- Vertex number [0-2]- Returns:
- vertex index
-
getAttribute
public int getAttribute()
- Returns:
- Attribute associated with the triangle Currently 0 if the triangle is not bound to a polygonal constraint, 1 otherwise
-
set
public void set(int id, int index)Set the vertex index for one of the vertex of the triangle- Parameters:
id- Triangle vertex [0-2]index- Vertex index to set (from the array of coordinates)
-
setA
public void setA(int a)
Set the vertex index for one of the vertex of the triangle- Parameters:
a- Vertex index to set (from the array of coordinates)
-
getB
public int getB()
- Returns:
- Vertex B index
-
setB
public void setB(int b)
Set the vertex index for one of the vertex of the triangle- Parameters:
b- Vertex index to set (from the array of coordinates)
-
getC
public int getC()
- Returns:
- Vertex C index
-
setC
public void setC(int c)
Set the vertex index for one of the vertex of the triangle- Parameters:
c- Vertex index to set (from the array of coordinates)
-
-