Table of Contents

Class CBox3

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

矩形3D

public class CBox3
Inheritance
CBox3
Inherited Members
Extension Methods

Remarks

说明:

  • 本类使用中心点 + 长/宽/高(LengthX/LengthY/LengthZ)表示一个长方体,然后通过欧拉角旋转得到最终位置。
  • 旋转以度为单位,应用顺序为先绕 X 再绕 Y 最后绕 Z(等价于矩阵 R = Rz * Ry * Rx)。
  • 返回的顶点顺序为 (+x,+y,+z),(+x,+y,-z),(+x,-y,+z),(+x,-y,-z),(-x,+y,+z),(-x,+y,-z),(-x,-y,+z),(-x,-y,-z)。
  • 顶点坐标基于右手坐标系,单位与 Center/X/Y/Z 的单位保持一致(通常为毫米或米,视上层约定)。
  • 该类仅提供几何计算(生成顶点);若要将数据传入 VTK 或其他原生库,请注意内存/所有权和坐标系转换要求。

Constructors

CBox3()

构造一个默认矩形体(中心在原点,单位长宽高为 1)

public CBox3()

CBox3(CPoint3, double, double, double, double, double, double)

使用中心和长宽高构造矩形体

public CBox3(CPoint3 center, double rotXDeg, double rotYDeg, double rotZDeg, double lengthX, double lengthY, double lengthZ)

Parameters

center CPoint3

中心点

rotXDeg double

绕 X 轴旋转

rotYDeg double

绕 Y 轴旋转

rotZDeg double

绕 Z 轴旋转

lengthX double

X 方向长度

lengthY double

Y 方向长度

lengthZ double

Z 方向长度

Properties

Center

中心点坐标

public CPoint3 Center { get; set; }

Property Value

CPoint3

LengthX

X方向长度

public double LengthX { get; set; }

Property Value

double

LengthY

Y方向长度

public double LengthY { get; set; }

Property Value

double

LengthZ

Z方向长度

public double LengthZ { get; set; }

Property Value

double

Null

空值

public static CBox3 Null { get; }

Property Value

CBox3

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

GetVertices()

获取矩形体的8个顶点

public CPoint3[] GetVertices()

Returns

CPoint3[]

顶点数组,长度为 8,顺序见类注释

GetVerticesMidpoints()

获取矩形体的8个顶点加中间点

public CPoint3[] GetVerticesMidpoints()

Returns

CPoint3[]

顶点数组,长度为 8,顺序见类注释