public class EuclidGeometryPolygonTools
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
EuclidGeometryPolygonTools.Bound |
Human readable enum that helps defining search criteria for some of the search methods in this
tool class.
|
| Modifier and Type | Field | Description |
|---|---|---|
(package private) static double |
EPSILON |
|
private static java.util.Random |
random |
| Constructor | Description |
|---|---|
EuclidGeometryPolygonTools() |
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
canObserverSeeEdge(int edgeIndex,
double observerX,
double observerY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Determines whether an observer can see the outside of the given edge of the given convex
polygon.
|
static boolean |
canObserverSeeEdge(int edgeIndex,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly observer,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Determines whether an observer can see the outside of the given edge of the given convex
polygon.
|
private static void |
checkEdgeIndex(int edgeIndex,
int numberOfVertices) |
|
private static void |
checkNumberOfVertices(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices) |
|
static int |
closestEdgeIndexToPoint2D(double pointX,
double pointY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Finds the index of the closest edge to the query.
|
static int |
closestEdgeIndexToPoint2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly point,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Finds the index of the closest edge to the query.
|
static us.ihmc.euclid.tuple2D.Point2D |
closestPointToNonInterectingRay2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Computes the coordinates of the closest point to the ray that belongs to the given convex
polygon.
|
static boolean |
closestPointToNonInterectingRay2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics closestPointToPack) |
Computes the coordinates of the closest point to the ray that belongs to the given convex
polygon.
|
static int |
closestVertexIndexToLine2D(double pointOnLineX,
double pointOnLineY,
double lineDirectionX,
double lineDirectionY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices) |
Finds the index of the closest vertex to the given line.
|
static int |
closestVertexIndexToLine2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly firstPointOnLine,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly secondPointOnLine,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices) |
Finds the index of the closest vertex to the given line.
|
static int |
closestVertexIndexToLine2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointOnLine,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly lineDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices) |
Finds the index of the closest vertex to the given line.
|
static int |
closestVertexIndexToPoint2D(double pointX,
double pointY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices) |
Finds the index of the closest vertex to the query.
|
static int |
closestVertexIndexToPoint2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly point,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices) |
Finds the index of the closest vertex to the query.
|
static int |
closestVertexIndexToRay2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Finds the index of the closest vertex to the given ray.
|
static double |
computeConvexPolyong2DArea(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics centroidToPack) |
Computes the area and centroid (optional) of a convex polygon defined by its size
numberOfVertices and vertices convexPolygon2D . |
static boolean |
edgeNormal(int edgeIndex,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Vector2DBasics normalToPack) |
Computes the vector that points to the outside and orthogonal to the
edgeIndex th edge of the given convex polygon. |
(package private) static int |
findMinXMaxYVertexIndex(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices,
int numberOfVertices) |
Finds the index of the vertex with the lowest x-coordinate.
|
static int |
findVertexIndex(Vertex2DSupplier vertex2DSupplier,
boolean isXPriority,
EuclidGeometryPolygonTools.Bound xBound,
EuclidGeometryPolygonTools.Bound yBound) |
Finds the index of a vertex in the specified supplier given search criteria.
|
(package private) static int |
grahamScanAngleCompare(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly minXMaxYVertex,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly vertex1,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly vertex2) |
|
private static int |
grahamScanAnglePartition(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> list,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly minXMaxYVertex,
int startIndex,
int endIndex,
int pivotIndex) |
Partition the list around the pivot:
|
(package private) static void |
grahamScanAngleSort(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices,
int numberOfVertices) |
Sorts the vertices to complete the first step of the Graham scan algorithm.
|
private static void |
grahamScanAngleSortRecursive(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly minXMaxYVertex,
int startIndex,
int endIndex) |
Recursive step of the sorting algorithm for the Graham scan.
|
static int |
inPlaceGiftWrapConvexHull2D(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices) |
In-place and garbage free implementation of the
Gift wrapping algorithm
for computing the convex hull 2D of a set of points.
|
static int |
inPlaceGiftWrapConvexHull2D(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices,
int numberOfVertices) |
In-place and garbage free implementation of the
Gift wrapping algorithm
for computing the convex hull 2D of a set of points.
|
static int |
inPlaceGrahamScanConvexHull2D(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices) |
In-place and garbage free implementation of the
Graham scan algorithm for computing
the convex hull 2D of a set of points.
|
static int |
inPlaceGrahamScanConvexHull2D(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices,
int numberOfVertices) |
In-place and garbage free implementation of the
Graham scan algorithm for computing
the convex hull 2D of a set of points.
|
static int |
intersectionBetweenLine2DAndConvexPolygon2D(double pointOnLineX,
double pointOnLineY,
double lineDirectionX,
double lineDirectionY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics firstIntersectionToPack,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics secondIntersectionToPack) |
Computes the coordinates of the possible intersection(s) between a given line 2D and a given
convex polygon 2D.
|
static us.ihmc.euclid.tuple2D.Point2D[] |
intersectionBetweenLine2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointOnLine,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly lineDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Computes the coordinates of the possible intersection(s) between a given line 2D and a given
convex polygon 2D.
|
static int |
intersectionBetweenLine2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointOnLine,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly lineDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics firstIntersectionToPack,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics secondIntersectionToPack) |
Computes the coordinates of the possible intersection(s) between a given line 2D and a given
convex polygon 2D.
|
static us.ihmc.euclid.tuple2D.Point2D[] |
intersectionBetweenLineSegment2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly lineSegmentStart,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly lineSegmentEnd,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Computes the coordinates of the possible intersection(s) between a given line segment 2D and a
given convex polygon 2D.
|
static int |
intersectionBetweenLineSegment2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly lineSegmentStart,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly lineSegmentEnd,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics firstIntersectionToPack,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics secondIntersectionToPack) |
Computes the coordinates of the possible intersection(s) between a given line segment 2D and a
given convex polygon 2D.
|
static us.ihmc.euclid.tuple2D.Point2D[] |
intersectionBetweenRay2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Computes the coordinates of the possible intersection(s) between a given ray 2D and a given
convex polygon 2D.
|
static int |
intersectionBetweenRay2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics firstIntersectionToPack,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics secondIntersectionToPack) |
Computes the coordinates of the possible intersection(s) between a given ray 2D and a given
convex polygon 2D.
|
static boolean |
isPoint2DInsideConvexPolygon2D(double pointX,
double pointY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
double epsilon) |
Determines if the point is inside the convex polygon given the tolerance
epsilon . |
static boolean |
isPoint2DInsideConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly point,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
double epsilon) |
Determines if the point is inside the convex polygon given the tolerance
epsilon . |
static boolean |
isPolygon2DConvexAtVertex(int vertexIndex,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices,
boolean clockwiseOrdered) |
Tests if the polygon defined by the given
vertices is convex at the vertex defined by
the given vertexIndex . |
static boolean |
isPolygon2DConvexAtVertex(int vertexIndex,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices,
int numberOfVertices,
boolean clockwiseOrdered) |
Tests if the polygon defined by the given
vertices is convex at the vertex defined by
the given vertexIndex . |
static int |
lineOfSightEndIndex(double observerX,
double observerY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
From the point of view of an observer located outside the polygon, only a continuous subset of
the polygon's edges can be seen defining a line-of-sight.
|
static int |
lineOfSightEndIndex(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly observer,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
From the point of view of an observer located outside the polygon, only a continuous subset of
the polygon's edges can be seen defining a line-of-sight.
|
static int[] |
lineOfSightIndices(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly observer,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
From the point of view of an observer located outside the polygon, only a continuous subset of
the polygon's edges can be seen defining a line-of-sight.
|
static int |
lineOfSightStartIndex(double observerX,
double observerY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
From the point of view of an observer located outside the polygon, only a continuous subset of
the polygon's edges can be seen defining a line-of-sight.
|
static int |
lineOfSightStartIndex(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly observer,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
From the point of view of an observer located outside the polygon, only a continuous subset of
the polygon's edges can be seen defining a line-of-sight.
|
(package private) static <T> void |
moveElementToEnd(java.util.List<T> list,
int indexOfElementToMove,
int listSize) |
Moves the element located at
indexOfElementToShift to listSize - 1 and shifts
all the elements located in [indexToRemove + 1 ; listSize - 1 ] by -1 . |
static int |
next(int index,
int listSize) |
Increments then recomputes the given
index such that it is ∈ [0, listSize [. |
static int |
nextEdgeIndexIntersectingWithLine2D(int previousEdgeIndex,
double pointOnLineX,
double pointOnLineY,
double lineDirectionX,
double lineDirectionY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices) |
Finds the index of the next polygon's edge that the given line intersects.
|
static int |
nextEdgeIndexIntersectingWithLine2D(int previousEdgeIndex,
us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointOnLine,
us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly lineDirection,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices) |
Finds the index of the next polygon's edge that the given line intersects.
|
static boolean |
orthogonalProjectionOnConvexPolygon2D(double pointToProjectX,
double pointToProjectY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics projectionToPack) |
Computes the orthogonal projection of a 2D point on a given 2D convex polygon.
|
static us.ihmc.euclid.tuple2D.Point2D |
orthogonalProjectionOnConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointToProject,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Computes the orthogonal projection of a 2D point on a given 2D convex polygon.
|
static boolean |
orthogonalProjectionOnConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointToProject,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered,
us.ihmc.euclid.tuple2D.interfaces.Point2DBasics projectionToPack) |
Computes the orthogonal projection of a 2D point on a given 2D convex polygon.
|
static int |
previous(int index,
int listSize) |
Decrements then recomputes the given
index such that it is ∈ [0, listSize [. |
static double |
signedDistanceFromPoint2DToConvexPolygon2D(double pointX,
double pointY,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Returns minimum distance between the point and the polygon.
|
static double |
signedDistanceFromPoint2DToConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly point,
java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D,
int numberOfVertices,
boolean clockwiseOrdered) |
Returns minimum distance between the point and the polygon.
|
static int |
wrap(int index,
int listSize) |
Recomputes the given
index such that it is ∈ [0, listSize [. |
private static final java.util.Random random
static final double EPSILON
public static boolean isPolygon2DConvexAtVertex(int vertexIndex, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices, boolean clockwiseOrdered)
vertices
is convex at the vertex defined by
the given vertexIndex
.
Edge cases:
false
if the vertex, next and previous vertices lie on the same
line.
false
if the polygon has less than 3 vertices.
vertexIndex
- the index of the vertex to be tested for convexity.vertices
- the list of vertices defining the polygon to test. Not modified.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.true
if the polygon is convex at the given vertex, false
otherwise.java.lang.IndexOutOfBoundsException
- if vertexIndex
is either negative or greater or
equal than numberOfVertices
.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean isPolygon2DConvexAtVertex(int vertexIndex, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices, int numberOfVertices, boolean clockwiseOrdered)
vertices
is convex at the vertex defined by
the given vertexIndex
.
Edge cases:
false
if the vertex, next and previous vertices lie on the same
line.
false
if the polygon has less than 3 vertices.
vertexIndex
- the index of the vertex to be tested for convexity.vertices
- the list of vertices defining the polygon to test. Not modified.numberOfVertices
- the number of vertices relevant to the polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.true
if the polygon is convex at the given vertex, false
otherwise.java.lang.IndexOutOfBoundsException
- if vertexIndex
is either negative or greater or
equal than numberOfVertices
.java.lang.IndexOutOfBoundsException
- if vertexIndex
is either negative or greater or
equal than numberOfVertices
.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int inPlaceGiftWrapConvexHull2D(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices)
The given list vertices
is reordered such that the vertices of the clockwise convex
hull are positioned first. The method returns the number of vertices that compose the convex
hull.
vertices
- the 2D point cloud from which the convex hull is to be computed. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int inPlaceGiftWrapConvexHull2D(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices, int numberOfVertices)
The given list vertices
is reordered such that the vertices of the clockwise convex
hull are positioned first. The method returns the number of vertices that compose the convex
hull.
vertices
- the 2D point cloud from which the convex hull is to be computed. Modified.numberOfVertices
- specifies the number of relevant points in the list. The algorithm
will only process the points ∈ [0; numberOfVertices
[.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int inPlaceGrahamScanConvexHull2D(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices)
The given list vertices
is reordered such that the vertices of the clockwise convex
hull are positioned first. The method returns the number of vertices that compose the convex
hull.
vertices
- the 2D point cloud from which the convex hull is to be computed. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int inPlaceGrahamScanConvexHull2D(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices, int numberOfVertices)
The given list vertices
is reordered such that the vertices of the clockwise convex
hull are positioned first. The method returns the number of vertices that compose the convex
hull.
vertices
- the 2D point cloud from which the convex hull is to be computed. Modified.numberOfVertices
- specifies the number of relevant points in the list. The algorithm
will only process the points ∈ [0; numberOfVertices
[.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static double computeConvexPolyong2DArea(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics centroidToPack)
numberOfVertices
and vertices convexPolygon2D
.
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
numberOfVertices == 0
, this method returns Double.NaN
and
centroidToPack
is set to Double.NaN
.
numberOfVertices < 3
, this method returns 0.0
and
centroidToPack
is set to average of the polygon vertices.
convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.centroidToPack
- point 2D in which the centroid of the convex polygon is stored. Can be
null
. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean edgeNormal(int edgeIndex, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Vector2DBasics normalToPack)
edgeIndex
th edge of the given convex polygon.
WARNING: This method assumes that the given vertices already form a convex polygon.
edgeIndex
- index of the vertex the edge starts from.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.normalToPack
- the vector that is orthogonal to the edge and points toward the outside of
the polygon. Modified.java.lang.IndexOutOfBoundsException
- if edgeIndex
is either negative or greater or equal
than numberOfVertices
.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean isPoint2DInsideConvexPolygon2D(double pointX, double pointY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, double epsilon)
epsilon
.
WARNING: This method assumes that the given vertices already form a convex polygon.
It is equivalent to performing the test against the polygon shrunk by
Math.abs(epsilon)
if epsilon < 0.0
, or against the polygon enlarged by
epsilon
if epsilon > 0.0
.
Edge cases:
numberOfVertices == 0
, this method returns false
.
numberOfVertices == 1
, this method returns false
if epsilon < 0
or if the query is at a distance from the polygon's only vertex that is greater than
epsilon
, returns true
otherwise.
numberOfVertices == 2
, this method returns false
if epsilon < 0
or if the query is at a distance from the polygon's only edge that is greater than
epsilon
, returns true
otherwise.
pointX
- the x-coordinate of the query.pointY
- the y-coordinate of the query.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.epsilon
- the tolerance to use during the test.true
if the query is considered to be inside the polygon, false
otherwise.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean isPoint2DInsideConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly point, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, double epsilon)
epsilon
.
WARNING: This method assumes that the given vertices already form a convex polygon.
It is equivalent to performing the test against the polygon shrunk by
Math.abs(epsilon)
if epsilon < 0.0
, or against the polygon enlarged by
epsilon
if epsilon > 0.0
.
Edge cases:
numberOfVertices == 0
, this method returns false
.
numberOfVertices == 1
, this method returns false
if epsilon < 0
or if the query is at a distance from the polygon's only vertex that is greater than
epsilon
, returns true
otherwise.
numberOfVertices == 2
, this method returns false
if epsilon < 0
or if the query is at a distance from the polygon's only edge that is greater than
epsilon
, returns true
otherwise.
point
- the coordinates of the query. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.epsilon
- the tolerance to use during the test.true
if the query is considered to be inside the polygon, false
otherwise.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int intersectionBetweenLine2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointOnLine, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly lineDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics firstIntersectionToPack, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics secondIntersectionToPack)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
0
and the two intersection-to-pack
arguments remain unmodified.
1
and the coordinates of
the only intersection are stored in firstIntersectionToPack
.
secondIntersectionToPack
remains unmodified.
pointOnLine
- a point located on the line. Not modified.lineDirection
- the direction of the line. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.firstIntersectionToPack
- point in which the coordinates of the first intersection
between the line and the convex polygon. Can be null
. Modified.secondIntersectionToPack
- point in which the coordinates of the second intersection
between the line and the convex polygon. Can be null
. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int intersectionBetweenLine2DAndConvexPolygon2D(double pointOnLineX, double pointOnLineY, double lineDirectionX, double lineDirectionY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics firstIntersectionToPack, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics secondIntersectionToPack)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
0
and the two intersection-to-pack
arguments remain unmodified.
1
and the coordinates of
the only intersection are stored in firstIntersectionToPack
.
secondIntersectionToPack
remains unmodified.
pointOnLineX
- the x-coordinate of a point on the line.pointOnLineY
- the y-coordinate of a point on the line.lineDirectionX
- the x-component of the direction of the line.lineDirectionY
- the y-component of the direction of the line.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.firstIntersectionToPack
- point in which the coordinates of the first intersection
between the line and the convex polygon. Can be null
. Modified.secondIntersectionToPack
- point in which the coordinates of the second intersection
between the line and the convex polygon. Can be null
. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static us.ihmc.euclid.tuple2D.Point2D[] intersectionBetweenLine2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointOnLine, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly lineDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method generates garbage.
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
null
.
null
.
pointOnLine
- a point located on the line. Not modified.lineDirection
- the direction of the line. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.null
if the
method failed or if there is no intersections.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int intersectionBetweenLineSegment2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly lineSegmentStart, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly lineSegmentEnd, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics firstIntersectionToPack, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics secondIntersectionToPack)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
0
and the two intersection-to-pack
arguments remain unmodified.
1
and the coordinates of
the only intersection are stored in firstIntersectionToPack
.
secondIntersectionToPack
remains unmodified.
lineSegmentStart
- the first endpoint of the line segment. Not modified.lineSegmentEnd
- the second endpoint of the line segment. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.firstIntersectionToPack
- point in which the coordinates of the first intersection
between the line segment and the convex polygon. Can be null
. Modified.secondIntersectionToPack
- point in which the coordinates of the second intersection
between the line segment and the convex polygon. Can be null
. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static us.ihmc.euclid.tuple2D.Point2D[] intersectionBetweenLineSegment2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly lineSegmentStart, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly lineSegmentEnd, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method generates garbage.
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
null
.
null
.
lineSegmentStart
- the first endpoint of the line segment. Not modified.lineSegmentEnd
- the second endpoint of the line segment. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int intersectionBetweenRay2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics firstIntersectionToPack, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics secondIntersectionToPack)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
0
and the two intersection-to-pack
arguments might be modified.
1
and the coordinates of
the only intersection are stored in firstIntersectionToPack
.
secondIntersectionToPack
might be modified.
rayOrigin
- the ray's origin. Not modified.rayDirection
- the ray's direction. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.firstIntersectionToPack
- point in which the coordinates of the first intersection
between the ray and the convex polygon. Can be null
. Modified.secondIntersectionToPack
- point in which the coordinates of the second intersection
between the ray and the convex polygon. Can be null
. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static us.ihmc.euclid.tuple2D.Point2D[] intersectionBetweenRay2DAndConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method generates garbage.
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
null
.
null
.
rayOrigin
- the ray's origin. Not modified.rayDirection
- the ray's direction. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static double signedDistanceFromPoint2DToConvexPolygon2D(double pointX, double pointY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method assumes that the given vertices already form a convex polygon.
The return value is negative if the point is inside the polygon.
Edge cases:
Double.NaN
.
pointX
- the x-coordinate of the query.pointY
- the y-coordinate of the query.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static double signedDistanceFromPoint2DToConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly point, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method assumes that the given vertices already form a convex polygon.
The return value is negative if the point is inside the polygon.
Edge cases:
Double.NaN
.
point
- the coordinates of the query. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean closestPointToNonInterectingRay2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics closestPointToPack)
WARNINGS:
intersectionBetweenRay2DAndConvexPolygon2D(Point2DReadOnly, Vector2DReadOnly, List, int, boolean, Point2DBasics, Point2DBasics)
.
Edge cases:
false
.
rayOrigin
- the ray's origin. Not modified.rayDirection
- the ray's direction. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.closestPointToPack
- the point in which the coordinates of the closest point are stored.
Modified.true
if the method succeeds, false
otherwise.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static us.ihmc.euclid.tuple2D.Point2D closestPointToNonInterectingRay2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method generates garbage.
WARNINGS:
intersectionBetweenRay2DAndConvexPolygon2D(Point2DReadOnly, Vector2DReadOnly, List, int, boolean, Point2DBasics, Point2DBasics)
.
Edge cases:
null
.
rayOrigin
- the ray's origin. Not modified.rayDirection
- the ray's direction. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.null
if the method failed.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int closestVertexIndexToLine2D(double pointOnLineX, double pointOnLineY, double lineDirectionX, double lineDirectionY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
-1
.
pointOnLineX
- the x-coordinate of a point located on the line. Not modified.pointOnLineY
- the y-coordinate of a point located on the line. Not modified.lineDirectionX
- the x-coordinate of the direction of the line. Not modified.lineDirectionY
- the y-coordinate of the direction of the line. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int closestVertexIndexToLine2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly firstPointOnLine, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly secondPointOnLine, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
-1
.
firstPointOnLine
- a first point located on the line. Not modified.secondPointOnLine
- a second point located on the line. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int closestVertexIndexToLine2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointOnLine, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly lineDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
-1
.
pointOnLine
- a point located on the line. Not modified.lineDirection
- the direction of the line. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int closestVertexIndexToRay2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly rayOrigin, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly rayDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
-1
.
rayOrigin
- the ray's origin. Not modified.rayDirection
- the ray's direction. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int closestVertexIndexToPoint2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly point, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
-1
.
point
- the coordinates of the query. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int closestVertexIndexToPoint2D(double pointX, double pointY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
-1
.
pointX
- the x-coordinate of the query.pointY
- the y-coordinate of the query.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int closestEdgeIndexToPoint2D(double pointX, double pointY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
-1
.
pointX
- the x-coordinate of the query.pointY
- the y-coordinate of the query.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int closestEdgeIndexToPoint2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly point, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
-1
.
point
- the coordinates of the query. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int lineOfSightStartIndex(double observerX, double observerY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING:
Edge cases:
-1
.
-1
.
0
if the observer is
different from the polygon's vertex, or returns -1
if the observer is equal to the
polygon's vertex.
observerX
- the x-coordinate of the observer.observerY
- the y-coordinate of the observer.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.-1
if this method
fails.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int lineOfSightStartIndex(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly observer, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING:
Edge cases:
-1
.
-1
.
0
if the observer is
different from the polygon's vertex, or returns -1
if the observer is equal to the
polygon's vertex.
observer
- the coordinates of the observer. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.-1
if this method
fails.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int lineOfSightEndIndex(double observerX, double observerY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING:
Edge cases:
-1
.
-1
.
0
if the observer is
different from the polygon's vertex, or returns -1
if the observer is equal to the
polygon's vertex.
observerX
- the x-coordinate of the observer.observerY
- the y-coordinate of the observer.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.-1
if this method
fails.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int lineOfSightEndIndex(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly observer, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING:
Edge cases:
-1
.
-1
.
0
if the observer is
different from the polygon's vertex, or returns -1
if the observer is equal to the
polygon's vertex.
observer
- the coordinates of the observer. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.-1
if this method
fails.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int[] lineOfSightIndices(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly observer, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method generates garbage.
WARNING:
Edge cases:
null
.
null
.
new int[]{0, 0}
if the
observer is different from the polygon's vertex, or returns null
if the observer is
equal to the polygon's vertex.
observer
- the coordinates of the observer. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.null
if this method fails.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int nextEdgeIndexIntersectingWithLine2D(int previousEdgeIndex, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointOnLine, us.ihmc.euclid.tuple2D.interfaces.Vector2DReadOnly lineDirection, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices)
WARNING: This method assumes that the given vertices already form a convex polygon.
The exploration starts with the edge at the index previousEdgeIndex + 1
.
Edge cases:
previousEdgeIndex == -2
, this method automatically fails and returns
-2
.
-2
.
-2
.
previousEdgeIndex + 1
.
previousEdgeIndex
refers to the previous edge.
previousEdgeIndex
- refers to the index of the previously found edge intersecting with
the line. To find the first intersecting edge, it should be set to -1
.pointOnLine
- a point located on the line. Not modified.lineDirection
- the direction of the line. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.-2
.java.lang.IndexOutOfBoundsException
- if previousEdgeIndex
is not in [-2,
numberOfVertices
[.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static int nextEdgeIndexIntersectingWithLine2D(int previousEdgeIndex, double pointOnLineX, double pointOnLineY, double lineDirectionX, double lineDirectionY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices)
WARNING: This method assumes that the given vertices already form a convex polygon.
The exploration starts with the edge at the index previousEdgeIndex + 1
.
Edge cases:
previousEdgeIndex == -2
, this method automatically fails and returns
-2
.
-2
.
-2
.
previousEdgeIndex + 1
.
previousEdgeIndex
refers to the previous edge.
previousEdgeIndex
- refers to the index of the previously found edge intersecting with
the line. To find the first intersecting edge, it should be set to -1
.pointOnLineX
- the x-coordinate of a point located on the line.pointOnLineY
- the y-coordinate of a point located on the line.lineDirectionX
- the x-component of the direction of the line.lineDirectionY
- the y-component of the direction of the line.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.-2
.java.lang.IndexOutOfBoundsException
- if previousEdgeIndex
is not in [-2,
numberOfVertices
[.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean orthogonalProjectionOnConvexPolygon2D(double pointToProjectX, double pointToProjectY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics projectionToPack)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
false
.
true
.
pointToProjectX
- the x-coordinate of the point to compute the projection of.pointToProjectY
- the y-coordinate of the point to compute the projection of.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.projectionToPack
- point in which the projection of the point onto the convex polygon is
stored. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean orthogonalProjectionOnConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointToProject, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered, us.ihmc.euclid.tuple2D.interfaces.Point2DBasics projectionToPack)
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
false
.
true
.
false
.
pointToProject
- the coordinate of the point to compute the projection of. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.projectionToPack
- point in which the projection of the point onto the convex polygon is
stored. Modified.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static us.ihmc.euclid.tuple2D.Point2D orthogonalProjectionOnConvexPolygon2D(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly pointToProject, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method generates garbage.
WARNING: This method assumes that the given vertices already form a convex polygon.
Edge cases:
null
.
null
.
pointToProject
- the coordinate of the point to compute the projection of. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.null
if the method failed.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean canObserverSeeEdge(int edgeIndex, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly observer, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method assumes that the given vertices already form a convex polygon.
The edge is defined by its start convexPolygon2D.get(edgeIndex)
and its end
convexPolygon2D.get(edgeIndex + 1)
.
edgeIndex
- the vertex index of the start of the edge.observer
- the coordinates of the observer. Not modified.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.true
if the observer can see the outside of the edge, false
if the
observer cannot see the outside or is lying on the edge.java.lang.IndexOutOfBoundsException
- if edgeIndex
is either negative or greater or equal
than numberOfVertices
.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.public static boolean canObserverSeeEdge(int edgeIndex, double observerX, double observerY, java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices, boolean clockwiseOrdered)
WARNING: This method assumes that the given vertices already form a convex polygon.
The edge is defined by its start convexPolygon2D.get(edgeIndex)
and its end
convexPolygon2D.get(edgeIndex + 1)
.
edgeIndex
- the vertex index of the start of the edge.observerX
- the x-coordinate of the observer.observerY
- the y-coordinate of the observer.convexPolygon2D
- the list containing in [0, numberOfVertices
[ the vertices of
the convex polygon. Not modified.numberOfVertices
- the number of vertices that belong to the convex polygon.clockwiseOrdered
- whether the vertices are clockwise or counter-clockwise ordered.true
if the observer can see the outside of the edge, false
if the
observer cannot see the outside or is lying on the edge.java.lang.IndexOutOfBoundsException
- if edgeIndex
is either negative or greater or equal
than numberOfVertices
.java.lang.IllegalArgumentException
- if numberOfVertices
is negative or greater than the
size of the given list of vertices.static void grahamScanAngleSort(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices, int numberOfVertices)
First the vertex located at the lowest x-coordinate is found and used as the reference P.
Then the vertices are sorted in increasing order of the angle they and the reference P make with the y-axis.
The Quicksort algorithm is adapted to the Graham scan application to prevent garbage generation.
vertices
- the list of vertices to be sorted. Modified.numberOfVertices
- specifies the number of relevant points in the list. The algorithm
will only process the points ∈ [0; numberOfVertices
[.private static void grahamScanAngleSortRecursive(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly minXMaxYVertex, int startIndex, int endIndex)
private static int grahamScanAnglePartition(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> list, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly minXMaxYVertex, int startIndex, int endIndex, int pivotIndex)
+------------------------+ | <= pivot | > pivot | +------------------------+ ^ | pivotIndex
static int grahamScanAngleCompare(us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly minXMaxYVertex, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly vertex1, us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly vertex2)
static <T> void moveElementToEnd(java.util.List<T> list, int indexOfElementToMove, int listSize)
indexOfElementToShift
to listSize - 1
and shifts
all the elements located in [indexToRemove + 1
; listSize - 1
] by -1
.list
- the list from which the element is to be moved. Modified.indexOfElementToMove
- the index of the element to move to the end of the list.listSize
- the actual size of the list with relevant information.static int findMinXMaxYVertexIndex(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> vertices, int numberOfVertices)
vertices
- the list of vertices to search in. Not modified.numberOfVertices
- the number of relevant vertices to search. This method searches in the
range [0
, numberOfVertices
].public static int findVertexIndex(Vertex2DSupplier vertex2DSupplier, boolean isXPriority, EuclidGeometryPolygonTools.Bound xBound, EuclidGeometryPolygonTools.Bound yBound)
vertex2DSupplier
- the vertex supplier containing vertices to be search through.isXPriority
- whether the search should focus first on finding the vertex with the "best"
x-coordinate, or y-coordinates.xBound
- the search criterion for the x-coordinate, for instance EuclidGeometryPolygonTools.Bound.MAX
while
result in searching the vertex with the lowest x value.yBound
- the search criterion for the Y-coordinate, for instance EuclidGeometryPolygonTools.Bound.MIN
while
result in searching the vertex with the highest y value.public static int wrap(int index, int listSize)
index
such that it is ∈ [0, listSize
[.
The index
remains unchanged if already ∈ [0, listSize
[.
Examples:
wrap(-1, 10)
returns 9.
wrap(10, 10)
returns 0.
wrap( 5, 10)
returns 5.
wrap(15, 10)
returns 5.
index
- the index to be wrapped if necessary.listSize
- the size of the list around which the index is to be wrapped.public static int next(int index, int listSize)
index
such that it is ∈ [0, listSize
[.
Examples:
next(-1, 10)
returns 0.
next(10, 10)
returns 1.
next( 5, 10)
returns 6.
next(15, 10)
returns 6.
index
- the index to be incremented and wrapped if necessary.listSize
- the size of the list around which the index is to be wrapped.public static int previous(int index, int listSize)
index
such that it is ∈ [0, listSize
[.
Examples:
next(-1, 10)
returns 10.
next(10, 10)
returns 9.
next( 5, 10)
returns 4.
next(15, 10)
returns 4.
index
- the index to be decremented and wrapped if necessary.listSize
- the size of the list around which the index is to be wrapped.private static void checkEdgeIndex(int edgeIndex, int numberOfVertices)
private static void checkNumberOfVertices(java.util.List<? extends us.ihmc.euclid.tuple2D.interfaces.Point2DReadOnly> convexPolygon2D, int numberOfVertices)


---
layout: minimal
title: "About me"
permalink: /about/index.html
description: "I do this: 📲"
---
Alex Takahashi
Software Engineer Silicon Valley
"If you double the number of experiments you do per year, you're going to double your inventiveness."
- Jeff Bezos
About Me
I am a software engineer with 5+ years of programming experience. Primarily,
my expertise is in iOS Engineer with 3+ years of experience exclusively in
Swift. Graduating from UC Berkeley in Spring 2017 with a B.S. in Bioengineering
and a Minor in Computer Science, I now pursue my passion for software full time!
I have a genuine curiosity to learn how things work. In a way, I like to
break things, and put them back together! Experimentation plays a crucial
role in how I approach my work and live my life. I have a learn-by-doing attitude
and always take a hands on approach to my work. Read below for my work history and more!
Education
🎓 UC Berkeley 2017: B.S. Bioengineering, Minor Computer Science
Technical Skills
Apple Technologies: iOS, tvOS, Xcode, TestFlight, Instruments
iOS Engineer: June 2017 - Present SCRUM Master: August 2018 - Present
Implemented UI components for the SAPFiori iOS SDK based off of the Fiori Design Guidelines. SDK Components are showcased in the SAP Fiori Mentor app which helps developers customize code through our application and instantly airdrop code snippets to projects.
Development Lead for the MapView Floorplan component utilizing UIKit and MapKit to deploy Fiori styled map applications.
Deployed weekly TestFlight builds to distribute our testing application to internal designers, customers, and stakeholders for quality assurance.
Lead an Agile engineering team of 8 members in daily SCRUM to meet a quarterly release schedule.
Onboarded and mentored new Junior Engineers to maintain uniform development standards and facilitate a smooth transition to production level code.
Pitch Competition Semifinalist - North America: February 2018 - July 2018
Pitched a startup idea to internal SAP investors to gain funding and resources for our potential revenue driving passion project
Startup aimed to help companies make better, faster decisions by utilizing predictive modeling based off of their digital footprint (Using Natrual Language Processing and Machine Learning off of their internal and external knowledge base).
Competed in the global, internal compeition and placed as a semifinalist in North America.
Redesigned Berkeley Mobile App to better cater to students as a one stop shop to Berkeley resources including Bear Transit Routes, Dining Hall Menus, and Library/Gym facility hours.
Modernize layout with CollectiveView embedded TableViewCells to make better use of screen realestate and for a better user experience.
Prototyped and refactored Objective-C UI Components to Swift 3
Honorable Mention: Hardware for Good: August 2016 - May 2017
Engineered a wearable Parkinson's tremor tracking device in order to monitor patient tremor frequency in response to prescribed medication. Tracking serves to reduce the time needed to find a stable medicine regimen and prevent medication side effects so patients can have a better quality of life.
Implemented a proof of concept using DuoSkin inspired wearable circuits, Arduino, and Python scripts to analyze mocked tremor activity.
Awarded Honroable Mention out of the 43 applicants in the Hardware for Good category.
Featured in the Jacobs Institute For Design Innovation Student Projects


title = "Place"
url = "/place/:slug"
layout = "octaskin"
is_hidden = 0
[viewBag]
localeUrl[en] = "/place"
[place]
slug = "{{ :slug }}"
[forumEmbedChannel]
embedCode = "{{ :slug }}"
topicSlug = "{{ :topicSlug }}"
channelSlug = "place-channels"
memberPage = "profile"
==
page->title = $this->place->name;
}
?>
==


... aims to be a swiss-army knife for contact management, but right now doesn't do very much.
Currently it can just take a submitted form POST w/ JSON contacts data and either export a vCard file (for OS X or whatever), and/or merge that submitted data into your Google Contacts (for use in GMail, Android, etc.). See the announcement blog post.
To submit data, use use this form or do a POST
to http://unmung.appspot.com/submit
with the following parameters:
group Optional group name to put contacts in. Not required. handle Some self-assigned handle for the data you're submitted. Pick something long and random. Must match regexp \w+
. This is used if the user isn't logged in and the submitted contacts need to be stashed away with a key for awhile, during the Google sign-in/OAuth/Authsub redirect dance.json Portable Contacts format like: { "entry":[ { "displayName": "Brad Fitzpatrick", "phoneNumbers": [ { "type": "Mobile", "value": "555-1212"}, { "type": "Home", "value": "555-1313"}, ], }, { "displayName": "Kevin Marks", "phoneNumbers": [ { "type": "Mobile", "value": "555-1414"}, { "type": "Home", "value": "555-1515"}, ], }, ] }(sorry, email addresses not supported yet: just names and numbers.)
Note:
Joseph Smarr brought to my attention that this should be using the Portable Contacts JSON format instead and I agree. It's a tiny change. I'll do that first free chance I get. Or patches welcome.done by Kevin Marks
When merging with your Google Contacts, it'll try to smartly merge into existing contacts if possible (matching on name, phone number), only creating new contacts as a last resort.
The source code to this whole app is available at:
http://github.com/kevinmarks/addressbooker/tree/master
Patches welcome!


Dr M: Anwar part of reshuffled Cabinet? ‘Everything is possible’
by Azril AnnuarPUTRAJAYA, Nov 23 — Tun Dr Mahathir Mohamad has not made his mind up yet on whether or not Datuk Seri Anwar Ibrahim will be part of his revamped Cabinet line-up.
He told a press conference today after a post mortem meeting with the Pakatan Harapan Presidential Council over their recent Tanjung Piai defeat that “everything is possible”.
“I haven’t made a decision yet (on Anwar). Everything is possible,” he said.
Touching on the sentiments of his current line up and whether or not they were unhappy with the reshuffle, Dr Mahathir said the ministers seem to have taken it stoically.
“Well, they are not against it. They didn’t say please don’t reshuffle me,” he said.


How did you hear about us?
Advertisement
Email Newsletter
FaceSpace
Other (please explain if you select)


Dear Sam:
Thank you for creating an online account with Social Security. You can sign in any time to
www.socialsecurity.gov/myaccount with your username, password, and the one time security code we will send you to access Social Security's online services.
We require you to choose how you want to receive your security code in order to use our online services. If you have not chosen how you want to receive your security code, follow the steps below:
1. Go to
www.socialsecurity.gov/myaccount
2. Select Sign In.
3. Enter your username and password.
4. Choose how you want to receive your security code.
5. Enter the required information.
6. We will send an 8-digit security code to you.
7. Enter the 8-digit security code. This 8-digit security code expires after 10 minutes and is only good for one use.
Each time you sign in to your online Social Security account at
www.socialsecurity.gov/myaccount we will send an 8-digit security code to you. You will enter that 8-digit security code as part of your sign in process. This 8-digit security code is only valid for 10 minutes. If you do not use it within 10 minutes, you must request another security code from the website. If applicable, text messaging charges may apply depending on your plan.
If you did not make this request, call us toll-free at 1-800-772-1213. We can answer specific questions from 7 a.m. to 7 p.m., Monday through Friday. Generally, you will have a shorter wait time if you call during the week after Tuesday. If you are deaf or hard of hearing, you may call our TTY number, 1-800-325-0778.
Social Security may use an Identity Services Provider to help verify your identity and protect your privacy when you register to do business with us online. When we verify your account, our Identity Services Provider may use information from your credit report to help confirm your identity. As a result, you may see a "soft inquiry" entry with the Identity Services Provider on your credit report. This entry shows that we made an inquiry at your request, and the date of that request. This soft inquiry will not appear on a credit report from any other provider.
Soft inquiries are not reported to lenders and do not affect your credit score. You do not incur any charges related to them. Soft inquiries appear only on a credit report issued to you and are generally removed from your credit report within 12 months.
Once you have registered for an online account, you will not create new soft inquiries when you sign in to access our services.
For more information about our Identity Services Provider, please visit
www.socialsecurity.gov/myaccount/verifyandprotectid.html online.
Please keep your information safe. Do not share your password with anyone.
Thank you for using the Social Security Administration's services at
www.socialsecurity.gov/myaccount online.
Please do not reply to this email, as we are unable to respond to messages sent to this address.


The safety-enhanced design (SED) criteria requires health IT developers to apply and test user centered design standards to their certified health IT. Developers follow NISTIR 7742 and submit results to ONC. SED testing requires participants who work in the health care field for which the product is intended to be used. The charts below describe the characteristics of the SED test participants for ONC certified health IT products.


gonf.go |
|
|---|---|
package gonf |
|
|
Loads a configuration file into a map[string]string of configuration key=value pairs. Delimiter is provided by you. :) Get it from here. Or use go get!
Import it
Point it at your configuration file with your chosen method of delineation and marvel at the wonder of a neatly organised map of your configuration variables.
Currently there is no support for loading the configuration values into their respective types, everything is a string at the moment. Original consideration was to let you specify if you wanted Gonf to panic, print, or fatal if the file could not be read/loaded etc but that seemed excessive for this iddy biddy package. You’re a big coder, I’m sure you can manage some proper error handling. :) |
import (
"errors"
"io/ioutil"
"strings"
) |
|
Loads a configuration from a file into a map[string]string. |
func GetGonf(fname, delim string) (map[string]string, error) { |
|
Get the file. |
conf, err := ioutil.ReadFile(fname) |
|
Check we haven’t had any io errors, escape immediately if anything is amiss. |
if err != nil {
return nil, err
} |
Avoid zero length config file.Be kind to our users and tell them what has happened. |
if len(conf) <= 0 {
return nil, errors.New("Zero length configuration file!")
} |
|
Create somewhere to keep out results |
config := make(map[string]string) |
|
Break out the file contents to parsing. |
lines := strings.Split(string(conf[:]), delim) |
Analyse what we have for some config…KISS principle is in full effect. |
for _, v := range lines { |
|
Ensure we ignore commented lines. |
if len(v) > 0 && v[:1] != "#" { |
|
Break out our respective values. |
line := retrieveKeyValuePair(v) |
|
Trim our final values so we don’t waste our time with gritty whitespace That stuff gets in your teeth, it’s horrible… |
config[strings.TrimSpace(line[0])] = strings.TrimSpace(line[1]) |
|
A moose might also have bit my sister.  Heh. That was close. |
return config, err
} |
|
Takes what is expected to be a key=value pair ‘line’ and ignores the comments and returns the split pair for input into our map |
func retrieveKeyValuePair(line string) []string { |
|
If our entry contains an inline comment |
if strings.Contains(line, "#") { |
|
Change our line value to be the substring prior to the start of the comment |
return strings.Split(line[:strings.Index(line, "#")], "=")
} |
|
If no comments were found then just hand it back. |
return strings.Split(strings.TrimSpace(line), "=")
}
|


WITNESS LIST Corrections Committee April 1, 2003-8:00A HB 1482 For: del Llano, Ann (ACLU of Texas) Iles, Leighton (Self and Fort Bend County CSCD) On: Bramblett, Mary Anne (Judicial Advisory Council) Creuzot, Judge John (Self) Registering, but not testifying: For: Deitch, Michelle (Self) Harrell, Will (ACLU, LULAC, NAACP) Simpson, Dee (AFSCME) HB 1514 Registering, but not testifying: For: De Luca, Stuart (TIFA, Inc.) Deitch, Michelle (Self) Iles, Leighton (Self and Fort Bend County CSCD) Smith, Bradley (Self) On: Bramblett, Mary Anne (Judicial Advisory Council) HB 2287 Against: Harrell, Will (ACLU) On: Creuzot, Judge John (Self) Registering, but not testifying: For: Noll, Chuck (Harris County District Attorney's Office) HB 2624 For: Harrell, Will (American Civil Liberties Union, LULAC, and NAACP) Iles, Leighton (Self and Fort Bend County CSCD) On: Bramblett, Mary Anne (Judicial Advisory Council) Creuzot, Judge John (Self) Fabelo, Tony (Criminal Justice Policy Council) Registering, but not testifying: For: De Luca, Stuart (TIFA, Inc.) Deitch, Michelle (Self) Simpson, Dee (AFSCME) HB 2624 Committee Substitute (CSHB 2624) For: Noll, Chuck (Harris County District Attorney's Office) HB 2668 For: del Llano, Ann (ACLU of Texas) De Luca, Stuart (TIFA, Inc.) Smith, Bradley (Self) Solomon, Emmitt (Restorative Justice Ministries Network) Valentine, David (First Baptist Church of Huntsville, Texas) Against: Frasier, Margo (Sheriffs' Association of Texas & Travis County Sheriff's Office) Noll, Chuck (Harris County District Attorney's Office) Richie, Boyd (Self) On: Creuzot, Judge John (Self) Edmonds, Shannon (TDCAA - TX. District and County Attorneys Assn.) Lee, Donald (Texas Conference of Urban Counties) Registering, but not testifying: For: Deitch, Michelle (Self) Simpson, Dee (AFSCME) On: Weizenbaum, Jon (Texas Commission on Alcohol and Drug Abuse) Budget Update On: Fabelo, Tony (Criminal Justice Policy Council)


Em português
1st of all
What is
Freedom?
Decision Making
Architectures,
Frameworks, Languages
Production Server for all!
Human Resource Officer
What do top programmers
really care about
when looking for a job?
"Developers want to be (...)
allowed to make decisions"
Joel Spolsky
50Thinkers 2011, 2013
Disclaimer
We are not talking about nice people
or benevolent entrepreneurs
We are talking about
productivity and recruitment
Both are talking about...
Autonomy
Independence
Freedom
Who works in a environment like that
?
What will the manager think?
They'll waste the day
on Facebook
They'll brush bits
instead of doing work
I'll lose track of
what is hapenning
How will I report
to my boss?
How to guarantee deadlines?
No one will be
responsible
(accountable?) for anything
They'll work 4h a day and leave
They won't know what to do!
Wait, wait!
Let's think them through!
They will spend the whole day at Facebook
... says the Manager
Assumption
"Workers will tend to do the amount of work that the
slowest among them does"
Scientific Management
"Scientific management
requires a high level of
managerial control over
employee work practices"
Scientific Management
You can't have a
transparent
workplace
You must
review/redo
everything
If this is your environment...
Assumption
"Workers will tend to do the amount of work that the slowest among them does"
Scientific Management
?
"Taylor (...) acknowledged that if each employee's compensation was linked to their output
their productivity would go up"
Scientific Management
"MIT studies show that,
as long as the task involved used only mechanical skills,
bonuses worked as expected"
Drive, Daniel Pink
"But once you get above
rudimentary congnitive skills
rewards don't work that way!"
Drive, Daniel Pink
People need money, but
most of us don't work for money
Our founders certainly didn't
Our companies inherited that
"Scientific management
requires a high level of
managerial control over
employee work practices"
Scientific Management
And that's
expensive!
Really expensive!

They will spend the whole day at Facebook?
BUSTED
We must
guarantee the deadlines
...says the manager
Assumption
Only managers can meet
deadlines
Taylor thought so too!
The higher one is at the hierarchy,
the more capable (s)he is!
If...
those who execute
aren't allowed to
estimate?
Or, even if they do! If...
there are no
consequences
Or yet, If...
they do it for the manager, not the client
Will freedom
hinder the ability
to meet deadlines?
If that is the case...
But...
is the assumption true?
Did the managers
you worked with
meet deadlines?
Chaos Report
The closer
the better
Let the team participate
Participation
==
power
+
accountability
Team makes the estimates
Notice: estimates, not deadlines!
De"let-go"tion
Team responsible
through happiness and sorrow
So... freedom hinders deadlines
BUSTED
Team will fire me
the first chance they get
...says the manager
Assumption
My job is at stake
Because I'm less necessary
Let's consider the assumption
Instinct
self-preservation
More freedom
=>
less control structures are needed
If managing
==
controlling
So... the manager job at risk
CONFIRMED
But...
Is the assumption true?
Can we get rid of the manager?
Management
is necessary
not micro-management
"Management is
too important to leave to the
managers"
Management 3.0
We do have
facilitators, coaches...
Not managers
No one misses
being told what to do
But they do miss
facilitators and coaches
So... the manager job is at risk
CONFIRMED
Every developer wants freedom!
...says everyone
Assumption
Freedom has only up sides
If...
people have never worked
under pressure
If...
people's works are independent
In real world...
people depend on each other's work
In real world...
Interns
Are cool with freedom
In real world...
Seasoned hires
struggle with freedom
Seasoned hires
require more coaching
We lost some good people
who couldn't handle freedom
So...
Every developer wants freedom!
BUSTED
Freedom raises productivity
therefore, I'll
deliver more value
...the Manager won't say
Assumption
I need an environment that promote criativity in order to deliver more value with inovation and technical excellence
If...
you don't have deadline, budget and technical constraints
If...
you have an
experienced team
If...
your client also has a senior team
We've had
problems with...
TAFT
Testing All the Fucking Time
Freedom raises productivity
therefore, I'll
deliver more value
BUSTED
Disclaimer
All opinions expressed
are based on the
speakers experiences
Not absolute truths
Disclaimer
Confirmed or busted
are context-sensitive
Giving freedom
requires some courage
and you'll face challenges
But...
it is still worth it!
Freedom in the workplace
walks hand in hand with
2
Transfering accountability
3
Management
decentralization
4
Letting go of
past behaviors


|
|
CIFXAnimationModifier Class ReferenceInheritance diagram for CIFXAnimationModifier:
List of all members.
|
Public Member Functions |
| U32 IFXAPI | AddRef (void) |
| U32 IFXAPI | Release (void) |
| IFXRESULT IFXAPI | QueryInterface (IFXREFIID riid, void **ppv) |
| void IFXAPI | GetEncoderX (IFXEncoderX *&rpEncoderX) |
| IFXRESULT IFXAPI | GetOutputs (IFXGUID **&rpOutOutputs, U32 &rOutNumberOfOutputs, U32 *&rpOutOutputDepAttrs) |
| IFXRESULT IFXAPI | GetDependencies (IFXGUID *pInOutputDID, IFXGUID **&pOutInputDependencies, U32 &uOutNumberInputDependencies, IFXGUID **&pOutOutputDependencies, U32 &uOutNumberOfOutputDependencies, U32 *&puOutDepAttrs) |
| IFXRESULT IFXAPI | GenerateOutput (U32 inOutputDataElementIndex, void *&rpOutData, BOOL &rNeedRelease) |
| IFXRESULT IFXAPI | SetDataPacket (IFXModifierDataPacket *pInInputDataPacket, IFXModifierDataPacket *pInDataPacket) |
| IFXRESULT IFXAPI | Notify (IFXModifierMessage eInMessage, void *pMessageContext) |
| void | Setup (void) |
| virtual IFXBonesManager *IFXAPI | GetBonesManagerNR (void) |
| void IFXAPI | SetAsKeyframe () |
| void IFXAPI | SetAsBones () |
| BOOL IFXAPI | IsKeyframe () |
Protected Member Functions |
| virtual IFXRESULT IFXAPI | SubmitEvent (bool startevent, const IFXString &rName, F32 localTime) |
Private Member Functions |
| | CIFXAnimationModifier (void) |
| virtual | ~CIFXAnimationModifier (void) |
| void | SetBonesManager (IFXBonesManager *pBonesManager) |
| IFXRESULT | InitBonesManager (void) |
Private Attributes |
| U32 | m_uRefCount |
| BOOL | m_bIsKeyframe |
| BOOL | m_bInitialized |
| U32 | m_uMeshGroupDataElementIndex |
| U32 | m_uSkeletonDataElementIndex |
| U32 | m_uBonesManagerDataElementIndex |
| U32 | m_uBoneWeightsDataElementIndex |
| U32 | m_uTransformDataElementIndex |
| U32 | m_uSimulationTimeDataElementIndex |
| U32 | m_uLastMeshGroupChangeCount |
| U32 | m_uBonesManagerChangeCount |
| U32 | m_uBoneWeightsChangeCount |
| IFXTransform | m_outputTransform |
| CIFXMotionResourceManager | m_motionManager |
| IFXBonesManager * | m_pBonesManager |
| IFXCharacter * | m_pCharacter |
| IFXMeshGroup * | m_pOutputMeshGroup |
| IFXSkeletonDataElement * | m_pSkeletonOutputElement |
| IFXArray< IFXMatrix4x4 > | m_RootTransform |
Friends |
| IFXRESULT IFXAPI_CALLTYPE | CIFXAnimationModifier_Factory (IFXREFIID iid, void **ppv) |
Classes |
| class | CIFXMotionResourceManager |
Constructor & Destructor Documentation
| CIFXAnimationModifier::CIFXAnimationModifier |
( |
void |
|
) |
[private] |
|
|
|
- Warning:
- All this seem to assume a single bonesmanager for non-keyframe. This won't work for shallow cloning.
|
| CIFXAnimationModifier::~CIFXAnimationModifier |
( |
void |
|
) |
[private, virtual] |
|
Member Function Documentation
| U32 CIFXAnimationModifier::AddRef |
( |
void |
|
) |
[virtual] |
|
|
|
This method increments the reference count for an interface on a component.
- Note:
- It should be called for every new copy of a pointer to an interface on a given component.
- Returns:
- It returns a U32 that contains a value from 1 to 2^32 - 1 that defines the new reference count. The return value should only be used for debugging purposes.
Implements IFXUnknown. |
| IFXRESULT CIFXAnimationModifier::GenerateOutput |
( |
U32 |
inOutputDataElementIndex, |
|
|
void *& |
rpOutData, |
|
|
BOOL & |
rNeedRelease |
|
) |
[virtual] |
|
|
|
Generate a result from the input DataPacket.
- Parameters:
-
| inDataElementIndex | The index of the DataElement. |
| rpOutData | The pointer to the output DataElement interface. |
- Returns:
- Upon success, IFX_OK is returned or IFX_W_MODIFIER_OUTPUT_NOT_CHANGED if the specified output DataElement did not change. Otherwise, one of the following failures are returned: IFX_E_INVALID_ENTRY if the specified DataElement does not exist; or IFX_E_NOT_INITIALIZED if the Modifier, ModifierDataPacket, and/or the ModifierChain was not initialized properly.
Implements CIFXModifier. |
| IFXBonesManager * CIFXAnimationModifier::GetBonesManagerNR |
( |
void |
|
) |
[virtual] |
|
|
|
Returns a pointer to the associated BonesManager without affecting its reference count (for immediate use only).
Implements IFXAnimationModifier. |
| IFXRESULT CIFXAnimationModifier::GetDependencies |
( |
IFXGUID * |
pInOutputDID, |
|
|
IFXGUID **& |
pOutInputDependencies, |
|
|
U32 & |
uOutNumberInputDependencies, |
|
|
IFXGUID **& |
pOutOutputDependencies, |
|
|
U32 & |
uOutNumberOfOutputDependencies, |
|
|
U32 *& |
puOutDepAttrs |
|
) |
[virtual] |
|
|
|
Hands back the list of input DataElements and the list of output DataElements, by which, the result of the specified pInOutputDID is determined.
- Parameters:
-
| pInOutputDID | One of the Modifier's output DIDs in the list handed back from GetOutputs(). |
| rppOutInputDependencies | The pointer to contain the address of the list of input DIDs, by which, the specified output is determined. |
| rOutNumberInputDependencies | The U32 to contain the number of GUIDs in rppOutInputDependencies. |
| rppOutOutputDependencies | The pointer to contain the address of the list related output DIDs. |
| ruOutNumberOfOutputDependencies | The U32 to contain the number of GUIDs in rppOutOutputDependencies. |
- Returns:
- Upon success, IFX_OK is returned.
- Note:
- The Modifier is responsible for the lifetime of the list.
Implements CIFXModifier. |
| void CIFXAnimationModifier::GetEncoderX |
( |
IFXEncoderX *& |
rpEncoderX |
) |
[virtual] |
|
|
|
Function that hands back the IFXEncoderX interface pointer to a component that can be used to encode this component.
- Parameters:
-
| rpEncoderX | Reference to the encoder's interface pointer that will be set to a valid value upon success. |
Implements IFXMarkerX. |
| IFXRESULT CIFXAnimationModifier::GetOutputs |
( |
IFXGUID **& |
rpOutOutputs, |
|
|
U32 & |
rOutNumberOfOutputs, |
|
|
U32 *& |
rpOutOutputDepAttrs |
|
) |
[virtual] |
|
|
|
Hands back a pointer to the list of DIDs that the Modifier will add or change.
- Parameters:
-
| rpOutOutputs | The pointer to contain the address of the consecutive list of resultant DataElement GUID pointers. |
| rOutNumberOfOutputs | The U32 to contain the number of GUIDs in the rpOutOutputs. |
| rpOutUnchangedOutputAttrs | The array of U32 attributes which were not changed. |
- Returns:
- Upon success, IFX_OK is returned. Otherwise, one of the following failures are returned: IFX_E_OUT_OF_MEMORY.
- Note:
- This method can be used before, and after, the Modifier is initialized.
The Modifier is responsible for the lifetime of the list.
Implements CIFXModifier. |
| IFXRESULT CIFXAnimationModifier::InitBonesManager |
( |
void |
|
) |
[private] |
|
| BOOL CIFXAnimationModifier::IsKeyframe |
( |
|
) |
[virtual] |
|
| IFXRESULT CIFXAnimationModifier::Notify |
( |
IFXModifierMessage |
eInMessage, |
|
|
void * |
pMessageContext |
|
) |
[virtual] |
|
| IFXRESULT CIFXAnimationModifier::QueryInterface |
( |
IFXREFIID |
riid, |
|
|
void ** |
ppv |
|
) |
[virtual] |
|
|
|
This method provides access to the various interfaces supported by a component.
Upon success, it increments the component's reference count and hands back a pointer to the specified interface.
- Note:
- A number of rules must be adhered to by all implementations of IFXAPI QueryInterface . For a list of such rules, refer to the IFXCOM usage guidelines.
- Returns:
- Upon success, IFX_OK is returned. Otherwise, either IFX_E_INVALID_POINTER or IFX_E_UNSUPPORTED are returned.
Implements IFXUnknown. |
| U32 CIFXAnimationModifier::Release |
( |
void |
|
) |
[virtual] |
|
|
|
This method decrements the reference count for the calling interface on a component.
- Note:
- If the reference count on a component falls to zero, the component is destroyed.
- Returns:
- It returns a U32 that contains a value from 1 to 2^32 - 1 that defines the new reference count. The return value should only be used for debugging purposes.
Implements IFXUnknown. |
| void CIFXAnimationModifier::SetAsBones |
( |
|
) |
[virtual] |
|
|
|
Inits instance as bones player.
Default value. Can be initialized only once. Must be initialized right after creation.
Implements IFXAnimationModifier. |
| void CIFXAnimationModifier::SetAsKeyframe |
( |
|
) |
[virtual] |
|
|
|
Inits instance as keyframe player.
Can be initialized only once. Must be initialized right after creation.
Implements IFXAnimationModifier. |
| void CIFXAnimationModifier::SetBonesManager |
( |
IFXBonesManager * |
pBonesManager |
) |
[private] |
|
|
|
Associates a new DataPacket with the Modifier.
- Precondition:
- None.
- Postcondition:
- The provided DataPacket is associated with the Modifier. If the Modifier was already associated with a DataPacket, it is first released.
- Parameters:
-
| pInDataPacket | The incoming IFXDataPacket That will provide input to the modifier chain. |
| pInDataPacket | The incoming IFXDataPacket to be associated with the Modifier. |
- Returns:
- Upon success, IFX_OK is returned. Otherwise, one of the following failures are returned: IFX_E_OUT_OF_MEMORY.
Implements CIFXModifier. |
| void CIFXAnimationModifier::Setup |
( |
void |
|
) |
|
|
| IFXRESULT CIFXAnimationModifier::SubmitEvent |
( |
bool |
startevent, |
|
|
const IFXString & |
rName, |
|
|
F32 |
localTime |
|
) |
[protected, virtual] |
|
Friends And Related Function Documentation
| IFXRESULT IFXAPI_CALLTYPE CIFXAnimationModifier_Factory |
( |
IFXREFIID |
iid, |
|
|
void ** |
ppv |
|
) |
[friend] |
|
Member Data Documentation
© 1999 - 2006 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.
|
|