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

M3D / M3D / Shapes / HotSpot

Class: HotSpot

M3D.Shapes.HotSpot

Memberof

M3D.Shapes

Description

热点基类

Date

2022-1-12

Version

1.0

Copyright

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

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new HotSpot(scene, id, name, description, position, cameraPosition, cameraRotation, cameraZoom, cameraProjectionType): HotSpot

Parameters

NameType
sceneScene
idnumber
namestring
descriptionstring
positionVector3
cameraPositionVector3
cameraRotationVector4
cameraZoomVector3
cameraProjectionTypenumber

Returns

HotSpot

Description

构造函数

Overrides

Note.constructor

Properties

id

id: number

Inherited from

Note.id


count

Static count: number

Inherited from

Note.count


isProto

Static isProto: string

Inherited from

Note.isProto


pVertexHeader

Static pVertexHeader: string

Inherited from

Note.pVertexHeader

Accessors

isProto

get isProto(): boolean

Returns

boolean

Description

获取是否为原型对象

Inherited from

Note.isProto

set isProto(v): void

Parameters

NameType
vboolean

Returns

void

Description

设置是否为原型对象

Inherited from

Note.isProto

Methods

addComText

addComText(comText): void

Parameters

NameType
comTextComText

Returns

void

Description

添加多文本对象

Inherited from

Note.addComText


addEffect

addEffect(effectType): void

Parameters

NameType
effectTypenumber

Returns

void

Description

添加特效效果

Inherited from

Note.addEffect


addImage

addImage(image): void

Parameters

NameType
imageImage

Returns

void

Description

添加图片对象

Inherited from

Note.addImage


addLine

addLine(line): void

Parameters

NameType
lineLine

Returns

void

Description

添加线对象

Inherited from

Note.addLine


addOutFrame

addOutFrame(polyLine): void

Parameters

NameType
polyLinePolyLine

Returns

void

Description

添加外框

Inherited from

Note.addOutFrame


addPoint

addPoint(point): void

Parameters

NameType
pointPoint

Returns

void

Description

添加点对象

Inherited from

Note.addPoint


addPolyLine

addPolyLine(polyLine): void

Parameters

NameType
polyLinePolyLine

Returns

void

Description

添加折线对象

Inherited from

Note.addPolyLine


addText

addText(ct): void

Parameters

NameType
ctComText

Returns

void

Description

添加文字

Inherited from

Note.addText


clear

clear(): void

Returns

void

Description

数据清空

Inherited from

Note.clear


clearComText

clearComText(): void

Returns

void

Description

清空ComText

Inherited from

Note.clearComText


clearImage

clearImage(): void

Returns

void

Description

清空图片

Inherited from

Note.clearImage


clearOutFrames

clearOutFrames(): void

Returns

void

Description

清空外框

Inherited from

Note.clearOutFrames


clearPolyLines

clearPolyLines(): void

Returns

void

Description

清空所有折线

Inherited from

Note.clearPolyLines


getAlpha

getAlpha(): number

Returns

number

Description

获取透明度

Inherited from

Note.getAlpha


getAuthor

getAuthor(): string

Returns

string

Description

获取创建者

Inherited from

Note.getAuthor


getBoundingBox

getBoundingBox(): BoundingBox

Returns

BoundingBox

Description

获取包围盒

Inherited from

Note.getBoundingBox


getCameraPosition

getCameraPosition(): Vector4

Returns

Vector4

Description

获取相机位置


getCameraProjectionType

getCameraProjectionType(): number

Returns

number

Description

获取相机投影类型


getCameraRotation

getCameraRotation(): Vector3

Returns

Vector3

Description

获取相机旋转参数


getCameraZoom

getCameraZoom(): Vector3

Returns

Vector3

Description

获取相机缩放参数


getColor

getColor(): Color

Returns

Color

Description

获取颜色

Inherited from

Note.getColor


getComTexts

getComTexts(): ComText[]

Returns

ComText[]

Description

获取文字对象列表

Inherited from

Note.getComTexts


getCreateId

getCreateId(): number

Returns

number

Description

获取createId

Inherited from

Note.getCreateId


getCreateTime

getCreateTime(): string

Returns

string

Description

获取创建时间

Inherited from

Note.getCreateTime


getDescription

getDescription(): string

Returns

string

Description

获取热点描述


getDrawables

getDrawables(): void

Returns

void

Description

获取渲染数据

Inherited from

Note.getDrawables


getEffect

getEffect(): number

Returns

number

Description

获取效果

Inherited from

Note.getEffect


getEvents

getEvents(): M3DEvent[]

Returns

M3DEvent[]

Description

获得事件列表

Inherited from

Note.getEvents


getFirstParentPath

getFirstParentPath(): string

Returns

string

Description

获取FirstParent路径

Inherited from

Note.getFirstParentPath


getFirstPosition

getFirstPosition(): Vector3

Returns

Vector3

Description

获取第一个点位置

Inherited from

Note.getFirstPosition


getFrameLineList

getFrameLineList(): PolyLine[]

Returns

PolyLine[]

Description

获取边框线对象

Inherited from

