跳到主要内容
版本:v10.0

M3D / M3D / Shapes / LineProjector

Class: LineProjector

M3D.Shapes.LineProjector

Memberof

M3D.Shapes

Description

LineProjector projects points onto the closest point on the given line

Author

zyc

Date

2023-10-17

Version

1.0

Copyright

All Rights Reserved. Copyright (C) 2022 HOTEAMSOFT, Ltd

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new LineProjector(): LineProjector

Returns

LineProjector

Description

构造函数

Overrides

Projector.constructor

new LineProjector(start, end): LineProjector

Parameters

NameType
startVector3
endVector3

Returns

LineProjector

Description

构造函数

Overrides

Projector.constructor

Properties

id

id: number

Inherited from

Projector.id


count

Static count: number

Inherited from

Projector.count

Methods

getEvents

getEvents(): M3DEvent[]

Returns

M3DEvent[]

Description

获得事件列表

Inherited from

Projector.getEvents


getId

getId(): number

Returns

number

Description

获取id

Inherited from

Projector.getId


getLineEnd

getLineEnd(): Vector3

Returns

Vector3

Description

获取终点


getLineStart

getLineStart(): Vector3

Returns

Vector3

Description

获取起点


getLocalToWorld

getLocalToWorld(): Matrix3x4

Returns

Matrix3x4

Description

Gets the matrix for transforming the projector's local coordinate system to the world/object coordinate system.

Inherited from

Projector.getLocalToWorld


getWorldToLocal

getWorldToLocal(): Matrix3x4

Returns

Matrix3x4

Description

Gets the matrix for transforming the world/object coordinate system to the command's local coordinate system.

Inherited from

Projector.getWorldToLocal


project

project(pointerInfo, projectedPoint): boolean

Parameters

NameType
pointerInfoPointerInfo
projectedPointVector3

Returns

boolean

Description

project

Overrides

Projector.project


registerEvent

registerEvent(event): void

Parameters

NameTypeDescription
eventM3DEventM3D事件

Returns

void

Description

注册事件

Inherited from

Projector.registerEvent


removeEvent

removeEvent(): void

Returns

void

Description

删除事件

Inherited from

Projector.removeEvent


setId

setId(v): void

Parameters

NameTypeDescription
vnumberShapeId

Returns

void

Description

设置id

Inherited from

Projector.setId


setLine

setLine(start, end): void

Parameters

NameType
startVector3
endVector3

Returns

void

Description

设置线起始点


setLocalToWorld

setLocalToWorld(localToWorld): void

Parameters

NameType
localToWorldMatrix3x4

Returns

void

Description

Sets the matrix for transforming the projector's local coordinate system to the world/object coordinate system.

Inherited from

Projector.setLocalToWorld