Options
All
  • Public
  • Public/Protected
  • All
Menu

Class McEdGetPointWorldDrawObject

McEdGetPointWorldDrawObject 用于构建一个动态绘制回调对象

example
 Mx.McEdGetPointWorldDrawObject()

Hierarchy

  • McEdGetPointWorldDrawObject

Indexable

[x: string]: any

Index

Constructors

constructor

Methods

drawCircle

  • drawCircle(cen: Vector3, dRadius: number): void
  • 绘制圆

    example
    pWorldDraw.drawCircle(new HTREE.Vector3(0,100,5), 6)
    

    Parameters

    • cen: Vector3

      圆心位置

    • dRadius: number

      圆半径

    Returns void

    void

drawCustomEntity

  • drawCustomEntity(ent: any): void
  • 动态绘制一个自定义实体

    example
    
    

    Parameters

    • ent: any

    Returns void

drawEntity

  • drawEntity(ent: null | Object3D): void
  • 绘制一个Three.js对象.

    example
    pWorldDraw.drawEntity(new THREE.Object3D()))
    

    Parameters

    • ent: null | Object3D

      THREE.Object3D对象

    Returns void

    void

drawLine

  • drawLine(pt1: Vector3, pt2: Vector3): void
  • 绘制直线

    example
    pWorldDraw.drawLine(new HTREE.Vector3(0,100,5), new HTREE.Vector3(0,600,5))
    

    Parameters

    • pt1: Vector3

      开始点

    • pt2: Vector3

      结束点

    Returns void

    void

drawText

  • drawText(sText: string, iSize: number, dAngle: number, pt: Vector3): void
  • 绘制一个文档对象

    example
    pWorldDraw.drawText("字符串" ,36 ,90 ,new HTREE.Vector3(0,100,5))
    

    Parameters

    • sText: string

      文本

    • iSize: number

      大小

    • dAngle: number

      角度

    • pt: Vector3

      位置

    Returns void

    void

getColor

  • getColor(): void
  • 得到绘制对象颜色.

    example
    pWorldDraw.getColor()
    

    Returns void

    颜色

setColor

  • setColor(iColor: string | number | Color): void
  • 设置绘制对象颜色.

    example
    pWorldDraw.setColor(0xFFFFFF)
    

    Parameters

    • iColor: string | number | Color

      颜色

    Returns void

    void

setDraw

  • setDraw(call: (currentPoint: Vector3, pWorldDraw?: any) => void): void
  • 设置动态绘制回调函数。

    example
    pWorldDraw.setDraw((currentPoint, pWorldDraw)=> {

    })

    Parameters

    • call: (currentPoint: Vector3, pWorldDraw?: any) => void

      回调函数 currentPoint 回调参数 当前位置 pWorldDraw 回调参数文档绘制对象

        • (currentPoint: Vector3, pWorldDraw?: any): void
        • Parameters

          • currentPoint: Vector3
          • Optional pWorldDraw: any

          Returns void

    Returns void

    void