public class MathUtil extends Object
构造器和说明 |
---|
MathUtil() |
限定符和类型 | 方法和说明 |
---|---|
static double |
degreeToRadian(double degree)
角度转弧度。
|
static double |
distance(Point3D point,
Segment3D segment)
计算点到线段间的距离。
|
static double |
distance(Segment3D segment1,
Segment3D segment2)
计算两个三维线段对象之间的最短距离。
|
static Boolean |
isIntersect(Segment3D segment1,
Segment3D segment2)
判断两个三维线段对象是否相交。
|
static boolean |
isOnSegment(Point3D point,
Segment3D segment)
判断点是否在线段上。
|
static Vector3D |
perpendicular(Vector3D v1,
Vector3D v2)
返回与两个三维向量均垂直的向量,方向与v1xv2方向相同。
|
static double |
radianToDegree(double radians)
弧度转角度。
|
static Point3D |
rotate(Point3D point,
double dAangle,
Vector3D vecRotateAxis)
计算点绕旋转轴旋转后的点或向量。
|
public static final double DEGTORAD
public static final double RADTODEG
public static Point3D rotate(Point3D point, double dAangle, Vector3D vecRotateAxis)
point
- 三维点,参数类型支持Point3D、Vector3D。dAangle
- 旋转的角度。vecRotateAxis
- 旋转轴。public static double degreeToRadian(double degree)
degree
- 角度。public static double radianToDegree(double radians)
radians
- 弧度。public static double distance(Point3D point, Segment3D segment)
point
- 三维点,参数类型支持Point3D、Vector3D。segment
- 三维线段。public static boolean isOnSegment(Point3D point, Segment3D segment)
point
- 三维点,参数类型支持Point3D、Vector3D。segment
- 三维线段。public static Boolean isIntersect(Segment3D segment1, Segment3D segment2)
segment1
- 三维线段。segment2
- 三维线段。public static double distance(Segment3D segment1, Segment3D segment2)
segment1
- 三维线段。segment2
- 三维线段。Copyright © 2021–2024 SuperMap. All rights reserved.