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

M3D / M3D / Shapes / Annotation

Class: Annotation

M3D.Shapes.Annotation

Memberof

M3D.Shapes

Description

批注

Date

2022-1-12

Version

1.0

Copyright

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

Hierarchy

  • Note

    Annotation

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Annotation(): Annotation

Returns

Annotation

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


addEnvelope

addEnvelope(): void

Returns

void

Description

添加包络


addImage

addImage(image): void

Parameters

NameType
imageImage

Returns

void

Description

添加图片对象

Overrides

Note.addImage


addLine

addLine(line): void

Parameters

NameType
lineLine

Returns

void

Description

添加线对象

Overrides

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

添加点对象

Overrides

Note.addPoint


addPolyLine

addPolyLine(polyLine): void

Parameters

NameType
polyLinePolyLine

Returns

void

Description

添加折线对象

Inherited from

Note.addPolyLine


addStubPolyLine

addStubPolyLine(): void

Returns

void

Description

添加引出线


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


getAnnotationType

getAnnotationType(): AnnotationType

Returns

AnnotationType

Description

获取批注类型


getAuthor

getAuthor(): string

Returns

string

Description

获取创建者

Inherited from

Note.getAuthor


getBoundingBox

getBoundingBox(): BoundingBox

Returns

BoundingBox

Description

获取包围盒

Inherited from

Note.getBoundingBox


getBroadPos

getBroadPos(): Vector2

Returns

Vector2

Description

获取批注固定位置


getCenterPos

getCenterPos(): Vector3

Returns

Vector3

centerPos

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

获取批注ID


getCreateId

getCreateId(): number

Returns

number

Description

获取createId

Inherited from

Note.getCreateId


getCreateTime

getCreateTime(): string

Returns

string

Description

获取创建时间

Inherited from

Note.getCreateTime


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


getFillColor

getFillColor(): Color

Returns

Color

Description

获取批注边框颜色


getFirstParentPath

getFirstParentPath(): string

Returns

string

Description

获取FirstParent路径

Inherited from

Note.getFirstParentPath


getFirstPosition

getFirstPosition(): Vector3

Returns

Vector3

Description

获取第一个点位置

Inherited from

Note.getFirstPosition


getFrameColor

getFrameColor(): Color

Returns

Color

Description

获取批注边框颜色


getFrameLineList

getFrameLineList(): PolyLine[]

Returns

PolyLine[]

Description

获取边框线对象

Inherited from

Note.getFrameLineList


getGap

getGap(): number

Returns

number

Description

拖拽批注时使用的临时距离变量


getGuid

getGuid(): string

Returns

string

Description

获取guid

Inherited from

Note.getGuid


getHaveEnvelope

getHaveEnvelope(): boolean

Returns

boolean

Description

获取批注是否有包络


getHaveLeader

getHaveLeader(): boolean

Returns

boolean

Description

获取批注是否有引线


getHaveStub

getHaveStub(): boolean

Returns

boolean

Description

获取批注是否有stub


getId

getId(): number

Returns

number

Description

获取id

Inherited from

Note.getId


getImageList

getImageList(): Image[]

Returns

Image[]

Description

获取显示图片列表

Inherited from

Note.getImageList


getIsFixed

getIsFixed(): boolean

Returns

boolean

Description

获取批注是否有固定


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


getParentModel

getParentModel(): Model

Returns

Model

Description

获取父级模型


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


getPosAverage

getPosAverage(): number

Returns

number

Description

获取文本位置


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

获取批注类型

Overrides

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


getText

getText(): string

Returns

string

Description

获取批注文本


getTextFontColor

getTextFontColor(): Color

Returns

Color

Description

获取批注文本颜色


getTextFontName

getTextFontName(): string

Returns

string

Description

获取批注字体名称


getTextFontSize

getTextFontSize(): number

Returns

number

Description

获取批注字体大小


getTextValue

getTextValue(): string

Returns

string

Description

获取文本内容

Overrides

Note.getTextValue


getTextsPos

getTextsPos(): Vector3

Returns

Vector3

Description

文本位置


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

NameTypeDescription
msgM3DMessage消息信息

Returns

void

Description

发送消息

Overrides

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

NameTypeDescription
msgM3DMessage消息信息

Returns

void

Description

发送消息

Overrides

Note.send


sendClipMessage

sendClipMessage(): void

Returns

void

Description

发送剖切更新消息

Inherited from

Note.sendClipMessage


sendEffectMessage

sendEffectMessage(): void

Returns

void

Description

发送特效更新消息

Overrides

Note.sendEffectMessage


setAlpha

setAlpha(alpha): void

Parameters

NameType
alphanumber

Returns

void

