C# 클래스 Loyc.Geometry.PointMath

파일 보기 프로젝트 열기: qwertie/ecsharp 1 사용 예제들

공개 메소드들

메소드 설명
Abs ( this v ) : Vector

Gets the absolute value of the vector's individual components.

Abs ( this v ) : System.Vector3

Gets the absolute value of the vector's individual components.

Add ( this a, System.Point b ) : System.Point
Add ( this a, Vector b ) : System.Point
Add ( this a, Point3 b ) : Point3
Add ( this a, System.Vector3 b ) : Point3
Add ( this a, Vector b ) : Vector
Add ( this a, System.Vector3 b ) : System.Vector3
Angle ( this v ) : double

Gets the angle from 0 to 2*PI of the vector, where (1,0) has angle 0 and (0,1) has angle PI/2.

AngleDeg ( this v ) : double

Gets the angle from 0 to 360 of the vector, where (1,0) has angle 0 and (0,1) has angle 90.

ComputeConvexHull ( IEnumerable points ) : IListSource

Computes the convex hull of a polygon, in clockwise order in a Y-up coordinate system (counterclockwise in a Y-down coordinate system).

Uses the Monotone Chain algorithm, a.k.a. Andrew's Algorithm.

ComputeConvexHull ( List points, bool sortInPlace ) : IListSource
Cross ( this a, Vector b ) : T

Computes the "cross product" of a pair of 2D vectors.

This is not a general cross product, as cross product is only a 3D concept, but this operator acts as though the two points were in the Z=0 plane and returns the Z coordinate of the cross product: b.X * a.Y - b.Y * a.X. This value is zero if the vectors are parallel; it is a.Length * b.Length or -a.Length * b.Length if the vectors are perpendicular. One use of cross product is to determine whether the angle between two lines is greater or less than 180 degrees, corresponding to return values less or greater than zero.

Cross ( this a, System.Vector3 b ) : System.Vector3

Computes the cross product of a pair of 3D vectors.

Div ( this p, T factor ) : System.Point
Div ( this p, T factor ) : Point3
Div ( this p, T factor ) : Vector
Div ( this p, T factor ) : System.Vector3
Dot ( this a, Vector b ) : T

Dot product. a*b equals lhs.Length*rhs.Length*Cos(theta) if theta is the angle between two vectors.

Dot ( this a, System.Vector3 b ) : T
Length ( this v ) : T

Gets the length of the vector.

Mul ( this p, T factor ) : System.Point
Mul ( this p, T factor ) : Point3
Mul ( this p, T factor ) : Vector
Mul ( this p, T factor ) : System.Vector3
MulDiv ( this v, T mul, T div ) : Vector
MulDiv ( this v, T mul, T div ) : System.Vector3
Neg ( this a ) : Vector

Reverses a vector.

Neg ( this a ) : System.Vector3

Reverses a vector.

Normalized ( this v ) : Vector
Normalized ( this v ) : System.Vector3
PolarToPoint ( T magnitude, double radians ) : Point
PolarToVector ( T magnitude, double radians ) : Vector
Quadrance ( this v ) : T

Gets the square of the length of the vector.

Rot90 ( this a ) : Vector

Rotates a vector 90 degrees.

Rotatation is clockwise if increasing Y goes downward, counter- clockwise if increasing Y goes upward. If the vector represents the direction of a line, the result also represents the coefficients (a,b) of the implicit line equation aX + bY + c = 0.

Shl ( this p, int amt ) : System.Point
Shl ( this p, int amt ) : Point3
Shl ( this p, int amt ) : Vector
Shl ( this p, int amt ) : System.Vector3
Shr ( this p, int amt ) : System.Point
Shr ( this p, int amt ) : Point3
Shr ( this p, int amt ) : Vector
Shr ( this p, int amt ) : System.Vector3
Sub ( this a, Vector b ) : System.Point
Sub ( this a, System.Point b ) : Vector
Sub ( this a, Vector b ) : Vector
Sub ( this a, Point3 b ) : System.Vector3
Sub ( this a, System.Vector3 b ) : System.Vector3
Vector ( this seg ) : Vector

