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

M3D / M3D / Shapes / CrossSection

Class: CrossSection

M3D.Shapes.CrossSection

File

Brief

Author

横截面

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 CrossSection(origin, normal, uDir, vDir): CrossSection

Parameters

NameType
originVector3
normalVector3
uDirVector3
vDirVector3

Returns

CrossSection

Description

构造函数

Inherited from

SectionPlane.constructor

new CrossSection(origin, normal): CrossSection

Parameters

NameType
originVector3
normalVector3

Returns

CrossSection

Description

构造函数

Inherited from

SectionPlane.constructor

new CrossSection(): CrossSection

Returns

CrossSection

Inherited from

SectionPlane.constructor

Properties

absNormal

absNormal: Vector3

Inherited from

SectionPlane.absNormal


crossSections

crossSections: CrossSection[]

Inherited from

SectionPlane.crossSections


d

d: number

Inherited from

SectionPlane.d


dirtyEdge

dirtyEdge: number

Inherited from

SectionPlane.dirtyEdge


figureSectionLines

figureSectionLines: FigureSectionLine

Inherited from

SectionPlane.figureSectionLines


id

id: number

Inherited from

SectionPlane.id


sectionLineRoot

sectionLineRoot: SectionLine

Inherited from

SectionPlane.sectionLineRoot


sectionLinesDataBase

sectionLinesDataBase: SectionDataBase

Inherited from

SectionPlane.sectionLinesDataBase


showEdge

showEdge: boolean

Inherited from

SectionPlane.showEdge


count

Static count: number

Inherited from

SectionPlane.count


isProto

Static isProto: string

Inherited from

SectionPlane.isProto


pVertexHeader

Static pVertexHeader: string

Inherited from

SectionPlane.pVertexHeader

Accessors

isProto

get isProto(): boolean

Returns

boolean

Description

获取是否为原型对象

Inherited from

SectionPlane.isProto

set isProto(v): void

Parameters

NameType
vboolean

Returns

void

Description

设置是否为原型对象

Inherited from

SectionPlane.isProto

Methods

addEffect

addEffect(effectType): void

Parameters

NameType
effectTypenumber

Returns

void

Description

添加特效效果

Inherited from

SectionPlane.addEffect


calMatrixByPntXZAxis

calMatrixByPntXZAxis(point, nvec, baseX, matrix): number

Parameters

NameType
pointnumber[]
nvecnumber[]
baseXnumber[]
matrixMatrix3x4

Returns

number

Deprecated

Inherited from

SectionPlane.calMatrixByPntXZAxis


clearFigureSectionLines

clearFigureSectionLines(): void

Returns

void

Description

清除剖切轮廓线数据

Inherited from

SectionPlane.clearFigureSectionLines


clearSectionLineDataBse

clearSectionLineDataBse(): void

Returns

void

Description

清除剖切线数据库的数据

Inherited from

SectionPlane.clearSectionLineDataBse


copy

copy(sectionPlane): void

Parameters

NameType
sectionPlaneSectionPlane

Returns

void

Description

剖切面数据拷贝

Inherited from

SectionPlane.copy


expandClpPlane

expandClpPlane(sbMinPnt, sbMaxPnt): void

Parameters

NameType
sbMinPntVector3
sbMaxPntVector3

Returns

void

Deprecated

扩展剖切平面

Inherited from

SectionPlane.expandClpPlane


getAlpha

getAlpha(): number

Returns

number

Description

获取透明度

Inherited from

SectionPlane.getAlpha


getBoundingBox

getBoundingBox(): BoundingBox

Returns

BoundingBox

Description

获取包围盒

Inherited from

SectionPlane.getBoundingBox


getCappingColor

getCappingColor(): Color

Returns

Color

Description

获取剖切盖面颜色

Inherited from

SectionPlane.getCappingColor


getCenterPoint

getCenterPoint(): Vector3

Returns

Vector3

Description

获取中心点

Inherited from

SectionPlane.getCenterPoint


getColor

getColor(): Color

Returns

Color

Description