Note.getFrameLineList


getGuid

getGuid(): string

Returns

string

Description

获取guid

Inherited from

Note.getGuid


getId

getId(): number

Returns

number

Description

获取id

Inherited from

Note.getId


getImage

getImage(): any

Returns

any

Description

获取热点图片


getImageList

getImageList(): Image[]

Returns

Image[]

Description

获取显示图片列表

Inherited from

Note.getImageList


getIsFrontShow

getIsFrontShow(): boolean

Returns

boolean

Description

获取是否前端显示

Inherited from

Note.getIsFrontShow


getLineList

getLineList(): Line[]

Returns

Line[]

Description

获取线对象

Inherited from

Note.getLineList


getLocalTransform

getLocalTransform(): Matrix4

Returns

Matrix4

Description

获取shape的局部矩阵

Inherited from

Note.getLocalTransform


getName

getName(): string

Returns

string

Description

获取实例名称

Inherited from

Note.getName


getNeedClip

getNeedClip(): boolean

Returns

boolean

Description

获取是否需要剖切

Inherited from

Note.getNeedClip


getObjectId

getObjectId(): number

Returns

number

Description

获取ObjectId

Inherited from

Note.getObjectId


getPoint

getPoint(index): Point

Parameters

NameType
indexnumber

Returns

Point

Description

获取特定位置点

Inherited from

Note.getPoint


getPointList

getPointList(): Point[]

Returns

Point[]

Description

获取点对象

Inherited from

Note.getPointList


getPolyLineList

getPolyLineList(): PolyLine[]

Returns

PolyLine[]

Description

获取折线对象

Inherited from

Note.getPolyLineList


getPosition

getPosition(): Vector3

Returns

Vector3

Description

获取热点位置

Overrides

Note.getPosition


getProperties

getProperties(): PropertySet

Returns

PropertySet

Description

获取属性管理器

Inherited from

Note.getProperties


getProto

getProto(): Shape

Returns

Shape

Description

获取原型

Inherited from

Note.getProto


getRenderShapes

getRenderShapes(): RenderableShape[]

Returns

RenderableShape[]

Description

获取可绘制对象

Inherited from

Note.getRenderShapes


getRotation

getRotation(): Quaternion

Returns

Quaternion

Description

获取空间旋转信息

Inherited from

Note.getRotation


getScene

getScene(): Scene

Returns

Scene

场景对象

Description

获取场景对象

Inherited from

Note.getScene


getSecondParentPath

getSecondParentPath(): string

Returns

string

Description

获取SecondParent路径

Inherited from

Note.getSecondParentPath


getSecondPosition

getSecondPosition(): Vector3

Returns

Vector3

Description

获取第二个点位置

Inherited from

Note.getSecondPosition


getShapeType

getShapeType(): ShapeType

Returns

ShapeType

Description

获取Shape类型

Inherited from

Note.getShapeType


getTextValue

getTextValue(): string

Returns

string

Description

获取文本string类型数据

Inherited from

Note.getTextValue


getWorldBoundingBox

getWorldBoundingBox(): BoundingBox

Returns

BoundingBox

Description

获取世界包围盒

Inherited from

Note.getWorldBoundingBox


getWorldTransform

getWorldTransform(): Matrix4

Returns

Matrix4

Description

获取shape的世界矩阵

Inherited from

Note.getWorldTransform


initAttributes

initAttributes(): void

Returns

void

Description

添加创建时间创建人信息

Inherited from

Note.initAttributes


isDirty

isDirty(): boolean

Returns

boolean

Description

获取脏标记

Inherited from

Note.isDirty


isPreSelected

isPreSelected(): boolean

Returns

boolean

Description

是否预选中

Inherited from

Note.isPreSelected


isSelected

isSelected(): boolean

Returns

boolean

Description

是否被选中

Inherited from

Note.isSelected


isVisible

isVisible(orginVisible?): boolean

Parameters

NameTypeDescription
orginVisible?boolean是否获取原始可见性

Returns

boolean

Description

获取可见性

Inherited from

Note.isVisible


markDirty

markDirty(): void

Returns

void

Description

设置脏标记

Inherited from

Note.markDirty


post

post(msg): void

Parameters

NameType
msgM3DMessage

Returns

void

Description

消息发送者必须实现方法

Inherited from

Note.post


registerEvent

registerEvent(event): void

Parameters

NameTypeDescription
eventM3DEventM3D事件

Returns

void

Description

注册事件

Inherited from

Note.registerEvent


removeEffect

removeEffect(effectType): void

Parameters

NameType
effectTypeEffectType

Returns

void

Description

移除效果

Inherited from

Note.removeEffect


removeEvent

removeEvent(): void

Returns

void

Description

删除事件

Inherited from

Note.removeEvent


removeLine

removeLine(line): void

Parameters

NameType
lineLine

Returns

void

Description

清除指定线

Inherited from

Note.removeLine


removePoint

removePoint(point): void

Parameters

NameType
pointPoint

Returns

void

Description

清除指定点

Inherited from

Note.removePoint


send

send(msg): void

Parameters

NameType
msgM3DMessage

Returns

