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

M3D / M3D / Shapes / Projector

Class: Projector

M3D.Shapes.Projector

Memberof

M3D.Shapes

Description

Projector基类

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 Projector(): Projector

Returns

Projector

Description

构造函数

Overrides

M3DObject.constructor

Properties

id

id: number

Inherited from

M3DObject.id


count

Static count: number

Inherited from

M3DObject.count

Methods

getEvents

getEvents(): M3DEvent[]

Returns

M3DEvent[]

Description

获得事件列表

Inherited from

M3DObject.getEvents


getId

getId(): number

Returns

number

Description

获取id

Inherited from

M3DObject.getId


getLocalToWorld

getLocalToWorld(): Matrix3x4

Returns

Matrix3x4

Description

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


getWorldToLocal

getWorldToLocal(): Matrix3x4

Returns

Matrix3x4

Description

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


project

project(pointerInfo, projectedPoint): void

Parameters

NameType
pointerInfoPointerInfo
projectedPointVector3

Returns

void

Description

Calculates the object/world coordinates (projectedPoint) of a window coordinate (pointToProject) when projected onto some shape or geometry (implemented in derived classes). SceneView in used for i projecting window coordinates into object coordinates and vice versa. Returns true on successful projection.


registerEvent

registerEvent(event): void

Parameters

NameTypeDescription
eventM3DEventM3D事件

Returns

void

Description

注册事件

Inherited from

M3DObject.registerEvent


removeEvent

removeEvent(): void

Returns

void

Description

删除事件

Inherited from

M3DObject.removeEvent


setId

setId(v): void

Parameters

NameTypeDescription
vnumberShapeId

Returns

void

Description

设置id

Inherited from

M3DObject.setId


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.