获取颜色

Inherited from

SectionPlane.getColor


getDrawables

getDrawables(): void

Returns

void

Description

获取渲染数据

Inherited from

SectionPlane.getDrawables


getEdgeColor

getEdgeColor(): Color

Returns

Color

Description

获取剖切面边线的颜色

Inherited from

SectionPlane.getEdgeColor


getEffect

getEffect(): number

Returns

number

Description

获取效果

Inherited from

SectionPlane.getEffect


getEnable

getEnable(): boolean

Returns

boolean

Description

获取是否显示

Inherited from

SectionPlane.getEnable


getEquation

getEquation(): number[]

Returns

number[]

Description

获取平面参数,用于glClipPlane

Inherited from

SectionPlane.getEquation


getEvents

getEvents(): M3DEvent[]

Returns

M3DEvent[]

Description

获得事件列表

Inherited from

SectionPlane.getEvents


getFaceColor

getFaceColor(): Color

Returns

Color

Description

获取剖切面的颜色

Inherited from

SectionPlane.getFaceColor


getId

getId(): number

Returns

number

Description

获取id

Inherited from

SectionPlane.getId


getInsectPnt

getInsectPnt(origin, dir): Vector3

Parameters

NameType
originVector3
dirVector3

Returns

Vector3

Description

获取交点

Inherited from

SectionPlane.getInsectPnt


getIsDirty

getIsDirty(): boolean

Returns

boolean

Description

获取脏标记

Inherited from

SectionPlane.getIsDirty


getIsFrontShow

getIsFrontShow(): boolean

Returns

boolean

Description

获取是否前端显示

Inherited from

SectionPlane.getIsFrontShow


getIsSectionBox

getIsSectionBox(): boolean

Returns

boolean

Description

获取是否为Box剖切

Inherited from

SectionPlane.getIsSectionBox


getLocalTransform

getLocalTransform(): Matrix4

Returns

Matrix4

Description

获取shape的局部矩阵

Inherited from

SectionPlane.getLocalTransform


getModelWidthAndLength

getModelWidthAndLength(): Map<string, number>

Returns

Map<string, number>

Description

获取模型长宽高

Inherited from

SectionPlane.getModelWidthAndLength


getName

getName(): string

Returns

string

Description

获取剖切面名称

Inherited from

SectionPlane.getName


getNeedClip

getNeedClip(): boolean

Returns

boolean

Description

获取是否需要剖切

Inherited from

SectionPlane.getNeedClip


getNormalArray

getNormalArray(): Vector3[]

Returns

Vector3[]

Description

得到显示面的顶点法线值

Inherited from

SectionPlane.getNormalArray


getObjectId

getObjectId(): number

Returns

number

Description

获取ObjectId

Inherited from

SectionPlane.getObjectId


getOriShowCappingPlane

getOriShowCappingPlane(): boolean

Returns

boolean

Description

获取剖切盖面的初始显示标示

Inherited from

SectionPlane.getOriShowCappingPlane


getOriShowClipPlane

getOriShowClipPlane(): boolean

Returns

boolean

Description

获取剖切盖面的初始显示标示

Inherited from

SectionPlane.getOriShowClipPlane


getParam

getParam(): void

Returns

void

Description

根据法线计算参数

Inherited from

SectionPlane.getParam


getParameters

getParameters(): ShapeParameter[]

Returns

ShapeParameter[]

Description

获取渲染参数

Inherited from

SectionPlane.getParameters


getPointArray

getPointArray(): Vector3[]

Returns

Vector3[]

Description

得到要显示面的顶点坐标值

Inherited from

SectionPlane.getPointArray


getPosition

getPosition(): Vector3

Returns

Vector3

Description

获取剖面位置

Inherited from

SectionPlane.getPosition


getProgress

getProgress(): number

Returns

number

Description

获取剖切进度

Inherited from

SectionPlane.getProgress


getProperties

getProperties(): PropertySet

Returns

PropertySet

Description

获取属性管理器

Inherited from

SectionPlane.getProperties


getProto

