• ArcEngine 3D开发之3D符号化——接口篇


    在三维开发中经常要用到3D符号的符号化。这里只探讨3D点的符号化,将做好的模型(.3ds)导入作为符号对点图层进行符号化处理,这里对3D符号的操作主要用到IMarker3DSymbol 接口以及IMarker3DPlacement 接口。图层的符号化则要用到IGeoFeatureLayer接口。

    首先来看OMD,如下图所示:




    OMD中我们可以看出Marker3DSymbol是一个CoClass,是一个可实例化类;Marker3DPlacement是一个抽象类,Marker3DSymbol继承了Marker3DPlacement类,它实现了IMarker3DSymbol接口。因此我们可以实例化一个Marker3DSymbol类:

     IMarker3DSymbol pMarker3DSymbol = new Marker3DSymbolClass();
    在VS的对象浏览器里我们可以看到


    Marker3DSymbolClass也实现了IIMarker3DPlacement接口,因而可以通过QI来设置3D符号的属性。

      IMarker3DSymbol marker3DSymbol_ = (pMarker3DSymbol as IClone).Clone() as IMarker3DSymbol;
                        IMarker3DPlacement pMarker3DPlacement = marker3DSymbol_ as IMarker3DPlacement;

    符号属性的设置以及唯一值渲染在后面的博文再介绍,本篇只介绍用到的接口。

    IMarker3DSymbol接口:Provides access to members that control the 3D marker symbol.(提供对控制3D符号成员的访问)

    The IMarker3DSymbol interface provides properties and methods to define 3D marker symbols. TheCreateFromFile method enbles import of existing OpenFlight (.flt), 3ds max* (.3ds), or Virtual Reality Markup Language (VRML*) models and then symbolize point features with these models. RestrictAccessToShape restricts the access to the geometry of a 3D marker symbol. IsRestrictedAccess indicates whether the geometry of the 3D Marker Symbol is restricted. UseMaterialDraping is used to display the symbols with or without texture materials.(IMarker3DSymbol接口提供了定义3D符号的属性和方法。通过CreateFromfile方法可以将flt,3ds,VRML格式的模型导入为3D符号对点要素进行符号化。

    我们主要用到的是IIMarker3DPlacement接口,用该接口对3D符号的尺寸,单位,偏移以及旋转角度进行设置。

















  • 相关阅读:
    VS2022修改默认字符集
    Unity 实现简单力场效果
    网页前端(Html)video播放m3u8(HLS)&Vue使用video.js播放m3u8
    ORACLE WITH AS 用法
    utf8和utf8mb4的区别
    mysql锁表原因及解决方法
    C#实现Stream、string、byte[]、文件、Bitmap、二进制之间的转换
    Spring循环依赖。为什么是三级缓存,二级不行吗?
    微信小程序 wx:for 遍历 Map集合
    Rust问题解决合集
  • 原文地址:https://www.cnblogs.com/giser-whu/p/3720018.html
Copyright © 2020-2023  润新知