Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PartLines

A part that can show lines in a MarkupModel.

Use MarkupModel.addLinesPart to create a new instance of this class.

Hierarchy

Index

Accessors

color

color: Color3Like

The single color of the part

customData

customData: any

Custom data for the part. This field is not used by EnvisionWeb.

lineWidth

lineWidth: number

Controls the line width (pixels)

terminatorDrawMode

terminatorDrawMode: LineTerminatorDrawMode

The line terminator draw mode

Methods

clearTerminators

  • clearTerminators(): void
  • Clear start and end terminators

    Returns void

rayIntersect

setArrowEndTerminator

  • setArrowEndTerminator(arrowHeadLengthInPixels: number, arrowHeadWidthInPixels: number): void
  • Draw arrows at end of lines

    Parameters

    • arrowHeadLengthInPixels: number
    • arrowHeadWidthInPixels: number

    Returns void

setArrowStartTerminator

  • setArrowStartTerminator(arrowHeadLengthInPixels: number, arrowHeadWidthInPixels: number): void
  • Draw arrows at start of lines

    Parameters

    • arrowHeadLengthInPixels: number
    • arrowHeadWidthInPixels: number

    Returns void

setBarEndTerminator

  • setBarEndTerminator(lengthInPixels: number): void
  • Draw bars at end of lines

    Parameters

    • lengthInPixels: number

    Returns void

setBarStartTerminator

  • setBarStartTerminator(lengthInPixels: number): void
  • Draw bars at start of lines

    Parameters

    • lengthInPixels: number

    Returns void

setVertices

  • setVertices(vertices: ArrayLike<number>): void
  • Sets the vertices for the lines.

    The coordinates need to be interleaved (x0, y0, z0, x1, y1, z1, ...)

    Lines will be drawn between [x0, y0, z0] and [x1, y1, z1], and between [x2, y2, z2] and [x3, y3, z3], ..., so the number of lines will be vertices.length / 6.

    In order to draw a continuous path connecting all the given points, use utils.PathGenerator:

    const mrkModel = new cee.mrk.MarkupModel();
    const partLines = mrkModel.addLinesPart();
    const points: cee.Vec3[] = [ ... ];
    const vertices = cee.utils.PathGenerator.generateVerticesForPath(points);
    partLines.setVertices(vertices);

    Parameters

    • vertices: ArrayLike<number>

    Returns void

setVerticesFloat32Array

  • setVerticesFloat32Array(vertices: Float32Array): void
  • Sets the vertices for the lines from a Float32Array.

    The coordinates need to be interleaved (x0, y0, z0, x1, y1, z1, ...)

    This is the most optimal setting as the PartLines will just hold a reference to the passed array and not copy any data.

    Lines will be drawn between [x0, y0, z0] and [x1, y1, z1], and between [x2, y2, z2] and [x3, y3, z3], ..., so the number of lines will be vertices.length / 6.

    Parameters

    • vertices: Float32Array

    Returns void

Generated using TypeDoc