Description

设置透明度

Inherited from

Note.setAlpha


setAnnotationType

setAnnotationType(annotationType): void

Parameters

NameType
annotationTypeAnnotationType

Returns

void

Description

设置批注类型


setAuthor

setAuthor(author): void

Parameters

NameType
authorstring

Returns

void

Description

设置创建者

Inherited from

Note.setAuthor


setBackgroundShape

setBackgroundShape(camera): void

Parameters

NameType
cameraCamera

Returns

void

Description

根据边框线设置和计算背景mesh


setBroadPos

setBroadPos(broadPos): void

Parameters

NameType
broadPosVector2

Returns

void

Description

设置批注固定位置


setCenterPos

setCenterPos(pos): void

Parameters

NameType
posVector3

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

设置批注ID


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


setEffect

setEffect(effectType): void

Parameters

NameType
effectTypenumber

Returns

void

Description

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

Inherited from

Note.setEffect


setFillColor

setFillColor(fillColor): void

Parameters

NameType
fillColorColor

Returns

void

Description

设置批注填充颜色


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


setFrameColor

setFrameColor(frameColor): void

Parameters

NameType
frameColorColor

Returns

void

Description

设置批注边框颜色


setFrontShow

setFrontShow(frontShow): void

Parameters

NameType
frontShowboolean

Returns

void

Description

设置是否前端显示

Inherited from

Note.setFrontShow


setGap

setGap(data): void

Parameters

NameType
datanumber

Returns

void

Description

设置拖拽批注时使用的临时距离变量


setGuid

setGuid(guid): void

Parameters

NameType
guidstring

Returns

void

Description

设置guid

Inherited from

Note.setGuid


setHaveEnvelope

setHaveEnvelope(envelope): void

Parameters

NameType
envelopeboolean

Returns

void

Description

设置批注是否有包络


setHaveLeader

setHaveLeader(leaderLine): void

Parameters

NameType
leaderLineboolean

Returns

void

Description

设置批注是否有引线


setHaveStub

setHaveStub(stub): void

Parameters

NameType
stubboolean

Returns

void

Description

设置批注是否有stub


setId

setId(v): void

Parameters

NameTypeDescription
vnumberShapeId

Returns

void

Description

设置id

Inherited from

Note.setId


setImagePosition

setImagePosition(position): void

Parameters

NameType
positionVector3

Returns

void

Description

设置图片位置

Inherited from

Note.setImagePosition


setIsFixed

setIsFixed(fixed): void

Parameters

NameType
fixedboolean

Returns

void

Description

设置批注是否有固定


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


setParentModel

setParentModel(parentModel): void

Parameters

NameType
parentModelModel

Returns

void

Description

设置父级模型


setPointSize

setPointSize(size): void

Parameters

NameType
sizenumber

Returns

void

Description

设置点大小


setPosAverage

setPosAverage(fTextPos): void

Parameters

NameType
fTextPosnumber

Returns

void

Description

设置文本位置


setPosition

setPosition(pos): void

Parameters

NameType
posVector3

Returns

void

Description

设置批注位置

Overrides

Note.setPosition


setScene

setScene(scene): void

Parameters

NameType
sceneScene

Returns

void

Description

设置批注场景

Overrides

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


setStubPolyLine

setStubPolyLine(camera): void

Parameters

NameType
cameraCamera

Returns

void

Description

根据引线进行折弯设置


setText

setText(text): void

Parameters

NameType
textstring

Returns

void

Description

设置批注文本


setTextFontColor

setTextFontColor(textColor): void

Parameters

NameType
textColorColor

Returns

void

Description

设置批注文本颜色


setTextFontName

setTextFontName(fontName): void

Parameters

NameType
fontNamestring

Returns

void

Description

设置批注字体名称


setTextFontSize

setTextFontSize(fontSize): void

Parameters

NameType
fontSizenumber

Returns

void

Description

设置批注字体大小


setTextSize

setTextSize(camera, textValue): void

Parameters

NameType
cameraCamera
textValuestring

Returns

void

Description

根据模型的渲染进行字体大小调整


setTextsPos

setTextsPos(pos): void

Parameters

NameType
posVector3

Returns

void

Description

文本位置


setVisible

setVisible(visible, originVisible?): void

Parameters

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

Returns

void

Description

设置是否可见

Overrides

Note.setVisible


setWorldTransform

setWorldTransform(matrix): void

Parameters

NameType
matrixMatrix4

Returns

void

Description

设置世界矩阵

Inherited from

Note.setWorldTransform


update

update(msg): void

Parameters

NameTypeDescription
msgM3DMessage消息信息

Returns

void

Description

更新消息

Overrides

Note.update