void

Description

消息发送者必须实现方法

Inherited from

Note.send


sendClipMessage

sendClipMessage(): void

Returns

void

Description

发送剖切更新消息

Inherited from

Note.sendClipMessage


sendEffectMessage

sendEffectMessage(): void

Returns

void

Description

发送特效更新消息

Inherited from

Note.sendEffectMessage


setAlpha

setAlpha(alpha): void

Parameters

NameType
alphanumber

Returns

void

Description

设置透明度

Inherited from

Note.setAlpha


setAuthor

setAuthor(author): void

Parameters

NameType
authorstring

Returns

void

Description

设置创建者

Inherited from

Note.setAuthor


setCameraPosition

setCameraPosition(value): void

Parameters

NameType
valueVector4

Returns

void

Description

设置相机位置


setCameraProjectionType

setCameraProjectionType(value): void

Parameters

NameType
valuenumber

Returns

void

Description

设置相机投影类型


setCameraRotation

setCameraRotation(value): void

Parameters

NameType
valueVector3

Returns

void

Description

设置相机旋转参数


setCameraZoom

setCameraZoom(value): void

Parameters

NameType
valueVector3

Returns

void

Description

设置相机缩放参数


setColor

setColor(color): void

Parameters

NameType
colorColor

Returns

void

Description

设置颜色

Inherited from

Note.setColor


setCreateId

setCreateId(createId): void

Parameters

NameType
createIdnumber

Returns

void

Description

设置createId

Inherited from

Note.setCreateId


setCreateTime

setCreateTime(createtime): void

Parameters

NameType
createtimestring

Returns

void

Description

设置创建时间

Inherited from

Note.setCreateTime


setDescription

setDescription(value): void

Parameters

NameType
valuestring

Returns

void

Description

设置热点描述


setEffect

setEffect(effectType): void

Parameters

NameType
effectTypenumber

Returns

void

Description

设置效果,包括高亮、轮廓等

Inherited from

Note.setEffect


setFirstParentPath

setFirstParentPath(path): void

Parameters

NameType
pathstring

Returns

void

Description

设置FirstParent路径

Inherited from

Note.setFirstParentPath


setFirstPosition

setFirstPosition(position): void

Parameters

NameType
positionVector3

Returns

void

Description

设置第一个点位置

Inherited from

Note.setFirstPosition


setFrontShow

setFrontShow(frontShow): void

Parameters

NameType
frontShowboolean

Returns

void

Description

设置是否前端显示

Inherited from

Note.setFrontShow


setGuid

setGuid(guid): void

Parameters

NameType
guidstring

Returns

void

Description

设置guid

Inherited from

Note.setGuid


setId

setId(v): void

Parameters

NameTypeDescription
vnumberShapeId

Returns

void

Description

设置id

Inherited from

Note.setId


setImage

setImage(hotspotImagePath?): void

Parameters

NameType
hotspotImagePath?string

Returns

void

Description

设置热点图片


setImagePosition

setImagePosition(position): void

Parameters

NameType
positionVector3

Returns

void

Description

设置图片位置

Inherited from

Note.setImagePosition


setName

setName(name): void

Parameters

NameTypeDescription
namestring名称

Returns

void

Description

设置实例名称

Inherited from

Note.setName


setNeedClip

setNeedClip(isClip): void

Parameters

NameType
isClipboolean

Returns

void

Description

设置是否需要剖切

Inherited from

Note.setNeedClip


setObjectId

setObjectId(id): void

Parameters

NameType
idnumber

Returns

void

Description

设置ObjectId

Inherited from

Note.setObjectId


setPosition

setPosition(value): void

Parameters

NameType
valueVector3

Returns

void

Description

设置热点位置

Overrides

Note.setPosition


setScene

setScene(scene): void

Parameters

NameType
sceneScene

Returns

void

Description

设置场景

Inherited from

Note.setScene


setSecondParentPath

setSecondParentPath(path): void

Parameters

NameType
pathstring

Returns

void

Description

设置SecondParent路径

Inherited from

Note.setSecondParentPath


setSecondPosition

setSecondPosition(position): void

Parameters

NameType
positionVector3

Returns

void

Description

设置第二个点位置

Inherited from

Note.setSecondPosition


setSelected

setSelected(selected): void

Parameters

NameType
selectedboolean

Returns

void

Description

设置是否被选中

Inherited from

Note.setSelected


setShapeType

setShapeType(v): void

Parameters

NameTypeDescription
vShapeType类型

Returns

void

Description

设置类型

Inherited from

Note.setShapeType


setVisible

setVisible(visible, originVisible?): void

Parameters

NameTypeDescription
visibleboolean是否可见 boolean类型
originVisible?boolean-

Returns

void

Description

设置是否可见

Inherited from

Note.setVisible


setWorldTransform

setWorldTransform(matrix): void

Parameters

NameType
matrixMatrix4

Returns

void

Description

设置世界矩阵

Inherited from

Note.setWorldTransform


update

update(msg): void

Parameters

NameType
msgM3DMessage

Returns

void

Description

消息接收者必须实现方法

Inherited from

Note.update