Returns seg.B - seg.A.

메소드 상세

Abs() 공개 정적인 메소드

Gets the absolute value of the vector's individual components.
public static Abs ( this v ) : Vector
v this
리턴 Vector

Abs() 공개 정적인 메소드

Gets the absolute value of the vector's individual components.
public static Abs ( this v ) : System.Vector3
v this
리턴 System.Vector3

Add() 공개 정적인 메소드

public static Add ( this a, System.Point b ) : System.Point
a this
b System.Point
리턴 System.Point

Add() 공개 정적인 메소드

public static Add ( this a, Vector b ) : System.Point
a this
b Vector
리턴 System.Point

Add() 공개 정적인 메소드

public static Add ( this a, Point3 b ) : Point3
a this
b Point3
리턴 Point3

Add() 공개 정적인 메소드

public static Add ( this a, System.Vector3 b ) : Point3
a this
b System.Vector3
리턴 Point3

Add() 공개 정적인 메소드

public static Add ( this a, Vector b ) : Vector
a this
b Vector
리턴 Vector

Add() 공개 정적인 메소드

public static Add ( this a, System.Vector3 b ) : System.Vector3
a this
b System.Vector3
리턴 System.Vector3

Angle() 공개 정적인 메소드

Gets the angle from 0 to 2*PI of the vector, where (1,0) has angle 0 and (0,1) has angle PI/2.
public static Angle ( this v ) : double
v this
리턴 double

AngleDeg() 공개 정적인 메소드

Gets the angle from 0 to 360 of the vector, where (1,0) has angle 0 and (0,1) has angle 90.
public static AngleDeg ( this v ) : double
v this
리턴 double

ComputeConvexHull() 공개 정적인 메소드

Computes the convex hull of a polygon, in clockwise order in a Y-up coordinate system (counterclockwise in a Y-down coordinate system).
Uses the Monotone Chain algorithm, a.k.a. Andrew's Algorithm.
public static ComputeConvexHull ( IEnumerable points ) : IListSource
points IEnumerable
리턴 IListSource

ComputeConvexHull() 공개 정적인 메소드

public static ComputeConvexHull ( List points, bool sortInPlace ) : IListSource
points List
sortInPlace bool
리턴 IListSource

Cross() 공개 정적인 메소드

Computes the "cross product" of a pair of 2D vectors.
This is not a general cross product, as cross product is only a 3D concept, but this operator acts as though the two points were in the Z=0 plane and returns the Z coordinate of the cross product: b.X * a.Y - b.Y * a.X. This value is zero if the vectors are parallel; it is a.Length * b.Length or -a.Length * b.Length if the vectors are perpendicular. One use of cross product is to determine whether the angle between two lines is greater or less than 180 degrees, corresponding to return values less or greater than zero.
public static Cross ( this a, Vector b ) : T
a this
b Vector
리턴 T

Cross() 공개 정적인 메소드

Computes the cross product of a pair of 3D vectors.
public static Cross ( this a, System.Vector3 b ) : System.Vector3
a this
b System.Vector3
리턴 System.Vector3

Div() 공개 정적인 메소드

public static Div ( this p, T factor ) : System.Point
p this
factor T
리턴 System.Point

Div() 공개 정적인 메소드

public static Div ( this p, T factor ) : Point3
p this
factor T
리턴 Point3

Div() 공개 정적인 메소드

public static Div ( this p, T factor ) : Vector
p this
factor T
리턴 Vector

Div() 공개 정적인 메소드

public static Div ( this p, T factor ) : System.Vector3
p this
factor T
리턴 System.Vector3

Dot() 공개 정적인 메소드

Dot product. a*b equals lhs.Length*rhs.Length*Cos(theta) if theta is the angle between two vectors.
public static Dot ( this a, Vector b ) : T
a this
b Vector
리턴 T

Dot() 공개 정적인 메소드

public static Dot ( this a, System.Vector3 b ) : T
a this
b System.Vector3
리턴 T

Length() 공개 정적인 메소드

Gets the length of the vector.
public static Length ( this v ) : T
v this
리턴 T

Mul() 공개 정적인 메소드

public static Mul ( this p, T factor ) : System.Point
p this
factor T
리턴 System.Point

Mul() 공개 정적인 메소드

public static Mul ( this p, T factor ) : Point3
p this
factor T
리턴 Point3

Mul() 공개 정적인 메소드

public static Mul ( this p, T factor ) : Vector
p this
factor T
리턴 Vector

Mul() 공개 정적인 메소드

public static Mul ( this p, T factor ) : System.Vector3
p this
factor T
리턴 System.Vector3

MulDiv() 공개 정적인 메소드

public static MulDiv ( this v, T mul, T div ) : Vector
v this
mul T
div T
리턴 Vector

MulDiv() 공개 정적인 메소드

public static MulDiv ( this v, T mul, T div ) : System.Vector3
v this
mul T
div T
리턴 System.Vector3

Neg() 공개 정적인 메소드

Reverses a vector.
public static Neg ( this a ) : Vector
a this
리턴 Vector

Neg() 공개 정적인 메소드

Reverses a vector.
public static Neg ( this a ) : System.Vector3
a this
리턴 System.Vector3

Normalized() 공개 정적인 메소드

public static Normalized ( this v ) : Vector
v this
리턴 Vector

Normalized() 공개 정적인 메소드

public static Normalized ( this v ) : System.Vector3
v this
리턴 System.Vector3

PolarToPoint() 공개 정적인 메소드

public static PolarToPoint ( T magnitude, double radians ) : Point
magnitude T
radians double
리턴 Point

PolarToVector() 공개 정적인 메소드

public static PolarToVector ( T magnitude, double radians ) : Vector
magnitude T
radians double
리턴 Vector

Quadrance() 공개 정적인 메소드

Gets the square of the length of the vector.
public static Quadrance ( this v ) : T
v this
리턴 T

Rot90() 공개 정적인 메소드

Rotates a vector 90 degrees.
Rotatation is clockwise if increasing Y goes downward, counter- clockwise if increasing Y goes upward. If the vector represents the direction of a line, the result also represents the coefficients (a,b) of the implicit line equation aX + bY + c = 0.
public static Rot90 ( this a ) : Vector
a this
리턴 Vector

Shl() 공개 정적인 메소드

public static Shl ( this p, int amt ) : System.Point
p this
amt int
리턴 System.Point

Shl() 공개 정적인 메소드

public static Shl ( this p, int amt ) : Point3
p this
amt int
리턴 Point3

Shl() 공개 정적인 메소드

public static Shl ( this p, int amt ) : Vector
p this
amt int
리턴 Vector

Shl() 공개 정적인 메소드

public static Shl ( this p, int amt ) : System.Vector3
p this
amt int
리턴 System.Vector3

Shr() 공개 정적인 메소드

public static Shr ( this p, int amt ) : System.Point
p this
amt int
리턴 System.Point

Shr() 공개 정적인 메소드

public static Shr ( this p, int amt ) : Point3
p this
amt int
리턴 Point3

Shr() 공개 정적인 메소드

public static Shr ( this p, int amt ) : Vector
p this
amt int
리턴 Vector

Shr() 공개 정적인 메소드

public static Shr ( this p, int amt ) : System.Vector3
p this
amt int
리턴 System.Vector3

Sub() 공개 정적인 메소드

public static Sub ( this a, Vector b ) : System.Point
a this
b Vector
리턴 System.Point

Sub() 공개 정적인 메소드

public static Sub ( this a, System.Point b ) : Vector
a this
b System.Point
리턴 Vector

Sub() 공개 정적인 메소드

public static Sub ( this a, Vector b ) : Vector
a this
b Vector
리턴 Vector

Sub() 공개 정적인 메소드

public static Sub ( this a, Point3 b ) : System.Vector3
a this
b Point3
리턴 System.Vector3

Sub() 공개 정적인 메소드

public static Sub ( this a, System.Vector3 b ) : System.Vector3
a this
b System.Vector3
리턴 System.Vector3

Vector() 공개 정적인 메소드

Returns seg.B - seg.A.
public static Vector ( this seg ) : Vector
seg this
리턴 Vector