Class CCylinder3
圆筒(有限长圆柱)ROI(几何数据类型,不依赖 VTK) 语义说明:
- Center:圆筒中心(两端面中点,世界坐标)
- Radius:半径(>0)
- HalfHeight:半高(沿轴向“中心到端面”的距离,>0)
- 先绕 X,再绕 Y,最后绕 Z;R = Rz * Ry * Rx,角度单位:度
- 本类型仅做几何计算(取点/包围盒/点内测等),渲染层可据此生成网格或线框
public sealed class CCylinder3 : ICloneable
- Inheritance
-
CCylinder3
- Implements
- Inherited Members
- Extension Methods
Constructors
CCylinder3()
构造
public CCylinder3()
CCylinder3(CPoint3, double, double, double, double, double)
构造:半径/半高语义,角度为度
public CCylinder3(CPoint3 center, double rotX, double rotY, double rotZ, double radius, double halfHeight)
Parameters
Properties
Center
圆筒中心
public CPoint3 Center { get; set; }
Property Value
HalfHeight
半高(>0)
public double HalfHeight { get; set; }
Property Value
Null
空
public static CCylinder3 Null { get; }
Property Value
Radius
半径(>0)
public double Radius { get; set; }
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
Clone()
克隆
public object Clone()
Returns
Contains(CPoint3)
点是否在圆筒内(含端面)
public bool Contains(CPoint3 p)
Parameters
pCPoint3
Returns
GetAabb()
世界坐标下的 AABB(近似精确,解析式) 返回 [xmin,xmax,ymin,ymax,zmin,zmax]
public double[] GetAabb()
Returns
- double[]
GetAxis()
获取世界坐标系下的轴向单位向量(局部 Z 轴旋转后)
public double[] GetAxis()
Returns
- double[]
GetCircle(bool, int)
采样顶/底面圆周(世界坐标),resolution≥3
public CPoint3[] GetCircle(bool top, int resolution = 64)
Parameters
Returns
- CPoint3[]
GetEndCenters()
顶/底面中心(世界坐标)
public (CPoint3 Top, CPoint3 Bottom) GetEndCenters()
Returns
GetWireframe(int, int)
线框数据:两圈圆+若干条母线(竖向线)
public (CPoint3[] Top, CPoint3[] Bottom, CLine3[] Generatrix) GetWireframe(int circleResolution = 64, int generatrixCount = 8)