getProto(): Shape

Returns

Shape

Description

获取原型

Inherited from

SectionPlane.getProto


getRenderShapes

getRenderShapes(): RenderableShape[]

Returns

RenderableShape[]

Description

获取可绘制对象列表

Inherited from

SectionPlane.getRenderShapes


getReverseClip

getReverseClip(): boolean

Returns

boolean

Description

获取是否反向剖切

Inherited from

SectionPlane.getReverseClip


getRotation

getRotation(): Quaternion

Returns

Quaternion

Description

获取旋转四元数

Inherited from

SectionPlane.getRotation


getScene

getScene(): Scene

Returns

Scene

场景对象

Description

获取场景对象

Inherited from

SectionPlane.getScene


getSceneBox

getSceneBox(): BoundingBox

Returns

BoundingBox

Description

获取场景包围盒

Inherited from

SectionPlane.getSceneBox


getSectionBox

getSectionBox(): SectionBox

Returns

SectionBox

Description

获取Box剖切对象

Inherited from

SectionPlane.getSectionBox


getSectionLine

getSectionLine(): FigureSectionLine

Returns

FigureSectionLine

Description

获取轮廓线

Inherited from

SectionPlane.getSectionLine


getSectionLineColor

getSectionLineColor(): Color

Returns

Color

Description

获取剖切轮廓线颜色

Inherited from

SectionPlane.getSectionLineColor


getSectionLineInfo

getSectionLineInfo(): Map<string, number>

Returns

Map<string, number>

Description

获取剖切轮廓线数据信息

Inherited from

SectionPlane.getSectionLineInfo


getSelectedModelList

getSelectedModelList(): Shape[]

Returns

Shape[]

Description

获取指定剖切的模型集

Inherited from

SectionPlane.getSelectedModelList


getSelectedModelPath

getSelectedModelPath(): any

Returns

any

Description

获取指定剖模型路径

Inherited from

SectionPlane.getSelectedModelPath


getShaderProgramName

getShaderProgramName(): string

Returns

string

Description

获取渲染用program名字

Inherited from

SectionPlane.getShaderProgramName


getShapeType

getShapeType(): ShapeType

Returns

ShapeType

Description

获取Shape类型

Inherited from

SectionPlane.getShapeType


getShowCappingPlane

getShowCappingPlane(): boolean

Returns

boolean

Description

获取剖切盖面的显示标示

Inherited from

SectionPlane.getShowCappingPlane


getShowClipPlane

getShowClipPlane(): boolean

Returns

boolean

Description

获取剖切盖面的显示标示

Inherited from

SectionPlane.getShowClipPlane


getShowCutPlane

getShowCutPlane(): boolean

Returns

boolean

Description

获取是否显示剖切面

Inherited from

SectionPlane.getShowCutPlane


getShowPlaneRect

getShowPlaneRect(): boolean

Returns

boolean

Description

获取剖切面的辅助面的显示标示

Inherited from

SectionPlane.getShowPlaneRect


getShowSectionLine

getShowSectionLine(): boolean

Returns

boolean

Description

获取是否显示轮廓线

Inherited from

SectionPlane.getShowSectionLine


getStates

getStates(): ShapeParameter[]

Returns

ShapeParameter[]

Description

获取状态

Inherited from

SectionPlane.getStates


getTextureObject

getTextureObject(): ShapeParameter[]

Returns

ShapeParameter[]

Description

获取纹理数据

Inherited from

SectionPlane.getTextureObject


getTransformPlaneParam

getTransformPlaneParam(): number[]

Returns

number[]

Description

获取剖切面变换参数

Inherited from

SectionPlane.getTransformPlaneParam


getType

getType(): ShapeType

Returns

ShapeType

Description

获取类型

Inherited from

SectionPlane.getType


getVertexHeader

getVertexHeader(): VertexHeader

Returns

VertexHeader

Description

获取vertexHeader

Inherited from

SectionPlane.getVertexHeader


getVertexSet

getVertexSet(): VertexSet

Returns

VertexSet

Description

获取vertexSet

Inherited from

SectionPlane.getVertexSet


getWorldBoundingBox

getWorldBoundingBox(): BoundingBox

Returns

BoundingBox

Description

获取世界包围盒

Inherited from

SectionPlane.getWorldBoundingBox


getWorldTransform

getWorldTransform(): Matrix4

Returns

Matrix4

Description

获取shape的世界矩阵

Inherited from

SectionPlane.getWorldTransform


init

init(): void

Returns

void

Description

初始化剖切面

Inherited from

SectionPlane.init


intersect

intersect(ray, intersectPnt): boolean

Parameters

NameType
rayRay
intersectPntVector3

Returns

boolean

Deprecated

Description

判断剖切面与射线是否相交

Inherited from

SectionPlane.intersect


isNeedUpdate

isNeedUpdate(): boolean

Returns

boolean

Description

获取是否需要更新Buffer数据

Inherited from

SectionPlane.isNeedUpdate


isPlaneAvaliable

isPlaneAvaliable(): boolean

Returns

boolean

Description

获取平面是否可用

Inherited from

SectionPlane.isPlaneAvaliable


isPreSelected

isPreSelected(): boolean

Returns

boolean

Description

是否预选中

Inherited from

SectionPlane.isPreSelected


isSelected

isSelected(): boolean

Returns

boolean

Description

是否被选中

Inherited from

SectionPlane.isSelected


isVisible

isVisible(orginVisible?): boolean

Parameters

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

Returns

boolean

Description

获取可见性

Inherited from

SectionPlane.isVisible


markDirty

markDirty(): void

Returns

void

Description

设置脏标记

Inherited from

SectionPlane.markDirty


post

post(msg): void

Parameters

NameType
msgM3DMessage

Returns

void

Description

消息发送者必须实现方法

Inherited from

SectionPlane.post


registerEvent

registerEvent(event): void

Parameters

NameTypeDescription
eventM3DEventM3D事件

Returns

void

Description

注册事件

Inherited from

SectionPlane.registerEvent


removeEffect

removeEffect(effectType): void

Parameters

NameType
effectTypeEffectType

Returns

void

Description

移除效果

Inherited from

SectionPlane.removeEffect


removeEvent

removeEvent(): void

Returns

void

Description

删除事件

Inherited from

SectionPlane.removeEvent


send

send(msg): void

Parameters

NameType
msgM3DMessage

Returns

void

Description

消息发送者必须实现方法

Inherited from

SectionPlane.send


sendClipMessage

sendClipMessage(): void

Returns

void

Description

发送剖切更新消息

Inherited from

SectionPlane.sendClipMessage


sendEffectMessage

sendEffectMessage(): void

Returns

void

Description

发送特效更新消息

Inherited from

SectionPlane.sendEffectMessage


sendUpdateMessage

sendUpdateMessage(): void

Returns

void

Description

发送剖切更新消息

Inherited from

SectionPlane.sendUpdateMessage


setAlpha

setAlpha(alpha): void

Parameters

NameType
alphanumber

Returns

void

Description

设置透明度

Inherited from

SectionPlane.setAlpha


setBox

setBox(box): void

Parameters

NameType
boxBoundingBox

Returns

void

Description

设置包围盒

Inherited from

SectionPlane.setBox


setCappingColor

setCappingColor(color): void

Parameters

NameType
colorColor

Returns

void

Description

设置剖切盖面颜色

Inherited from

SectionPlane.setCappingColor


setCenterPoint

setCenterPoint(centerPoint): void

Parameters

NameType
centerPointVector3

Returns

void

Description

设置中心点

Inherited from

SectionPlane.setCenterPoint


setColor

setColor(color): void

Parameters

NameType
colorColor

Returns

void

Description

设置颜色

Inherited from

SectionPlane.setColor


setDraggerTransform

setDraggerTransform(transform): void

Parameters

NameType
transformMatrix3x4

Returns

void

Description

通过矩阵变换剖面的位置

Inherited from

SectionPlane.setDraggerTransform


setDrawPlane

setDrawPlane(box): any

Parameters

NameType
boxBoundingBox

Returns

any

Description

设置绘制平面

Inherited from

SectionPlane.setDrawPlane

setDrawPlane(center, size): any

Parameters

NameType
centerVector3
sizeVector2

Returns

any

Description

设置绘制平面

Inherited from

SectionPlane.setDrawPlane


setEdgeColor

setEdgeColor(color): void

Parameters

NameType
colorColor

Returns

void

Description

设置剖切面边线的颜色

Inherited from

SectionPlane.setEdgeColor


setEffect

setEffect(effectType): void

Parameters

NameType
effectTypenumber

Returns

void

Description

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

Inherited from

SectionPlane.setEffect


setEnable

setEnable(enable): void

Parameters

NameType
enableboolean

Returns

void

Description

获取是否显示

Inherited from

SectionPlane.setEnable


setFaceColor

setFaceColor(color): void

Parameters

NameType
colorColor

Returns

void

Description

设置剖切面的颜色

Inherited from

SectionPlane.setFaceColor


setFrontShow

setFrontShow(frontShow): void

Parameters

NameType
frontShowboolean

Returns

void

Description

设置是否前端显示

Inherited from

SectionPlane.setFrontShow


setId

setId(v): void

Parameters

NameTypeDescription
vnumberShapeId

Returns

void

Description

设置id

Inherited from

SectionPlane.setId


setIsSectionBox

setIsSectionBox(value): void

Parameters

NameType
valueboolean

Returns

void

Description

设置是否为Box剖切

Inherited from

SectionPlane.setIsSectionBox


setName

setName(name): void

Parameters

NameType
namestring

Returns

void

Description

设置剖切面名称

Inherited from

SectionPlane.setName


setNeedClip

setNeedClip(isClip): void

Parameters

NameType
isClipboolean

Returns

void

Description

设置是否需要剖切

Inherited from

SectionPlane.setNeedClip


setNeedUpdate

setNeedUpdate(update): void

Parameters

NameType
updateboolean

Returns

void

Description

设置是否需要更新Buffer数据

Inherited from

SectionPlane.setNeedUpdate


setNorPos

setNorPos(pos): void

Parameters

NameType
posVector3

Returns

void

Description

设置剖切面法向

Inherited from

SectionPlane.setNorPos


setObjectId

setObjectId(id): void

Parameters

NameType
idnumber

Returns

void

Description

设置ObjectId

Inherited from

SectionPlane.setObjectId


setOriPos

setOriPos(pos): void

Parameters

NameType
posVector3

Returns

void

Description

设置剖切面原始位置

Inherited from

SectionPlane.setOriPos


setOriShowCappingPlane

setOriShowCappingPlane(flag): void

Parameters

NameType
flagboolean

Returns

void

Description

设置剖切盖面的初始显示标示

Inherited from

SectionPlane.setOriShowCappingPlane


setOriShowClipPlane

setOriShowClipPlane(flag): void

Parameters

NameType
flagboolean

Returns

void

Description

设置剖切盖面的初始显示标示

Inherited from

SectionPlane.setOriShowClipPlane


setPlaneParam

setPlaneParam(a, b, c, d): void

Parameters

NameType
anumber
bnumber
cnumber
dnumber

Returns

void

Description

设置平面参数

Inherited from

SectionPlane.setPlaneParam


setPosition

setPosition(position): void

Parameters

NameType
positionVector3

Returns

void

Description

设置剖面位置

Inherited from

SectionPlane.setPosition


setProgress

setProgress(value): void

Parameters

NameType
valuenumber

Returns

void

Description

设置剖切进度

Inherited from

SectionPlane.setProgress


setReverseClip

setReverseClip(flag): void

Parameters

NameType
flagboolean

Returns

void

Description

设置是否反向剖切

Inherited from

SectionPlane.setReverseClip


setScene

setScene(scene): void

Parameters

NameType
sceneScene

Returns

void

Description

设置场景

Inherited from

SectionPlane.setScene


