PolygonBuilder
Contents
[
Hide
]Inheritance: java.lang.Object
public final class PolygonBuilder
A helper class to build polygon for Mesh Example:
Mesh mesh = new Mesh();
PolygonBuilder builder = new PolygonBuilder(mesh);
builder.begin();
builder.addVertex(0);
builder.addVertex(1);
builder.addVertex(2);
builder.end();
Equals to :
Mesh mesh = new Mesh();
int[] indices = new int[] {0, 1, 2};
mesh.createPolygon(indices);
If all indices are ready to use, Mesh is preferred, otherwise PolygonBuilder would be a better choice.
Constructors
Constructor | Description |
---|---|
PolygonBuilder(Mesh mesh) | Initializes a new instance of the PolygonBuilder class. |
Methods
Method | Description |
---|---|
addVertex(int index) | Adds a vertex index to the polygon |
begin() | Begins to add a new polygon |
end() | Finishes the polygon creation |
equals(Object arg0) | |
getClass() | |
hashCode() | |
notify() | |
notifyAll() | |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
PolygonBuilder(Mesh mesh)
public PolygonBuilder(Mesh mesh)
Initializes a new instance of the PolygonBuilder class.
Parameters:
Parameter | Type | Description |
---|---|---|
mesh | Mesh | On which mesh to build polygon. |
addVertex(int index)
public void addVertex(int index)
Adds a vertex index to the polygon
Parameters:
Parameter | Type | Description |
---|---|---|
index | int |
begin()
public void begin()
Begins to add a new polygon
end()
public void end()
Finishes the polygon creation
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |