Skip to content
On this page

mxcad API 文档 / McGePoint3d

Class: McGePoint3d

表示三维点的对象。

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new McGePoint3d(dX?, dY?, dZ?)

构造函数。

Parameters

NameTypeDescription
dX?number | objectX 坐标。
dY?numberY 坐标。
dZ?numberZ 坐标。

Properties

imp

imp: any


kOrigin

Static kOrigin: McGePoint3d

Accessors

x

get x(): number

X 坐标。

Returns

number

set x(val): void

Parameters

NameType
valnumber

Returns

void


y

get y(): number

Y 坐标。

Returns

number

set y(val): void

Parameters

NameType
valnumber

Returns

void


z

get z(): number

Z 坐标。

Returns

number

set z(val): void

Parameters

NameType
valnumber

Returns

void

Methods

addvec

addvec(vec): McGePoint3d

计算点加上向量后的新位置

Parameters

NameType
vecMcGeVector3d

Returns

McGePoint3d


av

av(vec): McGePoint3d

Parameters

NameType
vecMcGeVector3d

Returns

McGePoint3d


c

c(): McGePoint3d

Returns

McGePoint3d


clone

clone(): McGePoint3d

刻隆一个对对象

Returns

McGePoint3d


copy

copy(val): McGePoint3d

复制对象的值

Parameters

NameType
valMcGePoint3d

Returns

McGePoint3d


distanceTo

distanceTo(pnt): number

计算两点距离

Parameters

NameType
pntMcGePoint3d

Returns

number


isEqualTo

isEqualTo(pnt): boolean

判断两个点是否相等

Parameters

NameType
pntMcGePoint3d

Returns

boolean


setFromVector3

setFromVector3(val): McGePoint3d

将three.js 的向量设置成点

Parameters

NameType
valVector3

Returns

McGePoint3d


sub

sub(pt): McGeVector3d

返回两点相减后得到的一个新的向量

Parameters

NameType
ptMcGePoint3d

Returns

McGeVector3d


subvec

subvec(vec): McGePoint3d

计算点减去向量后的新位置

Parameters

NameType
vecMcGeVector3d

Returns

McGePoint3d


sv

sv(vec): McGePoint3d

Parameters

NameType
vecMcGeVector3d

Returns

McGePoint3d


toVector3

toVector3(): Vector3

得对应的three.js 向量

Returns

Vector3


transformBy

transformBy(leftSide): McGePoint3d

使用矩阵变换该点

Parameters

NameType
leftSideMcGeMatrix3d

Returns

McGePoint3d