LineMarkup
- class Communicator.Markup.Line.LineMarkup()
This class is for 3D line markup items.
Constructors
Properties
Methods
Constructors
Properties
- LineMarkup.className
- Type
string
Methods
draw
- LineMarkup.draw()
Called when the markup item should be redrawn on the screen. This most typically happens when the scene is rendered.
- Return type
void
forJson
- LineMarkup.forJson()
- Deprecated
Use
toJson
instead.- Return type
Object
getClassName
- LineMarkup.getClassName()
Returns the class name for this markup item.
- Return type
string
getFirstNodeId
getFirstPoint
getId
getLineColor
getLineOpacity
- LineMarkup.getLineOpacity()
Gets the line opacity.
- Return type
number
getLinePattern
- LineMarkup.getLinePattern()
Gets the line pattern.
- Return type
LinePattern | null
getLinePatternLength
- LineMarkup.getLinePatternLength()
Gets the length of a single repetition of the line pattern.
- Return type
number | null
getLinePatternLengthUnit
- LineMarkup.getLinePatternLengthUnit()
Gets the unit in which the line pattern length is measured.
- Return type
LinePatternLengthUnit | null
getNodeId
- LineMarkup.getNodeId()
Gets the node id associated with the line markup.
- Return type
number | null
getSecondNodeId
getSecondPoint
hit
hitWithTolerance
- LineMarkup.hitWithTolerance(point, pickTolerance)
Called when a hit test is performed on this markup item.
- Arguments
point (
Point2()
) – position in window where the hit test is being performed.pickTolerance (
number()
) – amount of tolerance allowed for a hit in pixels.
- Return type
boolean
- Returns
boolean value indicating whether this item was picked
onDeselect
- LineMarkup.onDeselect()
Called when this markup item is deselected by the system
- Return type
void
onSelect
- LineMarkup.onSelect()
Called when this markup item is selected by the system.
- Return type
void
remove
- LineMarkup.remove()
Called when the MarkupItem is removed from the system. Any cleanup that needs to be done should be performed in this method.
- Return type
void
removeLine
- LineMarkup.removeLine()
Removes the line geometry from the scene.
- Return type
Promise <void>
setFirstNodeId
setFirstPoint
setId
setLineColor
setLineOpacity
- LineMarkup.setLineOpacity(opacity)
Sets the line opacity.
- Arguments
opacity (
number()
) –
- Return type
void
setLinePattern
- LineMarkup.setLinePattern(pattern, patternLength, patternLengthUnit)
Sets the line pattern.
- Arguments
pattern (LinePattern) – The line pattern.
patternLength (
number()
) – The length of a single repetition of the line pattern.patternLengthUnit (LinePatternLengthUnit) – The unit in which the pattern length is measured.
- Return type
void
setSecondNodeId
setSecondPoint
toJson
- LineMarkup.toJson()
Creates an object ready for JSON serialization.
- Return type
Object
- Returns
The prepared object.
updateLine
- LineMarkup.updateLine()
Draws updated line geometry in the scene.
- Return type
Promise <void>
static fromJson
- LineMarkup.fromJson(objData, viewer)
Creates a new
LineMarkup
from an object given bytoJson
- Arguments
objData (
any()
) –viewer (
WebViewer()
) –
- Return type
Promise <
LineMarkup()
>- Returns
The prepared object.