public class IVec2 extends IParameterObject implements IVec2I, IEntityParameter
Modifier and Type | Field and Description |
---|---|
double |
x |
static IVec2 |
xaxis |
double |
y |
static IVec2 |
yaxis |
parent
Constructor and Description |
---|
IVec2() |
IVec2(double x,
double y) |
IVec2(IDoubleI x,
IDoubleI y) |
IVec2(IServerI s) |
IVec2(IServerI s,
double x,
double y) |
IVec2(IServerI s,
IDoubleI x,
IDoubleI y) |
IVec2(IServerI s,
IVec2 v) |
IVec2(IServerI s,
IVec2I v) |
IVec2(IServerI s,
IVecI v) |
IVec2(IServerI s,
IVecI v,
IVecI projectionDir) |
IVec2(IServerI s,
IVecI v,
IVecI xaxis,
IVecI yaxis) |
IVec2(IServerI s,
IVecI v,
IVecI xaxis,
IVecI yaxis,
IVecI origin) |
IVec2(IVec2 v) |
IVec2(IVec2I v) |
IVec2(IVecI v) |
IVec2(IVecI v,
IVecI projectionDir) |
IVec2(IVecI v,
IVecI xaxis,
IVecI yaxis) |
IVec2(IVecI v,
IVecI xaxis,
IVecI yaxis,
IVecI origin) |
Modifier and Type | Method and Description |
---|---|
IVec2 |
add(double x,
double y) |
IVec2 |
add(double f,
IVec2 v)
scale add; alias
|
IVec2 |
add(double f,
IVec2I v)
scale add; alias
|
IVec2 |
add(IDoubleI x,
IDoubleI y) |
IVec2 |
add(IDoubleI f,
IVec2I v)
scale add; alias
|
IVec2 |
add(IVec2 v) |
IVec2 |
add(IVec2 v,
double f)
scale add
|
IVec2 |
add(IVec2I v) |
IVec2 |
add(IVec2I v,
double f)
scale add
|
IVec2 |
add(IVec2I v,
IDoubleI f)
scale add
|
double |
angle(double vx,
double vy)
angle between two vectors
|
double |
angle(ISwitchE e,
IVec2I v)
angle between two vectors
|
IDouble |
angle(ISwitchR r,
IVec2I v)
angle between two vectors
|
double |
angle(IVec2 v) |
double |
angle(IVec2I v)
angle between two vectors
|
static double |
area(IVec2[] pts) |
IVec2 |
bisect(double vx,
double vy)
create a new instance of bisector
|
IVec2 |
bisect(IVec2 v)
create a new instance of bisector
|
IVec2 |
bisect(IVec2I v)
create a new instance of bisector
|
static boolean |
clockwise(IVec2[] pts)
Check if polyline loop defined by the point array is clockwise or not.
|
static boolean |
counterclockwise(IVec2[] pts)
Check if polyline loop defined by the point array is counterclockwise or not.
|
IVec2 |
cp()
cp() is alias of dup()
|
IVec2 |
cp(double x,
double y)
cp() is alias of dup().add()
|
IVec2 |
cp(IDoubleI x,
IDoubleI y)
cp() is alias of dup().add()
|
IVec2 |
cp(IVec2 v)
cp() is alias of dup().add()
|
IVec2 |
cp(IVec2I v)
cp() is alias of dup().add()
|
IVec |
cross(double vx,
double vy)
cross product in z direction as IVec
|
IVec |
cross(IVec2 v)
cross product in z direction as IVec
|
IVec |
cross(IVec2I v)
cross product in z direction as IVec
|
IVec2 |
dif(double vx,
double vy)
create a new instance of difference
|
IVec2 |
dif(IVec2 v)
create a new instance of difference
|
IVec2 |
dif(IVec2I v)
create a new instance of difference
|
IVec2 |
diff(double vx,
double vy)
alias of dif
|
IVec2 |
diff(IVec2 v)
alias of dif
|
IVec2 |
diff(IVec2I v)
alias of dif
|
double |
dist(double vx,
double vy)
distance of two vectors
|
double |
dist(ISwitchE e,
IVec2I v)
distance of two vectors
|
IDouble |
dist(ISwitchR r,
IVec2I v)
distance of two vectors
|
double |
dist(IVec2 v)
distance of two vectors
|
double |
dist(IVec2I v)
distance of two vectors
|
double |
dist2(double vx,
double vy)
squared distance of two vectors
|
double |
dist2(ISwitchE e,
IVec2I v)
squared distance of two vectors
|
IDouble |
dist2(ISwitchR r,
IVec2I v)
squared distance of two vectors
|
double |
dist2(IVec2 v)
squared distance of two vectors
|
double |
dist2(IVec2I v)
squared distance of two vectors
|
double |
distToLine(IVec2I lineDir)
distance to a line dir
|
double |
distToLine(IVec2I lineDir,
IVec2I linePt)
distance to an infinite line
|
double |
distToLine(IVec2 pt1,
IVec2 pt2)
distance to an infinite line
issue: there is another distToLine(IVecI lineDir,IVecI linePt) method
|
double |
distToSegment(IVec2I linePt1,
IVec2I linePt2)
distance to a line segment
|
double |
distToTriangle(IVec2I pt1,
IVec2I pt2,
IVec2I pt3)
distance to a triangle
|
IVec2 |
div(double x) |
IVec2 |
div(IDouble v) |
IVec2 |
div(IDoubleI v) |
double |
dot(double vx,
double vy)
dot product
|
double |
dot(ISwitchE e,
IVec2I v)
dot product
|
IDouble |
dot(ISwitchR r,
IVec2I v)
dot product
|
double |
dot(IVec2 v)
dot product
|
double |
dot(IVec2I v)
dot product
|
IVec2 |
dup() |
boolean |
eq(double vx,
double vy)
whether location is same or not
|
boolean |
eq(double vx,
double vy,
double tolerance)
whether location is same or not within tolerance
|
boolean |
eq(ISwitchE e,
IVec2I v)
whether location is same or not
|
boolean |
eq(ISwitchE e,
IVec2I v,
double tolerance)
whether location is same or not within tolerance
|
IBool |
eq(ISwitchR r,
IVec2I v)
whether location is same or not
|
IBool |
eq(ISwitchR r,
IVec2I v,
IDoubleI tolerance)
whether location is same or not within tolerance
|
boolean |
eq(IVec2 v)
whether location is same or not
|
boolean |
eq(IVec2 v,
double tolerance)
whether location is same or not within tolerance
|
boolean |
eq(IVec2I v)
whether location is same or not
|
boolean |
eq(IVec2I v,
double tolerance)
whether location is same or not within tolerance
|
boolean |
eqX(double vx)
check if same in X
|
boolean |
eqX(double vx,
double tolerance)
check if same in X within tolerance
|
boolean |
eqX(ISwitchE e,
IVec2I v)
check if same in X
|
boolean |
eqX(ISwitchE e,
IVec2I v,
double tolerance)
check if same in X within tolerance
|
IBool |
eqX(ISwitchR r,
IVec2I v)
check if same in X
|
IBool |
eqX(ISwitchR r,
IVec2I v,
IDoubleI tolerance)
check if same in X within tolerance
|
boolean |
eqX(IVec2 v)
check if same in X
|
boolean |
eqX(IVec2 v,
double tolerance)
check if same in X within tolerance
|
boolean |
eqX(IVec2I v)
check if same in X
|
boolean |
eqX(IVec2I v,
double tolerance)
check if same in X within tolerance
|
boolean |
eqY(double vy)
check if same in Y
|
boolean |
eqY(double vy,
double tolerance)
check if same in Y within tolerance
|
boolean |
eqY(ISwitchE e,
IVec2I v)
check if same in Y
|
boolean |
eqY(ISwitchE e,
IVec2I v,
double tolerance)
check if same in Y within tolerance
|
IBool |
eqY(ISwitchR r,
IVec2I v)
check if same in Y
|
IBool |
eqY(ISwitchR r,
IVec2I v,
IDoubleI tolerance)
check if same in Y within tolerance
|
boolean |
eqY(IVec2 v)
check if same in Y
|
boolean |
eqY(IVec2 v,
double tolerance)
check if same in Y within tolerance
|
boolean |
eqY(IVec2I v)
check if same in Y
|
boolean |
eqY(IVec2I v,
double tolerance)
check if same in Y within tolerance
|
IVec2 |
flip()
alias of neg
|
IVec2 |
get() |
IDouble |
getX() |
IDouble |
getY() |
static IVec2 |
intersect(IVec2I pt1,
IVec2I dir1,
IVec2I pt2,
IVec2I dir2)
intersection of two infinite lines
|
static IVec2[] |
intersectLineAndCircle(IVec2I linePt,
IVec2I lineDir,
IVec2I circleCenter,
double radius)
intersection of an infinite line and a circle
|
static IVec2 |
intersectPolygon(IVec2I p1,
IVec2I p2,
IVec2I[] pts) |
static IVec2 |
intersectPolyline(IVec2I p1,
IVec2I p2,
IVec2I[] pts) |
static IVec2 |
intersectPolyline(IVec2I p1,
IVec2I p2,
IVec2I[] pts,
boolean closed) |
static IVec2 |
intersectSegment(IVec2I line1pt1,
IVec2I line1pt2,
IVec2I line2pt1,
IVec2I line2pt2) |
static IVec2 |
intersectSegmentAndXLine(IVec2I linePt1,
IVec2I linePt2,
double y) |
static IVec2 |
intersectSegmentAndYLine(IVec2I linePt1,
IVec2I linePt2,
double x) |
static IVec2 |
intersectXLine(IVec2 linePt,
IVec2 lineDir,
double yOfXLine) |
static IVec2 |
intersectYLine(IVec2 linePt,
IVec2 lineDir,
double xOfYLine) |
boolean |
isBetween(IVec2I pt1,
IVec2I pt2) |
boolean |
isInside(IVec2[] pts)
determine if the point is insde the polygon defined by the argument
true if the point is on the edge of polygon
|
boolean |
isInside(IVec2I[] pts)
determine if the point is insde the polygon defined by the argument
|
boolean |
isOnLine(IVec2 pt1,
IVec2 pt2) |
boolean |
isOnSegment(IVec2I pt1,
IVec2I pt2) |
boolean |
isParallel(IVec2I v)
check if two vectors are parallel
|
boolean |
isParallel(IVec2I v,
double angleReso)
check if two vectors are parallel
|
boolean |
isStraight(IVec2I v1,
IVec2I v2)
check if three locations are on straight line
|
boolean |
isStraight(IVec2I v1,
IVec2I v2,
double angleReso)
check if three locations are on straight line
|
boolean |
isValid()
checking x, y is valid number (not Infinite, nor NaN).
|
double |
len()
getting length
|
IVec2 |
len(double l)
setting length
|
IVec2 |
len(IDoubleI l)
setting length
|
double |
len(ISwitchE e)
getting length
|
IDouble |
len(ISwitchR r)
getting length
|
double |
len2()
return squared length of the vector in double
|
double |
len2(ISwitchE e)
return squared length of the vector in double
|
IDouble |
len2(ISwitchR r)
return squared length of the vector in double
|
static boolean |
loopdir(IVec2[] pts)
true if polyline loop defined by the point array is counter-clockwise.
|
IVec2 |
mid(double vx,
double vy)
create a new instance of midpoint
|
IVec2 |
mid(IVec2 v)
create a new instance of midpoint
|
IVec2 |
mid(IVec2I v)
create a new instance of midpoint
|
IVec2 |
mirror(double lineX,
double lineY)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
mirror(double linePtX,
double linePtY,
double lineDirX,
double lineDirY)
reflect (mirror) 2 dimensionally to the other side of the line at line point
|
IVec2 |
mirror(IVec2 lineDir)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
mirror(IVec2I lineDir)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
mirror(IVec2I linePt,
IVec2I lineDir)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
mirror(IVec2 linePt,
IVec2 lineDir)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
mul(double x) |
IVec2 |
mul(IDouble v) |
IVec2 |
mul(IDoubleI v) |
IVec2 |
mv(double x,
double y)
mv() is alias of add()
|
IVec2 |
mv(IDoubleI x,
IDoubleI y)
mv() is alias of add()
|
IVec2 |
mv(IVec2 v)
mv() is alias of add()
|
IVec2 |
mv(IVec2I v)
mv() is alias of add()
|
IVec2 |
neg() |
IVecI |
nml(double vx,
double vy)
alias of cross
|
IVecI |
nml(double vx1,
double vy1,
double vx2,
double vy2)
create normal vector from 3 points of self, pt1 and pt2
|
IVec |
nml(IVec2 v)
alias of cross
|
static IVec |
nml(IVec2[] pts)
normal vector of polyline loop defined by input points.
|
IVec |
nml(IVec2I v)
alias of cross
|
IVecI |
nml(IVec2I pt1,
IVec2I pt2)
create normal vector from 3 points of self, pt1 and pt2
|
IVecI |
nml(IVec2 pt1,
IVec2 pt2)
create normal vector from 3 points of self, pt1 and pt2
|
IVec2 |
ortho()
rotate vector in Pi/2
|
IVec2 |
perpendicularVecToLine(IVec2I lineDir)
create a new vector from line to this point perpendicular to the line dir
|
IVec2 |
perpendicularVecToLine(IVec2I lineDir,
IVec2I linePt)
create a new vector from this point to the line in parpendicular direction.
|
double[] |
projectTo2Vec(IVec2I v1,
IVec2I v2)
project the vector to the plane defined by two input vector and decompose vector to two vector and another perpendicular vector and returns coefficient of them.
|
double |
ratioOnSegment(IVec2I linePt1,
IVec2I linePt2)
ratio of projected point between two points (line segment).
|
IVec2 |
ref(double lineX,
double lineY)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
ref(double linePtX,
double linePtY,
double lineDirX,
double lineDirY)
reflect (mirror) 2 dimensionally to the other side of the line at line point
|
IVec2 |
ref(IVec2 lineDir)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
ref(IVec2I lineDir)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
ref(IVec2I linePt,
IVec2I lineDir)
reflect (mirror) 2 dimensionally to the other side of the line
|
IVec2 |
ref(IVec2 linePt,
IVec2 lineDir)
reflect (mirror) 2 dimensionally to the other side of the line
|
static IVec2I[] |
removeDuplicatedPoints(IVec2I[] pts,
boolean closed) |
static IVec2I[] |
removeStraightPoints(IVec2I[] pts,
boolean closed)
remove points which are on straight line of adjacents
|
IVec2 |
rev()
alias of neg
|
IVec2 |
rot(double angle)
rotate
|
IVec2 |
rot(double centerX,
double centerY,
double angle)
rotate around center
|
IVec2 |
rot(IDoubleI angle)
rotate
|
IVec2 |
rot(IVec2 destDir)
rotate towards destination direction
|
IVec2 |
rot(IVec2 center,
double angle)
rotate around center
|
IVec2 |
rot(IVec2I destDir)
rotate towards destination direction
|
IVec2 |
rot(IVec2I center,
double angle)
rotate around center
|
IVec2 |
rot(IVec2I center,
IDoubleI angle)
rotate around center
|
IVec2 |
rot(IVec2I center,
IVec2I destPt)
rotate around center towards destination point
|
IVec2 |
rot(IVec2 center,
IVec2 destPt)
rotate around center towards destination point
|
IVec2 |
scale(double f)
alias of mul
|
IVec2 |
scale(double centerX,
double centerY,
double f)
scale around center
|
IVec2 |
scale(IDoubleI f)
alias of mul
|
IVec2 |
scale(IVec2 center,
double f)
scale around center
|
IVec2 |
scale(IVec2I center,
double f)
scale around center
|
IVec2 |
scale(IVec2I center,
IDoubleI f)
scale around center
|
IVec2 |
scale1d(double axisX,
double axisY,
double f)
scale only in 1 direction
|
IVec2 |
scale1d(double centerX,
double centerY,
double axisX,
double axisY,
double f)
scale only in 1 direction from a center
|
IVec2 |
scale1d(IVec2 axis,
double f)
scale only in 1 direction
|
IVec2 |
scale1d(IVec2I axis,
double f)
scale only in 1 direction
|
IVec2 |
scale1d(IVec2I axis,
IDoubleI f)
scale only in 1 direction
|
IVec2 |
scale1d(IVec2I center,
IVec2I axis,
double f)
scale only in 1 direction from a center
|
IVec2 |
scale1d(IVec2I center,
IVec2I axis,
IDoubleI f)
scale only in 1 direction from a center
|
IVec2 |
scale1d(IVec2 center,
IVec2 axis,
double f)
scale only in 1 direction from a center
|
IVec2 |
set(double x,
double y) |
IVec2 |
set(IDoubleI x,
IDoubleI y) |
IVec2 |
set(IVec2 v) |
IVec2 |
set(IVec2I v) |
IVec2 |
set(IVecI v) |
IVec2 |
set(IVecI v,
IVecI projectionDir) |
IVec2 |
set(IVecI v,
IVecI xaxis,
IVecI yaxis) |
IVec2 |
set(IVecI v,
IVecI xaxis,
IVecI yaxis,
IVecI origin) |
IVec2 |
shear(double sxy,
double syx)
shear operation on XY
|
IVec2 |
shear(IDoubleI sxy,
IDoubleI syx)
shear operation on XY
|
IVec2 |
shear(IVec2I center,
double sxy,
double syx)
shear operation on XY
|
IVec2 |
shear(IVec2I center,
IDoubleI sxy,
IDoubleI syx)
shear operation on XY
|
static double |
signedArea(IVec2[] pts)
Calculate area of the polyline loop defined by the input points.
|
IVec2 |
sub(double x,
double y) |
IVec2 |
sub(IDoubleI x,
IDoubleI y) |
IVec2 |
sub(IVec2 v) |
IVec2 |
sub(IVec2I v) |
IVec2 |
sum(double vx,
double vy)
create a new instance of summation
|
IVec2 |
sum(IVec2 v)
create a new instance of summation
|
IVec2 |
sum(IVec2 v2,
double w2)
create a new instance of weighted sum
|
IVec2 |
sum(IVec2 v2,
double w1,
double w2)
create a new instance of weighted sum
|
IVec2 |
sum(IVec2I... v)
create a new instance of summation
|
IVec2 |
sum(IVec2I v)
create a new instance of summation
|
IVec2 |
sum(IVec2I v2,
double w2)
create a new instance of weighted sum
|
IVec2 |
sum(IVec2I v2,
double w1,
double w2)
create a new instance of weighted sum
|
IVec2 |
sum(IVec2I v2,
IDoubleI w2)
create a new instance of weighted sum
|
IVec2 |
sum(IVec2I v2,
IDoubleI w1,
IDoubleI w2)
create a new instance of weighted sum
|
IVec |
to3d() |
IVec |
to3d(double z) |
IVec |
to3d(IDoubleI z) |
IVec4 |
to4d() |
IVec4 |
to4d(double z,
double w) |
IVec4 |
to4d(IDoubleI z,
IDoubleI w) |
java.lang.String |
toString() |
IVec2 |
transform(IMatrix2I mat)
transform with 2x2 transform matrix
|
IVec2 |
transform(IMatrix3I mat)
transform with 3x3 transform matrix
|
IVec2 |
transform(IVec2I xvec,
IVec2I yvec)
transform with transform vectors
|
IVec2 |
transform(IVec2I xvec,
IVec2I yvec,
IVec2I translate)
transform with transform vectors
|
IVec2 |
transform(IVec2 xvec,
IVec2 yvec)
transform with transform vectors
|
IVec2 |
transform(IVec2 xvec,
IVec2 yvec,
IVec2 translate)
transform with transform vectors
|
IVec2 |
translate(double x,
double y)
alias of add()
|
IVec2 |
translate(IDoubleI x,
IDoubleI y)
alias of add()
|
IVec2 |
translate(IVec2 v)
alias of add()
|
IVec2 |
translate(IVec2I v)
alias of add()
|
IVec2 |
unit()
unitize (normalize) vector
|
double |
x() |
IVec2 |
x(double vx)
setting x component
|
IVec2 |
x(IDoubleI vx)
setting x component
|
double |
x(ISwitchE e)
getting x component
|
IDouble |
x(ISwitchR r)
getting x component
|
double |
y() |
IVec2 |
y(double vy)
setting y component
|
IVec2 |
y(IDoubleI vy)
setting y component
|
double |
y(ISwitchE e)
getting y component
|
IDouble |
y(ISwitchR r)
getting y component
|
IVec2 |
zero()
setting all zero
|
createObject, parent, parent
public static IVec2 xaxis
public static IVec2 yaxis
public double x
public double y
public IVec2()
public IVec2(double x, double y)
public IVec2(IVec2 v)
public IVec2(IVec2I v)
public IVec2(IVecI v)
public IVec2(IServerI s)
public IVec2(IServerI s, double x, double y)
public IVec2 get()
public IVec2 dup()
public IVec2 zero()
public double dot(IVec2 v)
public IVec cross(double vx, double vy)
public double len()
IVec2I
public double len2()
public double len2(ISwitchE e)
public double dist(IVec2 v)
public double dist(double vx, double vy)
public double dist2(IVec2 v)
public double dist2(double vx, double vy)
public double dist2(IVec2I v)
public boolean eq(IVec2 v)
public boolean eq(double vx, double vy)
public boolean eq(IVec2 v, double tolerance)
public boolean eq(double vx, double vy, double tolerance)
public boolean eq(IVec2I v, double tolerance)
public boolean eq(ISwitchE e, IVec2I v, double tolerance)
public IBool eq(ISwitchR r, IVec2I v, IDoubleI tolerance)
public boolean eqX(IVec2 v)
public boolean eqY(IVec2 v)
public boolean eqX(IVec2 v, double tolerance)
public boolean eqY(IVec2 v, double tolerance)
public boolean eqX(double vx, double tolerance)
public boolean eqY(double vy, double tolerance)
public boolean eqX(IVec2I v, double tolerance)
public boolean eqY(IVec2I v, double tolerance)
public double angle(IVec2 v)
public double angle(double vx, double vy)
IVec2I
public double angle(IVec2I v)
IVec2I
public double angle(ISwitchE e, IVec2I v)
IVec2I
public IDouble angle(ISwitchR r, IVec2I v)
IVec2I
public IVec2 rot(double centerX, double centerY, double angle)
public IVec2 scale(double centerX, double centerY, double f)
public IVec2 scale1d(double axisX, double axisY, double f)
public IVec2 scale1d(IVec2 center, IVec2 axis, double f)
public IVec2 scale1d(IVec2I center, IVec2I axis, double f)
public IVec2 scale1d(IVec2I center, IVec2I axis, IDoubleI f)
public IVec2 scale1d(double centerX, double centerY, double axisX, double axisY, double f)
public IVec2 ref(IVec2 lineDir)
lineDir
- direction of reflection linepublic IVec2 ref(double lineX, double lineY)
public IVec2 ref(IVec2 linePt, IVec2 lineDir)
linePt
- start point of reflection linelineDir
- direction of reflection linepublic IVec2 ref(double linePtX, double linePtY, double lineDirX, double lineDirY)
public IVec2 ref(IVec2I linePt, IVec2I lineDir)
public IVec2 mirror(IVec2 lineDir)
lineDir
- direction of reflection linepublic IVec2 mirror(double lineX, double lineY)
public IVec2 mirror(IVec2I lineDir)
public IVec2 mirror(IVec2 linePt, IVec2 lineDir)
linePt
- start point of reflection linelineDir
- direction of reflection linepublic IVec2 mirror(double linePtX, double linePtY, double lineDirX, double lineDirY)
public IVec2 mirror(IVec2I linePt, IVec2I lineDir)
public IVec2 shear(double sxy, double syx)
public IVec2 translate(double x, double y)
public IVec2 transform(IVec2 xvec, IVec2 yvec, IVec2 translate)
public IVec2 transform(IVec2I xvec, IVec2I yvec, IVec2I translate)
public IVec2 cp()
public IVec2 cp(double x, double y)
public IVec2 dif(double vx, double vy)
public IVec2 mid(double vx, double vy)
public IVec2 sum(double vx, double vy)
public IVec2 bisect(double vx, double vy)
public IVecI nml(double vx1, double vy1, double vx2, double vy2)
public IVecI nml(IVec2I pt1, IVec2I pt2)
public boolean isParallel(IVec2I v)
public boolean isParallel(IVec2I v, double angleReso)
public boolean isStraight(IVec2I v1, IVec2I v2)
public boolean isStraight(IVec2I v1, IVec2I v2, double angleReso)
public static IVec2 intersect(IVec2I pt1, IVec2I dir1, IVec2I pt2, IVec2I dir2)
public static IVec2 intersectSegment(IVec2I line1pt1, IVec2I line1pt2, IVec2I line2pt1, IVec2I line2pt2)
public static IVec2 intersectPolyline(IVec2I p1, IVec2I p2, IVec2I[] pts, boolean closed)
public static IVec2 intersectSegmentAndXLine(IVec2I linePt1, IVec2I linePt2, double y)
public static IVec2 intersectSegmentAndYLine(IVec2I linePt1, IVec2I linePt2, double x)
public static IVec2[] intersectLineAndCircle(IVec2I linePt, IVec2I lineDir, IVec2I circleCenter, double radius)
public static IVec2I[] removeStraightPoints(IVec2I[] pts, boolean closed)
public static boolean clockwise(IVec2[] pts)
public static boolean counterclockwise(IVec2[] pts)
public static boolean loopdir(IVec2[] pts)
public static IVec nml(IVec2[] pts)
public static double signedArea(IVec2[] pts)
public static double area(IVec2[] pts)
public boolean isInside(IVec2I[] pts)
public boolean isInside(IVec2[] pts)
public boolean isValid()
public java.lang.String toString()
toString
in class java.lang.Object
public double distToLine(IVec2 pt1, IVec2 pt2)
public double[] projectTo2Vec(IVec2I v1, IVec2I v2)
public IVec2 perpendicularVecToLine(IVec2I lineDir, IVec2I linePt)
public IVec2 perpendicularVecToLine(IVec2I lineDir)
public double distToLine(IVec2I lineDir)
public double distToSegment(IVec2I linePt1, IVec2I linePt2)
public double ratioOnSegment(IVec2I linePt1, IVec2I linePt2)