public class PackedSetsPoint2D_I32
extends java.lang.Object
Internally, the value of each point is stored in one or more int[] arrays. The maximum size of each array is specified in the constructor. These arrays are known as blocks. A set of points specifies which block the first element belongs in, the index and how many points are in the set.
| Modifier and Type | Class and Description |
|---|---|
class |
PackedSetsPoint2D_I32.SetIterator
Used to access all the points in a set without making a copy.
|
| Constructor and Description |
|---|
PackedSetsPoint2D_I32() |
PackedSetsPoint2D_I32(int blockLength)
Configures the storage
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPointToTail(int x,
int y)
Adds a point to the tail point set
|
PackedSetsPoint2D_I32.SetIterator |
createIterator() |
java.util.List<georegression.struct.point.Point2D_I32> |
getSet(int which) |
void |
getSet(int which,
org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> list)
Copies all the points in the set into the specified list
|
void |
grow()
Adds a new point set to the end.
|
void |
removeTail()
Removes the current point set from the end
|
void |
reset()
Discards all previously detected points but does not free its memory.
|
int |
size()
Number of point sets
|
int |
sizeOfSet(int which)
Returns the size/length of a point set
|
int |
sizeOfTail()
Returns the size of the set at the tail.
|
int |
totalPoints()
Total number of points
|
void |
writeOverSet(int which,
java.util.List<georegression.struct.point.Point2D_I32> points)
Overwrites the points in the set with the list of points.
|
public PackedSetsPoint2D_I32(int blockLength)
blockLength - Number of elements in the block's array. Try 2000public PackedSetsPoint2D_I32()
public void reset()
public void grow()
public void removeTail()
public void addPointToTail(int x,
int y)
x - coordinatey - coordinatepublic int totalPoints()
public int size()
public int sizeOfSet(int which)
which - index of point setpublic void getSet(int which,
org.ddogleg.struct.FastQueue<georegression.struct.point.Point2D_I32> list)
which - (Input) which point setlist - (Output) Storage for pointspublic java.util.List<georegression.struct.point.Point2D_I32> getSet(int which)
public PackedSetsPoint2D_I32.SetIterator createIterator()
public int sizeOfTail()
public void writeOverSet(int which,
java.util.List<georegression.struct.point.Point2D_I32> points)
points - Points which are to be written into the set. Must be the same size as the set.