LineMarkup
- class Communicator.Markup.Line.LineMarkup()
This class is for 3D line markup items.
Constructors
Properties
Methods
Constructors
constructor
- Communicator.Markup.Line.LineMarkup.constructor(viewer, firstPoint, secondPoint, firstNodeId, secondNodeId)
- Arguments
viewer (
Communicator.WebViewer()) –firstPoint (
{ }()) –secondPoint (
{ }()) –firstNodeId (
{ }()) –secondNodeId (
{ }()) –
- Return type
Communicator.Markup.Line.LineMarkup
Methods
draw
- Communicator.Markup.Line.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
- Communicator.Markup.Line.LineMarkup.forJson()
Note
forJson is deprecated: Use
toJsoninstead.- Return type
Object
getClassName
- Communicator.Markup.Line.LineMarkup.getClassName()
Returns the class name for this markup item.
- Return type
string
getFirstNodeId
- Communicator.Markup.Line.LineMarkup.getFirstNodeId()
Gets the NodeId of the part associated with the first line point
- Return type
{ }
getFirstPoint
- Communicator.Markup.Line.LineMarkup.getFirstPoint()
Gets the first point on the line.
- Return type
{ }- Returns
the first point, or null if none is set.
getId
- Communicator.Markup.Line.LineMarkup.getId()
Returns a unique markup id for this line.
- Return type
Communicator.Uuid
getLineColor
- Communicator.Markup.Line.LineMarkup.getLineColor()
Gets the line color.
- Return type
Communicator.Color
getLineOpacity
- Communicator.Markup.Line.LineMarkup.getLineOpacity()
Gets the line opacity.
- Return type
number
getLinePattern
- Communicator.Markup.Line.LineMarkup.getLinePattern()
Gets the line pattern.
- Return type
{ }
getLinePatternLength
- Communicator.Markup.Line.LineMarkup.getLinePatternLength()
Gets the length of a single repetition of the line pattern.
- Return type
{ }
getLinePatternLengthUnit
- Communicator.Markup.Line.LineMarkup.getLinePatternLengthUnit()
Gets the unit in which the line pattern length is measured.
- Return type
{ }
getNodeId
- Communicator.Markup.Line.LineMarkup.getNodeId()
Gets the node id associated with the line markup.
- Return type
{ }
getSecondNodeId
- Communicator.Markup.Line.LineMarkup.getSecondNodeId()
Gets the NodeId of the part associated with the second line point
- Return type
{ }
getSecondPoint
- Communicator.Markup.Line.LineMarkup.getSecondPoint()
Gets the second point on the line.
- Return type
{ }- Returns
the second point, or null if none is set.
hit
- Communicator.Markup.Line.LineMarkup.hit(point)
Called when a hit test is performed on this markup item.
- Arguments
point (
Communicator.Point2()) – position in window where the hit test is being performed.
- Return type
boolean- Returns
boolean value indicating whether this item was picked
hitWithTolerance
- Communicator.Markup.Line.LineMarkup.hitWithTolerance(point, pickTolerance)
Called when a hit test is performed on this markup item.
- Arguments
point (
Communicator.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
- Communicator.Markup.Line.LineMarkup.onDeselect()
Called when this markup item is deselected by the system
- Return type
void
onSelect
- Communicator.Markup.Line.LineMarkup.onSelect()
Called when this markup item is selected by the system.
- Return type
void
remove
- Communicator.Markup.Line.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
- Communicator.Markup.Line.LineMarkup.removeLine()
Removes the line geometry from the scene.
- Return type
Promise[void]
setFirstNodeId
- Communicator.Markup.Line.LineMarkup.setFirstNodeId(nodeId)
Sets the NodeId of the part associated with the first line point
- Arguments
nodeId (
{ }()) –
- Return type
void
setFirstPoint
- Communicator.Markup.Line.LineMarkup.setFirstPoint(firstPoint)
Sets the first point on the line.
- Arguments
firstPoint (
{ }()) –
- Return type
void
setId
- Communicator.Markup.Line.LineMarkup.setId(id)
Sets a markup id for this line.
- Arguments
id (
Communicator.Uuid()) –
- Return type
void
setLineColor
- Communicator.Markup.Line.LineMarkup.setLineColor(color)
Sets the line color.
- Arguments
color (
Communicator.Color()) –
- Return type
void
setLineOpacity
- Communicator.Markup.Line.LineMarkup.setLineOpacity(opacity)
Sets the line opacity.
- Arguments
opacity (
number()) –
- Return type
void
setLinePattern
- Communicator.Markup.Line.LineMarkup.setLinePattern(pattern, patternLength, patternLengthUnit)
Sets the line pattern.
- Arguments
pattern (
Communicator.LinePattern()) – The line pattern.patternLength (
number()) – The length of a single repetition of the line pattern.patternLengthUnit (
Communicator.LinePatternLengthUnit()) – The unit in which the pattern length is measured.
- Return type
void
setSecondNodeId
- Communicator.Markup.Line.LineMarkup.setSecondNodeId(nodeId)
Sets the NodeId of the part associated with the second line point
- Arguments
nodeId (
{ }()) –
- Return type
void
setSecondPoint
- Communicator.Markup.Line.LineMarkup.setSecondPoint(secondPoint)
Sets the second point on the line.
- Arguments
secondPoint (
{ }()) –
- Return type
void
toJson
- Communicator.Markup.Line.LineMarkup.toJson()
Creates an object ready for JSON serialization.
- Return type
Object- Returns
The prepared object.