protected static class PathLength.PathSegment
extends java.lang.Object
PathLength.segments
- list.
This is used as an immutable value-object.Modifier and Type | Field and Description |
---|---|
protected int |
index
The index of the original path segment this flattened segment is a
part of.
|
protected float |
length
The length of the path segment, accumulated from the start.
|
protected int |
segType
The path segment type.
|
protected float |
x
The x coordinate of the path segment.
|
protected float |
y
The y coordinate of the path segment.
|
Constructor and Description |
---|
PathSegment(int segType,
float x,
float y,
float len,
int idx)
Creates a new PathSegment with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Returns the segment index.
|
float |
getLength()
Returns the length of the path segment.
|
int |
getSegType()
Returns the segment type.
|
float |
getX()
Returns the x coordinate of the path segment.
|
float |
getY()
Returns the y coordinate of the path segment.
|
void |
setIndex(int v)
Sets the segment index.
|
void |
setLength(float v)
Sets the length of the path segment.
|
void |
setX(float v)
Sets the x coordinate of the path segment.
|
void |
setY(float v)
Sets the y coordinate of the path segment.
|
protected final int segType
protected float x
protected float y
protected float length
protected int index
PathSegment(int segType, float x, float y, float len, int idx)
segType
- The segment typex
- The x coordinatey
- The y coordinatelen
- The segment lengthidx
- The index of the original path segment this flattened
segment is a part ofpublic int getSegType()
public float getX()
public void setX(float v)
public float getY()
public void setY(float v)
public float getLength()
public void setLength(float v)
public int getIndex()
public void setIndex(int v)