Table of Contents

Class CCylinder3

Namespace
AT.Librarys.Container.Toolkit.Vision
Assembly
AT.Librarys.Container.dll

圆筒(有限长圆柱)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

center CPoint3
rotX double
rotY double
rotZ double
radius double
halfHeight double

Properties

Center

圆筒中心

public CPoint3 Center { get; set; }

Property Value

CPoint3

HalfHeight

半高(>0)

public double HalfHeight { get; set; }

Property Value

double

Null

public static CCylinder3 Null { get; }

Property Value

CCylinder3

Radius

半径(>0)

public double Radius { get; set; }

Property Value

double

RotX

绕 X 轴旋转(度)

public double RotX { get; set; }

Property Value

double

RotY

绕 Y 轴旋转(度)

public double RotY { get; set; }

Property Value

double

RotZ

绕 Z 轴旋转(度)

public double RotZ { get; set; }

Property Value

double

Methods

Clone()

克隆

public object Clone()

Returns

object

Contains(CPoint3)

点是否在圆筒内(含端面)

public bool Contains(CPoint3 p)

Parameters

p CPoint3

Returns

bool

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

top bool
resolution int

Returns

CPoint3[]

GetEndCenters()

顶/底面中心(世界坐标)

public (CPoint3 Top, CPoint3 Bottom) GetEndCenters()

Returns

(CPoint3 Top, CPoint3 Bottom)

GetWireframe(int, int)

线框数据:两圈圆+若干条母线(竖向线)

public (CPoint3[] Top, CPoint3[] Bottom, CLine3[] Generatrix) GetWireframe(int circleResolution = 64, int generatrixCount = 8)

Parameters

circleResolution int
generatrixCount int

Returns

(CPoint3[] Top, CPoint3[] Bottom, CLine3[] Generatrix)