|
| Vector3 | absoluteValue () const |
| | 取绝对值
|
| |
| _Precision | angle () const |
| | 计算当前向量与 X 轴正方向之间的夹角,角度范围为 [0, 2π)
|
| |
| Vector3 | Cross (const Vector3< _Precision > &rcVct) const |
| | 实现向量的叉乘
|
| |
| _Precision | DistanceToLine (const Vector3 &rclBase, const Vector3 &rclDirect) const |
| | 计算当前向量到一条直线的距离
|
| |
| Vector3 | DistanceToLineSegment (const Vector3 &rclP1, const Vector3 &rclP2) const |
| | 计算当前向量到线段的距离
|
| |
| _Precision | DistanceToPlane (const Vector3 &rclBase, const Vector3 &rclNorm) const |
| | 计算当前向量到一个平面的距离
|
| |
| _Precision | Dot (const Vector3< _Precision > &rcVct) const |
| | 实现向量与标量的乘法操作
|
| |
| Vector3 | findPointOnLine (const Vector3 &dir, const double &d) const |
| | 计算当前向量在指定方向上移动指定距离后的点
|
| |
| _Precision | GetAngle (const Vector3 &rcVect) const |
| | 计算当前向量与另一个向量之间的夹角
|
| |
| _Precision | getDotProduct (const Vector3< _Precision > &v1, const Vector3< _Precision > &v2) const |
| | 计算并返回两个三维向量 v1 和 v2 的点积
|
| |
| bool | IsEqual (const Vector3 &rclPnt, _Precision tol) const |
| | 检查当前向量与另一个向量 rclPnt 是否在给定的容差 tol 范围内相等
|
| |
| bool | IsNull () const |
| | 检查向量是否为零向量
|
| |
| bool | IsOnLineSegment (const Vector3< _Precision > &startVct, const Vector3< _Precision > &endVct) const |
| | 判断当前向量(表示一个点)是否位于由 startVct 和 endVct 定义的线段上
|
| |
| int | IsOnLineSide (const Vector3< _Precision > &p1, const Vector3< _Precision > &p2, const Vector3< _Precision > &pot) const |
| | 判断一个点(pot)是否在由两个点(p1 和 p2)定义的直线的某一侧,或者是否在这条直线上
|
| |
| bool | isParallelX () const |
| | 判断当前向量是否平行于世界坐标系的X轴(1,0,0)
|
| |
| bool | isParallelY () const |
| | 判断当前向量是否平行于世界坐标系的Y轴(0,1,0)
|
| |
| bool | isParallelZ () const |
| | 判断当前向量是否平行于世界坐标系的Z轴(0,0,1)
|
| |
| _Precision | Length () const |
| | 计算向量的长度(也称为模或范数)
|
| |
| _Precision | magnitude2D () const |
| | 计算三维向量的二维幅度
|
| |
| void | Move (_Precision fX, _Precision fY, _Precision fZ) |
| | 将向量的每个分量(x, y, z)分量按给定的值 fX, fY, fZ 进行平移
|
| |
| Vector3 | moveAlongLinePt (const Vector3 &rclP1, const double &d) const |
| | 计算沿着当前点到rclP1的方向移动距离d的点
|
| |
| void | MoveX (_Precision f) |
| | 将向量的 x 分量按给定的值 f 进行平移
|
| |
| void | MoveY (_Precision f) |
| | 将向量的 y 分量按给定的值 f 进行平移
|
| |
| void | MoveZ (_Precision f) |
| | 将向量的 z 分量按给定的值 f 进行平移
|
| |
| Vector3 & | Normalize () |
| | 将向量归一化,即将其长度缩放到 1
|
| |
| bool | operator!= (const Vector3< _Precision > &rcVct) const |
| | 实现了向量的不等于运算符
|
| |
| Vector3 | operator% (const Vector3< _Precision > &rcVct) const |
| | 用于实现两个向量的叉积
|
| |
| Vector3 | operator& (const Vector3< _Precision > &rcVct) const |
| | 实现两个三维向量的叉乘
|
| |
| Vector3 | operator* (_Precision fScale) const |
| | 实现向量与标量的乘法操作
|
| |
| _Precision | operator* (const Vector3< _Precision > &rcVct) const |
| | 实现向量与标量的点乘操作
|
| |
| Vector3 & | operator*= (_Precision fScale) |
| | 实现向量与标量的乘法赋值操作
|
| |
| Vector3 | operator+ (const Vector3< _Precision > &rcVct) const |
| | 实现两个三维向量的相加
|
| |
| Vector3 & | operator+= (const Vector3< _Precision > &rcVct) |
| | 实现向量的加法赋值操作
|
| |
| Vector3 | operator- () const |
| | 取向量的相反数
|
| |
| Vector3 | operator- (const Vector3< _Precision > &rcVct) const |
| | 实现两个三维向量的相减
|
| |
| Vector3 & | operator-= (const Vector3< _Precision > &rcVct) |
| | 实现向量的减法赋值操作
|
| |
| Vector3 | operator/ (_Precision fDiv) const |
| | 实现向量与标量的除法操作
|
| |
| Vector3 & | operator/= (_Precision fDiv) |
| | 实现向量与标量的除法赋值操作
|
| |
| bool | operator< (const Vector3< _Precision > &rcVct) const |
| | 实现了向量之间的“小于”比较
|
| |
| Vector3 & | operator= (const Vector3< _Precision > &v)=default |
| | 实现向量之间的赋值操作
|
| |
| Vector3 & | operator= (Vector3< _Precision > &&v)=default |
| | 移动赋值操作符的重载声明
|
| |
| bool | operator== (const Vector3< _Precision > &rcVct) const |
| | 比较两个向量是否相等
|
| |
| _Precision & | operator[] (unsigned short usIndex) |
| | 返回对坐标的引用。
|
| |
| const _Precision & | operator[] (unsigned short usIndex) const |
| | 返回对坐标的常引用。
|
| |
| Vector3 | Perpendicular (const Vector3 &rclBase, const Vector3 &rclDir) const |
| | 计算从当前向量到由点 rclBase 和方向向量 rclDir 定义的直线的垂足
|
| |
| Vector3 & | ProjectToLine (const Vector3 &rclPoint, const Vector3 &rclLine) |
| | 将当前向量投影到一条由点 rclPoint 和方向向量 rclLine 定义的直线上
|
| |
| Vector3 & | ProjectToPlane (const Vector3 &rclBase, const Vector3 &rclNorm) |
| | 将当前向量投影到一个平面上
|
| |
| void | ProjectToPlane (const Vector3 &rclBase, const Vector3 &rclNorm, Vector3 &rclProj) const |
| | 将当前向量投影到一个平面上,并将结果存储在另一个向量 rclProj 中
|
| |
| void | RotateX (_Precision f) |
| | 将向量绕 x 轴旋转给定的角度 f
|
| |
| void | RotateY (_Precision f) |
| | 将向量绕 y 轴旋转给定的角度 f
|
| |
| void | RotateZ (_Precision f) |
| | 将向量绕 z 轴旋转给定的角度 f
|
| |
| void | Scale (_Precision fX, _Precision fY, _Precision fZ) |
| | 将向量的每个分量(x, y, z)分别按给定的比例因子 fX, fY, fZ 进行缩放
|
| |
| void | ScaleX (_Precision f) |
| | 将向量的 x 分量按给定的比例因子 f 进行缩放
|
| |
| void | ScaleY (_Precision f) |
| | 将向量的 y 分量按给定的比例因子 f 进行缩放
|
| |
| void | ScaleZ (_Precision f) |
| | 将向量的 z 分量按给定的比例因子 f 进行缩放
|
| |
| void | Set (_Precision fX, _Precision fY, _Precision fZ) |
| | 设置向量的 x, y, 和 z 分量为给定的值 fX, fY, 和 fZ
|
| |
| void | SetX (_Precision fX) |
| | 设置 Vector3 类中 x 成员变量的值
|
| |
| void | SetY (_Precision fY) |
| | 设置 Vector3 类中 y 成员变量的值
|
| |
| void | SetZ (_Precision fZ) |
| | 设置 Vector3 类中 z 成员变量的值
|
| |
| _Precision | Sqr () const |
| | 计算向量长度的平方
|
| |
| void | TransformToCoordinateSystem (const Vector3 &rclBase, const Vector3 &rclDirX, const Vector3 &rclDirY) |
| | 将当前向量从一个坐标系转换到另一个坐标系
|
| |
| | Vector3 (_Precision fx=0.0, _Precision fy=0.0, _Precision fz=0.0) |
| | 初始化向量的三个分量 x、y 和 z
|
| |
| | Vector3 (const Vector3< _Precision > &v)=default |
| | 拷贝构造函数
|
| |
| | Vector3 (Vector3< _Precision > &&v)=default |
| | 移动构造函数
|
| |
| | ~Vector3 ()=default |
| |
template<class _Precision>
class Base::Vector3< _Precision >
Vector3 类,表示三维空间中的向量
该类用于表示和操作三维空间中的向量,支持多种向量操作,如设置分量、计算幅度、点积等。
- 模板参数
-