C# 클래스 MIConvexHull.MathHelper

A helper class mostly for normal computation. If convex hulls are computed in higher dimensions, it might be a good idea to add a specific FindNormalVectorND function.
파일 보기 프로젝트 열기: gusmanb/MIConvexHull 1 사용 예제들

공개 메소드들

메소드 설명
CalculateFacePlane ( ConvexFaceInternal face, double center ) : bool

Calculates the normal and offset of the hyper-plane given by the face's vertices.

FindNormalVector ( int vertices, double normalData ) : void

Finds normal vector of a hyper-plane given by vertices. Stores the results to normalData.

GetSimplexVolume ( ConvexFaceInternal cell, IList vertices, SimplexVolumeBuffer buffer ) : double

Computes the volume of an n-dimensional simplex. Buffer needs to be array of shape Dimension x Dimension.

GetVertexDistance ( int v, ConvexFaceInternal f ) : double

Check if the vertex is "visible" from the face. The vertex is "over face" if the return value is > Constants.PlaneDistanceTolerance.

LengthSquared ( double x ) : double

Squared length of the vector.

MathHelper ( int dimension, double positions ) : System
SubtractFast ( int x, int y, double target ) : void

Subtracts vectors x and y and stores the result to target.

비공개 메소드들

메소드 설명
DeterminantDestructive ( SimplexVolumeBuffer buff ) : double
FindNormal ( int vertices, double normal ) : void
FindNormalVector2D ( int vertices, double normal ) : void

Finds 2D normal vector.

FindNormalVector3D ( int vertices, double normal ) : void

Finds 3D normal vector.

FindNormalVector4D ( int vertices, double normal ) : void

Finds 4D normal vector.

FindNormalVectorND ( int vertices, double normal ) : void
LUFactor ( double data, int order, int ipiv, double vecLUcolj ) : void

메소드 상세

CalculateFacePlane() 공개 메소드

Calculates the normal and offset of the hyper-plane given by the face's vertices.
public CalculateFacePlane ( ConvexFaceInternal face, double center ) : bool
face ConvexFaceInternal
center double
리턴 bool

FindNormalVector() 공개 메소드

Finds normal vector of a hyper-plane given by vertices. Stores the results to normalData.
public FindNormalVector ( int vertices, double normalData ) : void
vertices int
normalData double
리턴 void

GetSimplexVolume() 공개 정적인 메소드

Computes the volume of an n-dimensional simplex. Buffer needs to be array of shape Dimension x Dimension.
public static GetSimplexVolume ( ConvexFaceInternal cell, IList vertices, SimplexVolumeBuffer buffer ) : double
cell ConvexFaceInternal
vertices IList
buffer SimplexVolumeBuffer Helper for the calculation to avoid unnecessary allocations.
리턴 double

GetVertexDistance() 공개 메소드

Check if the vertex is "visible" from the face. The vertex is "over face" if the return value is > Constants.PlaneDistanceTolerance.
public GetVertexDistance ( int v, ConvexFaceInternal f ) : double
v int
f ConvexFaceInternal
리턴 double

LengthSquared() 공개 정적인 메소드

Squared length of the vector.
public static LengthSquared ( double x ) : double
x double
리턴 double

MathHelper() 공개 메소드

public MathHelper ( int dimension, double positions ) : System
dimension int
positions double
리턴 System

SubtractFast() 공개 메소드

Subtracts vectors x and y and stores the result to target.
public SubtractFast ( int x, int y, double target ) : void
x int
y int
target double
리턴 void