Skip to content
On this page

mxcad_3d API 文档 / Mx3dView

Class: Mx3dView

管理对象生命周期的基类

Hierarchy

Table of contents

Methods

Methods

addModelTexture

addModelTexture(theFileName): void

为当前选中对象设置纹理贴图

Parameters

NameTypeDescription
theFileNamestring图片在文件系统中的完整路径

Returns

void


displayDimension

displayDimension(theDimension): void

显示标注符号

Parameters

NameTypeDescription
theDimensionMx3dDimObject标注符号对象

Returns

void


displaySymbolText

displaySymbolText(theSymbol): void

显示文字符号

Parameters

NameTypeDescription
theSymbolMx3dSymbolText文字符号对象

Returns

void


enableCustomClipPlane

enableCustomClipPlane(theToEnabled): void

开启/关闭用户自定义剖切面

Parameters

NameTypeDescription
theToEnabledboolean是否开启用户自定义剖切面

Returns

void


enableDirLightSrc

enableDirLightSrc(theToEnabled): void

Parameters

NameType
theToEnabledboolean

Returns

void


enableXClipPlane

enableXClipPlane(theToEnabled): void

开启/关闭X轴剖切面

Parameters

NameTypeDescription
theToEnabledboolean是否开启X轴剖切面

Returns

void


enableYClipPlane

enableYClipPlane(theToEnabled): void

开启/关闭Y轴剖切面

Parameters

NameTypeDescription
theToEnabledboolean是否开启Y轴剖切面

Returns

void


enableZClipPlane

enableZClipPlane(theToEnabled): void

开启/关闭Z轴剖切面

Parameters

NameTypeDescription
theToEnabledboolean是否开启Z轴剖切面

Returns

void


fitAllObjects

fitAllObjects(theAuto): void

视图中的所有对象缩放至适应整个视图

Parameters

NameTypeDescription
theAutoboolean自动缩放

Returns

void


getDocument

getDocument(): Mx3dDbDocument

获取当前文档视图对象的文档

Returns

Mx3dDbDocument

返回文档对象


removeAll

removeAll(theUpdateView?): void

移除所有

Parameters

NameTypeDefault valueDescription
theUpdateViewbooleantrue移除后是否立即更新视图

Returns

void


removeModelTexture

removeModelTexture(): void

移除当前选择对象的纹理贴图

Returns

void


removeSelected

removeSelected(): void

移除选中

Returns

void


setCubemapBackground

setCubemapBackground(theRight, theLeft, theTop, theBottom, theFront, theBack): void

Parameters

NameType
theRightstring
theLeftstring
theTopstring
theBottomstring
theFrontstring
theBackstring

Returns

void


setCustomClipPlaneDirection

setCustomClipPlaneDirection(x, y, z): void

设置用户自定义剖切面的法向

Parameters

NameTypeDescription
xnumber法向的x分量
ynumber法向的y分量
znumber法向的z分量

Returns

void


setCustomClipPlanePosition

setCustomClipPlanePosition(thePosition): void

设置用户自定义剖切面的位置

Parameters

NameTypeDescription
thePositionnumber剖切平面相对于世界坐标系原点的位置

Returns

void


setCustomClipPlaneReverse

setCustomClipPlaneReverse(): void

翻转用户自定义剖切面

Returns

void


setDisplayMode

setDisplayMode(theMode): void

设置当前的显示模式

Parameters

NameTypeDescription
theModeMxGlobalDisplayMode显示模式

Returns

void


setGradientBgColor

setGradientBgColor(theColor1, theColor2, theMethod): void

设置渐变背景色

Parameters

NameTypeDescription
theColor1Mx3dGeColor颜色对象1
theColor2Mx3dGeColor颜色对象2
theMethodMxGradientFillMethod渐变方式

Returns

void


setManipulatorEnabled

setManipulatorEnabled(isEnabled): void

Parameters

NameType
isEnabledboolean

Returns

void


setProj

setProj(theOrientation, theIsYup): void

设置视图方向

Parameters

NameTypeDescription
theOrientationMxV3dTypeOfOrientation视图方向
theIsYupboolean是否Y轴向上

Returns

void


setProjectionType

setProjectionType(theProjection): void

设置视图投影模式

Parameters

NameTypeDescription
theProjectionMxCameraProjection投影模式

Returns

void


setSelectedColor

setSelectedColor(color): void

设置当前选中对象的颜色

Parameters

NameTypeDescription
colorMx3dGeColor颜色

Returns

void


setSelectedMaterial

setSelectedMaterial(material): void

设置选中对象的材质

Parameters

NameTypeDescription
materialMx3dGeMaterial材质

Returns

void


setXClipPlaneReverse

setXClipPlaneReverse(): void

翻转X轴剖切面

Returns

void


setXClipPlaneXPosition

setXClipPlaneXPosition(thePosition): void

设置X轴剖切面的位置

Parameters

NameTypeDescription
thePositionnumber剖切平面相对于世界坐标系原点的位置

Returns

void


setYClipPlaneReverse

setYClipPlaneReverse(): void

翻转Y轴剖切面

Returns

void


setYClipPlaneYPosition

setYClipPlaneYPosition(thePosition): void

设置Y轴剖切面的位置

Parameters

NameTypeDescription
thePositionnumber剖切平面相对于世界坐标系原点的位置

Returns

void


setZClipPlaneReverse

setZClipPlaneReverse(): void

翻转Z轴剖切面

Returns

void


setZClipPlaneZPosition

setZClipPlaneZPosition(thePosition): void

设置Z轴剖切面的位置

Parameters

NameTypeDescription
thePositionnumber剖切平面相对于世界坐标系原点的位置

Returns

void


showCenterTrihedron

showCenterTrihedron(theToShow): void

显示中心坐标轴

Parameters

NameTypeDescription
theToShowbooleantrue显示,false不显示

Returns

void


update

update(isUpAllData?, isRemoveAll?): void

更新显示

Parameters

NameTypeDefault valueDescription
isUpAllDatabooleantrue是否更新所有数据
isRemoveAllbooleantrue是否首先移除所有数据

Returns

void