PartLines
-
class
cee.mrk.
PartLines
() A part that can show lines in a
MarkupModel
.Use
MarkupModel.addLinesPart
to create a new instance of this class.
Accessors
Methods
Accessors
-
PartLines.
color
() The single color of the part
Return type: Color3Like
-
PartLines.
color
(color) Arguments: - color (
Color3Like
) – None
Return type: void
- color (
-
PartLines.
customData
() Custom data for the part. This field is not used by EnvisionWeb.
Return type: any
-
PartLines.
customData
(data) Arguments: - data (
any
) – None
Return type: void
- data (
Methods
rayIntersect
-
PartLines.
rayIntersect
(ray, hitItem) Arguments: - ray (
Ray
) – None - hitItem (
PartHitItem
) – None
Picking
Return type: boolean - ray (
setArrowEndTerminator
-
PartLines.
setArrowEndTerminator
(arrowHeadLengthInPixels, arrowHeadWidthInPixels) Arguments: - arrowHeadLengthInPixels (
number
) – None - arrowHeadWidthInPixels (
number
) – None
Draw arrows at end of lines
Return type: void - arrowHeadLengthInPixels (
setArrowStartTerminator
-
PartLines.
setArrowStartTerminator
(arrowHeadLengthInPixels, arrowHeadWidthInPixels) Arguments: - arrowHeadLengthInPixels (
number
) – None - arrowHeadWidthInPixels (
number
) – None
Draw arrows at start of lines
Return type: void - arrowHeadLengthInPixels (
setBarEndTerminator
-
PartLines.
setBarEndTerminator
(lengthInPixels) Arguments: - lengthInPixels (
number
) – None
Draw bars at end of lines
Return type: void - lengthInPixels (
setBarStartTerminator
-
PartLines.
setBarStartTerminator
(lengthInPixels) Arguments: - lengthInPixels (
number
) – None
Draw bars at start of lines
Return type: void - lengthInPixels (
setVertices
-
PartLines.
setVertices
(vertices) Arguments: - vertices (
ArrayLike
) – None
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);
Return type: void - vertices (
setVerticesFloat32Array
-
PartLines.
setVerticesFloat32Array
(vertices) Arguments: - vertices (
Float32Array
) – None
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.
Return type: void - vertices (