Class CPlane3
public class CPlane3
- Inheritance
-
CPlane3
- Inherited Members
- Extension Methods
Constructors
CPlane3()
public CPlane3()
CPlane3(CPoint3, double, double, double, double, double)
构造:中心+姿态+尺寸
public CPlane3(CPoint3 center, double rotXDeg, double rotYDeg, double rotZDeg, double lengthX, double lengthY)
Parameters
Properties
Center
中心点(有限时为面片中心;无限时为平面上一参考点)
public CPoint3 Center { get; set; }
Property Value
IsInfinite
是否无限平面
public bool IsInfinite { get; }
Property Value
LengthX
public double LengthX { get; set; }
Property Value
LengthY
public double LengthY { get; set; }
Property Value
Point1
Point1 旧接口(+X,+Y)
public CPoint3 Point1 { get; }
Property Value
Point2
Point2 旧接口(+X,-Y)
public CPoint3 Point2 { get; }
Property Value
Point3
Point3 旧接口(-X,+Y)
public CPoint3 Point3 { get; }
Property Value
Point4
Point4 旧接口(-X,-Y)
public CPoint3 Point4 { get; }
Property Value
RotX
绕 X 轴旋转(度)
public double RotX { get; set; }
Property Value
RotY
绕 Y 轴旋转(度)
public double RotY { get; set; }
Property Value
RotZ
绕 Z 轴旋转(度)
public double RotZ { get; set; }
Property Value
Methods
Expand(double)
扩大有限面片尺寸(边缘各向外扩 margin)。无限面返回自身。
public CPlane3 Expand(double margin)
Parameters
margindouble
Returns
FromCorners(params CPoint3[])
根据四角点构造(顺序任意)。不足 3 点返回 null。
public static CPlane3 FromCorners(params CPoint3[] corners)
Parameters
cornersCPoint3[]
Returns
FromHessian(double, double, double, double, double, double)
通过 Hessian 法向式 (nx,ny,nz,d) 构造平面,可选尺寸
public static CPlane3 FromHessian(double nx, double ny, double nz, double d, double lengthX = 0, double lengthY = 0)
Parameters
Returns
GetCorners()
获取四角点(有限) 顺序(+X,+Y),(+X,-Y),(-X,-Y),(-X,+Y)。无限返回空数组
public CPoint3[] GetCorners()
Returns
- CPoint3[]
GetHessian()
获取 Hessian 参数 (nx,ny,nz,d)
public (double nx, double ny, double nz, double d) GetHessian()
Returns
GetNormal()
获取单位法向
public (double nx, double ny, double nz) GetNormal()
Returns
GetQuadVerticesLegacyOrder()
旧顺序兼容(+X,+Y),(+X,-Y),(-X,+Y),(-X,-Y)
public CPoint3[] GetQuadVerticesLegacyOrder()
Returns
- CPoint3[]
InvalidateCorners()
使角点缓存失效
public void InvalidateCorners()
Project(CPoint3)
点正交投影到平面
public CPoint3 Project(CPoint3 p)
Parameters
pCPoint3
Returns
SignedDistance(CPoint3)
点到平面有符号距离(>0 在法向正侧)
public double SignedDistance(CPoint3 p)
Parameters
pCPoint3
Returns
ToPlane3(double, double, double, double, CPointCloud, bool, double, double, double[], double[])
public static CPlane3 ToPlane3(double nx, double ny, double nz, double d, CPointCloud pts, bool forceNormalUp = true, double parallelThreshold = 0.97, double defaultSize = 2, double[] reference1 = null, double[] reference2 = null)
Parameters
nxdoublenydoublenzdoubleddoubleptsCPointCloudforceNormalUpboolparallelThresholddoubledefaultSizedoublereference1double[]reference2double[]
Returns
ToString()
调试信息
public override string ToString()