M3D / M3D / Shapes / Projector
Class: 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
-
↳
Projector
Table of contents
Constructors
Properties
Methods
- getEvents
- getId
- getLocalToWorld
- getWorldToLocal
- project
- registerEvent
- removeEvent
- setId
- setLocalToWorld
Constructors
constructor
• new Projector(): Projector
Returns
Description
构造函数
Overrides
Properties
id
• id: number
Inherited from
count
▪ Static
count: number
Inherited from
Methods
getEvents
▸ getEvents(): M3DEvent
[]
Returns
M3DEvent
[]
Description
获得事件列表
Inherited from
getId
▸ getId(): number
Returns
number
Description
获取id
Inherited from
getLocalToWorld
▸ getLocalToWorld(): Matrix3x4
Returns
Description
Gets the matrix for transforming the projector's local coordinate system to the world/object coordinate system.
getWorldToLocal
▸ getWorldToLocal(): Matrix3x4
Returns
Description
Gets the matrix for transforming the world/object coordinate system to the command's local coordinate system.
project
▸ project(pointerInfo
, projectedPoint
): void
Parameters
Name | Type |
---|---|
pointerInfo | PointerInfo |
projectedPoint | Vector3 |
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
Name | Type | Description |
---|---|---|
event | M3DEvent | M3D事件 |
Returns
void
Description
注册事件
Inherited from
removeEvent
▸ removeEvent(): void
Returns
void
Description
删除事件
Inherited from
setId
▸ setId(v
): void
Parameters
Name | Type | Description |
---|---|---|
v | number | ShapeId |
Returns
void
Description
设置id
Inherited from
setLocalToWorld
▸ setLocalToWorld(localToWorld
): void
Parameters
Name | Type |
---|---|
localToWorld | Matrix3x4 |
Returns
void
Description
Sets the matrix for transforming the projector's local coordinate system to the world/object coordinate system.