Vector
Hierarchy
WrappingObj
<gp_Vec
>↳
Vector
Constructors
constructor
• new Vector(vector?
)
Parameters
Name | Type |
---|---|
vector | Point |
Overrides
Defined in
Accessors
Length
• get
Length(): number
Returns
number
Defined in
repr
• get
repr(): string
Returns
string
Defined in
wrapped
• get
wrapped(): Type
Returns
Type
Inherited from
WrappingObj.wrapped
Defined in
• set
wrapped(newWrapped
): void
Parameters
Name | Type |
---|---|
newWrapped | Type |
Returns
void
Inherited from
WrappingObj.wrapped
Defined in
x
• get
x(): number
Returns
number
Defined in
y
• get
y(): number
Returns
number
Defined in
z
• get
z(): number
Returns
number
Defined in
Methods
add
▸ add(v
): Vector
Parameters
Name | Type |
---|---|
v | Vector |
Returns
Defined in
cross
▸ cross(v
): Vector
Parameters
Name | Type |
---|---|
v | Vector |
Returns
Defined in
delete
▸ delete(): void
Returns
void
Inherited from
Defined in
dot
▸ dot(v
): number
Parameters
Name | Type |
---|---|
v | Vector |
Returns
number
Defined in
equals
▸ equals(other
): boolean
Parameters
Name | Type |
---|---|
other | Vector |
Returns
boolean
Defined in
getAngle
▸ getAngle(v
): number
Parameters
Name | Type |
---|---|
v | Vector |
Returns
number
Defined in
getCenter
▸ getCenter(): Vector
Returns
Defined in
multiply
▸ multiply(scale
): Vector
Parameters
Name | Type |
---|---|
scale | number |
Returns
Defined in
normalize
▸ normalize(): Vector
Returns
Defined in
normalized
▸ normalized(): Vector
Returns
Defined in
projectToPlane
▸ projectToPlane(plane
): Vector
Parameters
Name | Type |
---|---|
plane | Plane |
Returns
Defined in
rotate
▸ rotate(angle
, center?
, direction?
): Vector
Parameters
Name | Type |
---|---|
angle | number |
center | Point |
direction | Point |
Returns
Defined in
sub
▸ sub(v
): Vector
Parameters
Name | Type |
---|---|
v | Vector |
Returns
Defined in
toDir
▸ toDir(): gp_Dir
Returns
gp_Dir
Defined in
toPnt
▸ toPnt(): gp_Pnt
Returns
gp_Pnt
Defined in
toTuple
▸ toTuple(): [number
, number
, number
]
Returns
[number
, number
, number
]