메소드 | 설명 | |
---|---|---|
IntersectionCircleCircle ( Vector3D sphereCenter, |
NOTE: Not general, and assumes some things we know about this problem domain, e.g. that c1 and c2 live on the same sphere of radius 1, and have two intersection points.
|
|
IntersectionGCGC ( Vector3D gc1, Vector3D gc2, Vector3D &i1, Vector3D &i2 ) : bool |
Returns the two intersection points of two great circles. gc1 and gc2 are the great circle normal vectors. Fails if the input circles are the same.
|
|
IntersectionSmart ( Vector3D sphereCenter, |
Had to break the intersection method into separate cases (depending on when circles are great circles or not), because the spherical pythagorean theorem breaks down in GC cases.
|
메소드 | 설명 | |
---|---|---|
Clamp ( double val ) : double |
Clamps the input to [-1,1]. This is to avoid floating point issues when taking arcsin and arccos.
|
|
CosAngle ( Vector3D p1, Vector3D p2 ) : double |
Calculate the cosine of the angle between two vectors.
|
|
GetGCNormal ( Vector3D p1, Vector3D p2, Vector3D &normal ) : bool |
Return the normal of the great circle defined by the two vectors. Return false if we fail to get the normal (happens if p1 = p2).
|
|
IntersectionCircleGC ( |
Returns intersection points between a circle and a great circle. There may be 0, 1, or 2 intersection points. Returns false if the circle is the same as gc.
|
|
IsGC ( |
||
SinAngle ( Vector3D p1, Vector3D p2 ) : double |
Calculate the sine of the angle between two vectors.
|
public static IntersectionCircleCircle ( Vector3D sphereCenter, |
||
sphereCenter | Vector3D | |
c1 | ||
c2 | ||
i1 | Vector3D | |
i2 | Vector3D | |
리턴 | void |
public static IntersectionGCGC ( Vector3D gc1, Vector3D gc2, Vector3D &i1, Vector3D &i2 ) : bool | ||
gc1 | Vector3D | |
gc2 | Vector3D | |
i1 | Vector3D | |
i2 | Vector3D | |
리턴 | bool |
public static IntersectionSmart ( Vector3D sphereCenter, |
||
sphereCenter | Vector3D | |
c1 | ||
c2 | ||
i1 | Vector3D | |
i2 | Vector3D | |
리턴 | bool |