|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectigeo.IParameterObject
igeo.IVec2
public class IVec2
Class of 2 dimensional vector.
| Field Summary | |
|---|---|
double |
x
|
double |
y
|
| Fields inherited from class igeo.IParameterObject |
|---|
parent |
| Constructor Summary | |
|---|---|
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(IVec2 v)
|
|
IVec2(IVec2I v)
|
|
IVec2(IVecI v)
|
|
| Method Summary | |
|---|---|
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)
|
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)
|
double |
angle(ISwitchE e,
IVec2I v)
|
IDouble |
angle(ISwitchR r,
IVec2I v)
|
double |
angle(IVec2 v)
|
double |
angle(IVec2I v)
|
IVec2 |
bisect(IVec2 v)
|
IVec2 |
bisect(IVec2I v)
|
IVec |
cross(IVec2 v)
|
IVec |
cross(IVec2I v)
|
IVec2 |
dif(IVec2I v)
|
IVec2 |
diff(IVec2I v)
|
double |
dist(ISwitchE e,
IVec2I v)
|
IDouble |
dist(ISwitchR r,
IVec2I v)
|
double |
dist(IVec2 v)
|
double |
dist(IVec2I v)
distance |
double |
dist2(ISwitchE e,
IVec2I v)
|
IDouble |
dist2(ISwitchR r,
IVec2I v)
|
double |
dist2(IVec2 v)
|
double |
dist2(IVec2I v)
squared distance |
double |
distToLine(IVec2 pt1,
IVec2 pt2)
|
IVec2 |
div(double x)
|
IVec2 |
div(IDouble v)
|
IVec2 |
div(IDoubleI v)
|
double |
dot(ISwitchE e,
IVec2I v)
|
IDouble |
dot(ISwitchR r,
IVec2I v)
|
double |
dot(IVec2 v)
|
double |
dot(IVec2I v)
|
IVec2 |
dup()
|
boolean |
eq(ISwitchE e,
IVec2I v)
|
boolean |
eq(ISwitchE e,
IVec2I v,
double resolution)
|
IBool |
eq(ISwitchR r,
IVec2I v)
|
IBool |
eq(ISwitchR r,
IVec2I v,
IDoubleI resolution)
|
boolean |
eq(IVec2 v)
whether location is same or not |
boolean |
eq(IVec2 v,
double resolution)
|
boolean |
eq(IVec2I v)
whether location is same or not |
boolean |
eq(IVec2I v,
double resolution)
|
boolean |
eqX(ISwitchE e,
IVec2I v)
|
boolean |
eqX(ISwitchE e,
IVec2I v,
double resolution)
|
IBool |
eqX(ISwitchR r,
IVec2I v)
|
IBool |
eqX(ISwitchR r,
IVec2I v,
IDoubleI resolution)
|
boolean |
eqX(IVec2 v)
|
boolean |
eqX(IVec2 v,
double resolution)
|
boolean |
eqX(IVec2I v)
|
boolean |
eqX(IVec2I v,
double resolution)
|
boolean |
eqY(ISwitchE e,
IVec2I v)
|
boolean |
eqY(ISwitchE e,
IVec2I v,
double resolution)
|
IBool |
eqY(ISwitchR r,
IVec2I v)
|
IBool |
eqY(ISwitchR r,
IVec2I v,
IDoubleI resolution)
|
boolean |
eqY(IVec2 v)
|
boolean |
eqY(IVec2 v,
double resolution)
|
boolean |
eqY(IVec2I v)
|
boolean |
eqY(IVec2I v,
double resolution)
|
IVec2 |
flip()
alias of neg |
IVec2 |
get()
|
IDouble |
getX()
|
IDouble |
getY()
|
static IVec2 |
intersect(IVec2I pt1,
IVec2I dir1,
IVec2I pt2,
IVec2I dir2)
|
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 |
isParallel(IVec2I v)
|
boolean |
isParallel(IVec2I v,
double angleReso)
|
boolean |
isStraight(IVec2I v1,
IVec2I v2)
|
boolean |
isStraight(IVec2I v1,
IVec2I v2,
double angleReso)
|
double |
len()
|
IVec2 |
len(double l)
|
IVec2 |
len(IDoubleI l)
|
double |
len(ISwitchE e)
|
IDouble |
len(ISwitchR r)
|
double |
len2()
|
double |
len2(ISwitchE e)
|
IDouble |
len2(ISwitchR r)
|
IVec2 |
mid(IVec2I v)
|
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 |
neg()
|
IVec2 |
ortho()
rotate vector in Pi/2 |
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)
|
IVec2 |
rot(IDoubleI angle)
|
IVec2 |
rot(IVec2 destDir)
|
IVec2 |
rot(IVec2 center,
double angle)
|
IVec2 |
rot(IVec2I destDir)
|
IVec2 |
rot(IVec2I center,
double angle)
|
IVec2 |
rot(IVec2I center,
IDoubleI angle)
|
IVec2 |
rot(IVec2I center,
IVec2I destPt)
|
IVec2 |
rot(IVec2 center,
IVec2 destPt)
|
IVec2 |
scale(double f)
|
IVec2 |
scale(IDoubleI f)
|
IVec2 |
scale(IVec2 center,
double f)
|
IVec2 |
scale(IVec2I center,
double f)
|
IVec2 |
scale(IVec2I center,
IDoubleI f)
|
IVec2 |
set(double x,
double y)
|
IVec2 |
set(IDoubleI x,
IDoubleI y)
|
IVec2 |
set(IVec2 v)
|
IVec2 |
set(IVec2I v)
|
IVec2 |
sub(double x,
double y)
|
IVec2 |
sub(IDoubleI x,
IDoubleI y)
|
IVec2 |
sub(IVec2 v)
|
IVec2 |
sub(IVec2I v)
|
IVec2 |
sum(IVec2 v2,
double w2)
|
IVec2 |
sum(IVec2 v2,
double w1,
double w2)
weighted sum |
IVec2 |
sum(IVec2I... v)
|
IVec2 |
sum(IVec2I v)
|
IVec2 |
sum(IVec2I v2,
double w2)
|
IVec2 |
sum(IVec2I v2,
double w1,
double w2)
weighted sum |
IVec2 |
sum(IVec2I v2,
IDoubleI w2)
|
IVec2 |
sum(IVec2I v2,
IDoubleI w1,
IDoubleI w2)
|
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(IVec2I xvec,
IVec2I yvec)
|
IVec2 |
transform(IVec2I xvec,
IVec2I yvec,
IVec2I translate)
|
IVec2 |
transform(IVec2 xvec,
IVec2 yvec)
|
IVec2 |
transform(IVec2 xvec,
IVec2 yvec,
IVec2 translate)
|
IVec2 |
unit()
normalize (unitize) vector |
double |
x()
|
double |
y()
|
IVec2 |
zero()
setting all zero |
| Methods inherited from class igeo.IParameterObject |
|---|
createObject, parent, parent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double x
public double y
| Constructor Detail |
|---|
public IVec2()
public IVec2(double x,
double y)
public IVec2(IVec2 v)
public IVec2(IVec2I v)
public IVec2(IDoubleI x,
IDoubleI y)
public IVec2(IVecI v)
public IVec2(IServerI s)
public IVec2(IServerI s,
double x,
double y)
public IVec2(IServerI s,
IVec2 v)
public IVec2(IServerI s,
IVec2I v)
public IVec2(IServerI s,
IDoubleI x,
IDoubleI y)
public IVec2(IServerI s,
IVecI v)
| Method Detail |
|---|
public double x()
x in interface IVec2Ipublic double y()
y in interface IVec2Ipublic IVec2 get()
get in interface IParameterget in interface IVec2Iget in interface IVec2Oppublic IVec2 dup()
dup in interface IVec2Ipublic IVec to3d()
to3d in interface IVec2Ipublic IVec to3d(double z)
to3d in interface IVec2Ipublic IVec to3d(IDoubleI z)
to3d in interface IVec2Ipublic IVec4 to4d()
to4d in interface IVec2I
public IVec4 to4d(double z,
double w)
to4d in interface IVec2I
public IVec4 to4d(IDoubleI z,
IDoubleI w)
to4d in interface IVec2Ipublic IDouble getX()
getX in interface IVec2Ipublic IDouble getY()
getY in interface IVec2I
public IVec2 set(double x,
double y)
set in interface IVec2Ipublic IVec2 set(IVec2 v)
public IVec2 set(IVec2I v)
set in interface IVec2I
public IVec2 set(IDoubleI x,
IDoubleI y)
set in interface IVec2I
public IVec2 add(double x,
double y)
add in interface IVec2I
public IVec2 add(IDoubleI x,
IDoubleI y)
add in interface IVec2Ipublic IVec2 add(IVec2 v)
public IVec2 add(IVec2I v)
add in interface IVec2I
public IVec2 sub(double x,
double y)
sub in interface IVec2I
public IVec2 sub(IDoubleI x,
IDoubleI y)
sub in interface IVec2Ipublic IVec2 sub(IVec2 v)
public IVec2 sub(IVec2I v)
sub in interface IVec2Ipublic IVec2 mul(double x)
mul in interface IVec2Ipublic IVec2 mul(IDouble v)
public IVec2 mul(IDoubleI v)
mul in interface IVec2Ipublic IVec2 div(double x)
div in interface IVec2Ipublic IVec2 div(IDouble v)
public IVec2 div(IDoubleI v)
div in interface IVec2Ipublic IVec2 neg()
neg in interface IVec2Ipublic IVec2 rev()
rev in interface IVec2Ipublic IVec2 flip()
flip in interface IVec2Ipublic IVec2 zero()
zero in interface IVec2I
public IVec2 add(IVec2 v,
double f)
public IVec2 add(IVec2I v,
double f)
IVec2I
add in interface IVec2I
public IVec2 add(IVec2I v,
IDoubleI f)
add in interface IVec2I
public IVec2 add(double f,
IVec2 v)
public IVec2 add(double f,
IVec2I v)
IVec2I
add in interface IVec2I
public IVec2 add(IDoubleI f,
IVec2I v)
add in interface IVec2Ipublic double dot(IVec2 v)
public double dot(IVec2I v)
dot in interface IVec2I
public double dot(ISwitchE e,
IVec2I v)
dot in interface IVec2I
public IDouble dot(ISwitchR r,
IVec2I v)
dot in interface IVec2Ipublic IVec cross(IVec2 v)
public IVec cross(IVec2I v)
cross in interface IVec2Ipublic double len()
len in interface IVec2Ipublic double len(ISwitchE e)
len in interface IVec2Ipublic IDouble len(ISwitchR r)
len in interface IVec2Ipublic double len2()
len2 in interface IVec2Ipublic double len2(ISwitchE e)
len2 in interface IVec2Ipublic IDouble len2(ISwitchR r)
len2 in interface IVec2Ipublic IVec2 len(IDoubleI l)
len in interface IVec2Ipublic IVec2 len(double l)
len in interface IVec2Ipublic IVec2 unit()
unit in interface IVec2Ipublic IVec2 ortho()
ortho in interface IVec2Ipublic double dist(IVec2 v)
public double dist(IVec2I v)
IVec2I
dist in interface IVec2I
public double dist(ISwitchE e,
IVec2I v)
dist in interface IVec2I
public IDouble dist(ISwitchR r,
IVec2I v)
dist in interface IVec2Ipublic double dist2(IVec2 v)
public double dist2(IVec2I v)
IVec2I
dist2 in interface IVec2I
public double dist2(ISwitchE e,
IVec2I v)
dist2 in interface IVec2I
public IDouble dist2(ISwitchR r,
IVec2I v)
dist2 in interface IVec2Ipublic boolean eq(IVec2 v)
public boolean eq(IVec2I v)
IVec2I
eq in interface IVec2I
public boolean eq(ISwitchE e,
IVec2I v)
eq in interface IVec2I
public IBool eq(ISwitchR r,
IVec2I v)
eq in interface IVec2I
public boolean eq(IVec2 v,
double resolution)
public boolean eq(IVec2I v,
double resolution)
eq in interface IVec2I
public boolean eq(ISwitchE e,
IVec2I v,
double resolution)
eq in interface IVec2I
public IBool eq(ISwitchR r,
IVec2I v,
IDoubleI resolution)
eq in interface IVec2Ipublic boolean eqX(IVec2 v)
public boolean eqY(IVec2 v)
public boolean eqX(IVec2I v)
eqX in interface IVec2Ipublic boolean eqY(IVec2I v)
eqY in interface IVec2I
public boolean eqX(ISwitchE e,
IVec2I v)
eqX in interface IVec2I
public boolean eqY(ISwitchE e,
IVec2I v)
eqY in interface IVec2I
public IBool eqX(ISwitchR r,
IVec2I v)
eqX in interface IVec2I
public IBool eqY(ISwitchR r,
IVec2I v)
eqY in interface IVec2I
public boolean eqX(IVec2 v,
double resolution)
public boolean eqY(IVec2 v,
double resolution)
public boolean eqX(IVec2I v,
double resolution)
eqX in interface IVec2I
public boolean eqY(IVec2I v,
double resolution)
eqY in interface IVec2I
public boolean eqX(ISwitchE e,
IVec2I v,
double resolution)
eqX in interface IVec2I
public boolean eqY(ISwitchE e,
IVec2I v,
double resolution)
eqY in interface IVec2I
public IBool eqX(ISwitchR r,
IVec2I v,
IDoubleI resolution)
eqX in interface IVec2I
public IBool eqY(ISwitchR r,
IVec2I v,
IDoubleI resolution)
eqY in interface IVec2Ipublic double angle(IVec2 v)
public double angle(IVec2I v)
angle in interface IVec2I
public double angle(ISwitchE e,
IVec2I v)
angle in interface IVec2I
public IDouble angle(ISwitchR r,
IVec2I v)
angle in interface IVec2Ipublic IVec2 rot(double angle)
rot in interface IVec2Ipublic IVec2 rot(IDoubleI angle)
rot in interface IVec2I
public IVec2 rot(IVec2 center,
double angle)
public IVec2 rot(IVec2I center,
double angle)
rot in interface IVec2I
public IVec2 rot(IVec2I center,
IDoubleI angle)
rot in interface IVec2Ipublic IVec2 rot(IVec2 destDir)
public IVec2 rot(IVec2I destDir)
rot in interface IVec2I
public IVec2 rot(IVec2 center,
IVec2 destPt)
public IVec2 rot(IVec2I center,
IVec2I destPt)
rot in interface IVec2Ipublic IVec2 scale(double f)
scale in interface IVec2Ipublic IVec2 scale(IDoubleI f)
scale in interface IVec2I
public IVec2 scale(IVec2 center,
double f)
public IVec2 scale(IVec2I center,
double f)
scale in interface IVec2I
public IVec2 scale(IVec2I center,
IDoubleI f)
scale in interface IVec2Ipublic IVec2 ref(IVec2 lineDir)
lineDir - direction of reflection linepublic IVec2 ref(IVec2I lineDir)
ref in interface IVec2IlineDir - direction of reflection line
public IVec2 ref(IVec2 linePt,
IVec2 lineDir)
linePt - start point of reflection linelineDir - direction of reflection line
public IVec2 ref(IVec2I linePt,
IVec2I lineDir)
ref in interface IVec2IlinePt - start point of reflection linelineDir - direction of reflection linepublic IVec2 mirror(IVec2 lineDir)
lineDir - direction of reflection linepublic IVec2 mirror(IVec2I lineDir)
mirror in interface IVec2IlineDir - direction of reflection line
public IVec2 mirror(IVec2 linePt,
IVec2 lineDir)
linePt - start point of reflection linelineDir - direction of reflection line
public IVec2 mirror(IVec2I linePt,
IVec2I lineDir)
mirror in interface IVec2IlinePt - start point of reflection linelineDir - direction of reflection line
public IVec2 transform(IVec2 xvec,
IVec2 yvec)
public IVec2 transform(IVec2I xvec,
IVec2I yvec)
transform in interface IVec2I
public IVec2 transform(IVec2 xvec,
IVec2 yvec,
IVec2 translate)
public IVec2 transform(IVec2I xvec,
IVec2I yvec,
IVec2I translate)
transform in interface IVec2Ipublic IVec2 dif(IVec2I v)
dif in interface IVec2Ipublic IVec2 diff(IVec2I v)
diff in interface IVec2Ipublic IVec2 mid(IVec2I v)
mid in interface IVec2Ipublic IVec2 sum(IVec2I v)
sum in interface IVec2Ipublic IVec2 sum(IVec2I... v)
sum in interface IVec2Ipublic IVec2 bisect(IVec2 v)
public IVec2 bisect(IVec2I v)
bisect in interface IVec2I
public IVec2 sum(IVec2 v2,
double w1,
double w2)
public IVec2 sum(IVec2I v2,
double w1,
double w2)
IVec2I
sum in interface IVec2I
public IVec2 sum(IVec2I v2,
IDoubleI w1,
IDoubleI w2)
sum in interface IVec2I
public IVec2 sum(IVec2 v2,
double w2)
public IVec2 sum(IVec2I v2,
double w2)
sum in interface IVec2I
public IVec2 sum(IVec2I v2,
IDoubleI w2)
sum in interface IVec2Ipublic 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 intersectYLine(IVec2 linePt,
IVec2 lineDir,
double xOfYLine)
public static IVec2 intersectXLine(IVec2 linePt,
IVec2 lineDir,
double yOfXLine)
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 intersectPolyline(IVec2I p1,
IVec2I p2,
IVec2I[] pts)
public static IVec2 intersectPolygon(IVec2I p1,
IVec2I p2,
IVec2I[] pts)
public static IVec2 intersectSegmentAndXLine(IVec2I linePt1,
IVec2I linePt2,
double y)
public static IVec2 intersectSegmentAndYLine(IVec2I linePt1,
IVec2I linePt2,
double x)
public static IVec2I[] removeStraightPoints(IVec2I[] pts,
boolean closed)
public static IVec2I[] removeDuplicatedPoints(IVec2I[] pts,
boolean closed)
public boolean isInside(IVec2I[] pts)
public boolean isInside(IVec2[] pts)
public java.lang.String toString()
toString in class java.lang.Object
public double distToLine(IVec2 pt1,
IVec2 pt2)
public boolean isOnLine(IVec2 pt1,
IVec2 pt2)
public boolean isBetween(IVec2I pt1,
IVec2I pt2)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||