setSceneBox

setSceneBox(box): void

Parameters

NameType
boxBoundingBox

Returns

void

Description

设置场景包围盒

Inherited from

SectionPlane.setSceneBox


setSectionBox

setSectionBox(value): void

Parameters

NameType
valueSectionBox

Returns

void

Description

设置Box剖切对象

Inherited from

SectionPlane.setSectionBox


setSectionLineColor

setSectionLineColor(color): void

Parameters

NameType
colorColor

Returns

void

Description

设置剖切轮廓线颜色

Inherited from

SectionPlane.setSectionLineColor


setSelected

setSelected(selected): void

Parameters

NameType
selectedboolean

Returns

void

Description

设置是否被选中

Inherited from

SectionPlane.setSelected


setSelectedModelList

setSelectedModelList(modelList): void

Parameters

NameType
modelListShape[]

Returns

void

Description

设置指定剖切模型集合

Inherited from

SectionPlane.setSelectedModelList


setSelectedModelPath

setSelectedModelPath(selectedModelPath): void

Parameters

NameType
selectedModelPathany

Returns

void

Description

设置指定剖模型路径

Inherited from

SectionPlane.setSelectedModelPath


setShaderProgramName

setShaderProgramName(name): void

Parameters

NameType
namestring

Returns

void

Description

设置渲染用program名字

Inherited from

SectionPlane.setShaderProgramName


setShapeType

setShapeType(v): void

Parameters

NameTypeDescription
vShapeType类型

Returns

void

Description

设置类型

Inherited from

SectionPlane.setShapeType


setShowCappingPlane

setShowCappingPlane(flag): void

Parameters

NameType
flagboolean

Returns

void

Description

设置剖切盖面显示标示

Inherited from

SectionPlane.setShowCappingPlane


setShowClipPlane

setShowClipPlane(flag): void

Parameters

NameType
flagboolean

Returns

void

Description

设置剖切盖面的显示标示

Inherited from

SectionPlane.setShowClipPlane


setShowCutPlane

setShowCutPlane(flag): void

Parameters

NameType
flagboolean

Returns

void

Description

设置是否显示剖切面

Inherited from

SectionPlane.setShowCutPlane


setShowPlaneRect

setShowPlaneRect(flag): void

Parameters

NameType
flagboolean

Returns

void

Description

设置剖切面的辅助面显示标示

Inherited from

SectionPlane.setShowPlaneRect


setShowSectionLine

setShowSectionLine(isShow): void

Parameters

NameType
isShowboolean

Returns

void

Description

设置是否显示轮廓线

Inherited from

SectionPlane.setShowSectionLine


setTransform

setTransform(position, rotation): any

Parameters

NameType
positionVector3
rotationQuaternion

Returns

any

Description

设置变换参数

Inherited from

SectionPlane.setTransform

setTransform(position, rotation, scale): any

Parameters

NameType
positionVector3
rotationQuaternion
scalenumber

Returns

any

Description

设置变换参数

Inherited from

SectionPlane.setTransform

setTransform(position, rotation, scale): any

Parameters

NameType
positionVector3
rotationQuaternion
scaleVector3

Returns

any

Description

设置变换参数

Inherited from

SectionPlane.setTransform

setTransform(transform): any

Parameters

NameType
transformMatrix3x4

Returns

any

Description

设置变换参数

Inherited from

SectionPlane.setTransform


setVisible

setVisible(visible, originVisible?): void

Parameters

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

Returns

void

Description

设置是否可见

Inherited from

SectionPlane.setVisible


setWorldTransform

setWorldTransform(matrix): void

Parameters

NameType
matrixMatrix4

Returns

void

Description

设置世界矩阵

Inherited from

SectionPlane.setWorldTransform


update

update(msg): void

Parameters

NameTypeDescription
msgM3DMessage消息信息

Returns

void

Description

更新消息

Inherited from

SectionPlane.update


updateDrawData

updateDrawData(): void

Returns

void

Description

更新绘制数据

Inherited from

SectionPlane.updateDrawData