Class HullVertex
java.lang.Object
jaba.convexHull3d.HullVertex
This class is an abstraction of a vertex.
- Author:
- Sebastiano Spicuglia
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHullVertex(int x, int y, int z, int id, String name) Creates a new vertex object -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareCollinear(HullVertex a, HullVertex b, HullVertex c) True if @a, @b, @c are collinear, false otherwise.clone()Clones this objectbooleanprotected HullEdgeintgetID()Returns the object ID related to this vertex, ornullif this vertex is a projected one.getName()Returns the name.inthashCode()protected booleanisOnHull()True if this vertex is on the current hull surface.protected booleanTrue if this vertex is already processedprotected voidsetDuplicate(HullEdge edge) Setter for the field duplicatevoidSets the name.protected voidsetOnHull(boolean b) Setter for the field onHullprotected voidsetProcessed(boolean m) Setter for the field marktoString()intx()Returns the x-coordinty()Returns the y-coordintz()Returns the z-coord
-
Field Details
-
next
-
prev
-
-
Constructor Details
-
HullVertex
Creates a new vertex object- Parameters:
x- the x-coordy- the y-coordz- the z-coordid- the index of the related stationname- the name of the related station
-
-
Method Details
-
hashCode
-
equals
-
areCollinear
True if @a, @b, @c are collinear, false otherwise.- Parameters:
a- the first pointb- the second pointc- the third point- Returns:
- if @a, @b, @c are collinear
-
clone
Clones this object -
isOnHull
protected boolean isOnHull()True if this vertex is on the current hull surface.- Returns:
-
isProcessed
protected boolean isProcessed()True if this vertex is already processed- Returns:
-
getDuplicate
-
getID
public int getID()Returns the object ID related to this vertex, ornullif this vertex is a projected one.- Returns:
- The related object ID.
-
x
public int x()Returns the x-coord- Returns:
- the x-coord
-
y
public int y()Returns the y-coord- Returns:
- the y-coord
-
z
public int z()Returns the z-coord- Returns:
- the z-coord
-
setOnHull
protected void setOnHull(boolean b) Setter for the field onHull- Parameters:
b- the value you want to set
-
setDuplicate
Setter for the field duplicate- Parameters:
edge- the value you want to set
-
setProcessed
protected void setProcessed(boolean m) Setter for the field mark- Parameters:
m- the value you want to set
-
getName
-
setName
-
toString
-