mxcad API 文档 / MdGeVec
Class: MdGeVec
表示一个向量。
Hierarchy
↳
MdGeVec
Table of contents
Constructors
Properties
Methods
- Add
- Added
- Angle
- AngleWithRef
- Coord
- Cross
- CrossCross
- CrossCrossed
- CrossMagnitude
- CrossSquareMagnitude
- Crossed
- Divide
- Divided
- Dot
- DotCross
- IsEqual
- IsNormal
- IsOpposite
- IsParallel
- Magnitude
- MirrorByAxis
- MirrorByCSYSR
- MirrorByVec
- MirroredByAxis
- MirroredByCSYSR
- MirroredByVec
- Multiplied
- Multiply
- Normalize
- Normalized
- Reverse
- Reversed
- Rotate
- Rotated
- Scale
- Scaled
- SetCoord
- SetLinearForm
- SetX
- SetXYZ
- SetY
- SetZ
- SquareMagnitude
- Subtract
- Subtracted
- Transform
- Transformed
- X
- Y
- Z
- getImp
- initTempObject
Constructors
constructor
• new MdGeVec(p1?
, p2?
, p3?
)
Parameters
Name | Type |
---|---|
p1? | number | object | MdGePoint |
p2? | number | MdGePoint |
p3? | number |
Overrides
Properties
imp
• Protected
imp: any
= 0
Inherited from
Methods
Add
▸ Add(other
): void
Parameters
Name | Type |
---|---|
other | MdGeVec |
Returns
void
Added
▸ Added(other
): MdGeVec
Parameters
Name | Type |
---|---|
other | MdGeVec |
Returns
Angle
▸ Angle(other
): number
Parameters
Name | Type |
---|---|
other | MdGeVec |
Returns
number
AngleWithRef
▸ AngleWithRef(other
, ref
): number
Parameters
Name | Type |
---|---|
other | MdGeVec |
ref | MdGeVec |
Returns
number
Coord
▸ Coord(theIndex
): number
Parameters
Name | Type |
---|---|
theIndex | number |
Returns
number
Cross
▸ Cross(right
): void
Parameters
Name | Type |
---|---|
right | MdGeVec |
Returns
void
CrossCross
▸ CrossCross(v1
, v2
): void
Parameters
Name | Type |
---|---|
v1 | MdGeVec |
v2 | MdGeVec |
Returns
void
CrossCrossed
▸ CrossCrossed(v1
, v2
): MdGeVec
Parameters
Name | Type |
---|---|
v1 | MdGeVec |
v2 | MdGeVec |
Returns
CrossMagnitude
▸ CrossMagnitude(right
): number
Parameters
Name | Type |
---|---|
right | MdGeVec |
Returns
number
CrossSquareMagnitude
▸ CrossSquareMagnitude(right
): number
Parameters
Name | Type |
---|---|
right | MdGeVec |
Returns
number
Crossed
▸ Crossed(right
): MdGeVec
Parameters
Name | Type |
---|---|
right | MdGeVec |
Returns
Divide
▸ Divide(scalar
): void
Parameters
Name | Type |
---|---|
scalar | number |
Returns
void
Divided
▸ Divided(scalar
): MdGeVec
Parameters
Name | Type |
---|---|
scalar | number |
Returns
Dot
▸ Dot(other
): number
Parameters
Name | Type |
---|---|
other | MdGeVec |
Returns
number
DotCross
▸ DotCross(v1
, v2
): number
Parameters
Name | Type |
---|---|
v1 | MdGeVec |
v2 | MdGeVec |
Returns
number
IsEqual
▸ IsEqual(other
, linearTolerance
, angularTolerance
): boolean
Parameters
Name | Type |
---|---|
other | MdGeVec |
linearTolerance | number |
angularTolerance | number |
Returns
boolean
IsNormal
▸ IsNormal(other
, angularTolerance
): boolean
Parameters
Name | Type |
---|---|
other | MdGeVec |
angularTolerance | number |
Returns
boolean
IsOpposite
▸ IsOpposite(other
, angularTolerance
): boolean
Parameters
Name | Type |
---|---|
other | MdGeVec |
angularTolerance | number |
Returns
boolean
IsParallel
▸ IsParallel(other
, angularTolerance
): boolean
Parameters
Name | Type |
---|---|
other | MdGeVec |
angularTolerance | number |
Returns
boolean
Magnitude
▸ Magnitude(): number
Returns
number
MirrorByAxis
▸ MirrorByAxis(axis
): void
Parameters
Name | Type |
---|---|
axis | MdGeAxis |
Returns
void
MirrorByCSYSR
▸ MirrorByCSYSR(csysr
): void
Parameters
Name | Type |
---|---|
csysr | MdGeCSYSR |
Returns
void
MirrorByVec
▸ MirrorByVec(vec
): void
Parameters
Name | Type |
---|---|
vec | MdGeVec |
Returns
void
MirroredByAxis
▸ MirroredByAxis(axis
): MdGeVec
Parameters
Name | Type |
---|---|
axis | MdGeAxis |
Returns
MirroredByCSYSR
▸ MirroredByCSYSR(csysr
): MdGeVec
Parameters
Name | Type |
---|---|
csysr | MdGeCSYSR |
Returns
MirroredByVec
▸ MirroredByVec(vec
): MdGeVec
Parameters
Name | Type |
---|---|
vec | MdGeVec |
Returns
Multiplied
▸ Multiplied(scalar
): MdGeVec
Parameters
Name | Type |
---|---|
scalar | number |
Returns
Multiply
▸ Multiply(scalar
): void
Parameters
Name | Type |
---|---|
scalar | number |
Returns
void
Normalize
▸ Normalize(): void
Returns
void
Normalized
▸ Normalized(): MdGeVec
Returns
Reverse
▸ Reverse(): void
Returns
void
Reversed
▸ Reversed(): MdGeVec
Returns
Rotate
▸ Rotate(axis
, ang
): void
Parameters
Name | Type |
---|---|
axis | MdGeAxis |
ang | number |
Returns
void
Rotated
▸ Rotated(axis
, ang
): MdGeVec
Parameters
Name | Type |
---|---|
axis | MdGeAxis |
ang | number |
Returns
Scale
▸ Scale(s
): void
Parameters
Name | Type |
---|---|
s | number |
Returns
void
Scaled
▸ Scaled(s
): MdGeVec
Parameters
Name | Type |
---|---|
s | number |
Returns
SetCoord
▸ SetCoord(p1
, p2
, p3?
): void
Parameters
Name | Type |
---|---|
p1 | number |
p2 | number |
p3? | number |
Returns
void
SetLinearForm
▸ SetLinearForm(p1
, p2
, p3?
, p4?
, p5?
, p6?
, p7?
): void
Parameters
Name | Type |
---|---|
p1 | number | MdGeVec |
p2 | MdGeVec |
p3? | number | MdGeVec |
p4? | MdGeVec |
p5? | number | MdGeVec |
p6? | MdGeVec |
p7? | MdGeVec |
Returns
void
SetX
▸ SetX(x
): void
Parameters
Name | Type |
---|---|
x | number |
Returns
void
SetXYZ
▸ SetXYZ(x
, y
, z
): void
Parameters
Name | Type |
---|---|
x | number |
y | number |
z | number |
Returns
void
SetY
▸ SetY(y
): void
Parameters
Name | Type |
---|---|
y | number |
Returns
void
SetZ
▸ SetZ(z
): void
Parameters
Name | Type |
---|---|
z | number |
Returns
void
SquareMagnitude
▸ SquareMagnitude(): number
Returns
number
Subtract
▸ Subtract(right
): void
Parameters
Name | Type |
---|---|
right | MdGeVec |
Returns
void
Subtracted
▸ Subtracted(right
): MdGeVec
Parameters
Name | Type |
---|---|
right | MdGeVec |
Returns
Transform
▸ Transform(t
): void
Parameters
Name | Type |
---|---|
t | MdGeTrsf |
Returns
void
Transformed
▸ Transformed(t
): MdGeVec
Parameters
Name | Type |
---|---|
t | MdGeTrsf |
Returns
X
▸ X(): number
Returns
number
Y
▸ Y(): number
Returns
number
Z
▸ Z(): number
Returns
number
getImp
▸ getImp(): any
Returns
any
Inherited from
initTempObject
▸ Protected
initTempObject(imp
): void
Parameters
Name | Type |
---|---|
imp | any |
Returns
void