Line

Line class

A polyline is a path defined by a set of points with Geometry.ControlPoints, and connected by Segments, which means it can also be a set of connected line segments. The line is usually a linear object, which means it cannot be used to represent a curve, in order to represent a curve, uses NurbsCurve.

Methods

constructor

NameDescription
constructor()Initializes a new instance of the Line class.

Result:


constructor_overload

NameDescription
constructor_overload(name)Initializes a new instance of the Line class.

Parameters:

NameTypeDescription
nameStringName.

Result:


getControlPoints

NameDescription
getControlPoints()Gets all control points

Result:


getVisible

NameDescription
getVisible()Gets or sets if the geometry is visible

Result:


setVisible

NameDescription
setVisible(value)Gets or sets if the geometry is visible

Result:


getSegments

NameDescription
getSegments()Gets the segments of the line

Result:


getColor

NameDescription
getColor()Gets or sets the color of the line, default value is white(1, 1, 1)

Result:


setColor

NameDescription
setColor(value)Gets or sets the color of the line, default value is white(1, 1, 1)

Result:


getParentNodes

NameDescription
getParentNodes()Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing The nodes.

Result:


getExcluded

NameDescription
getExcluded()Gets or sets whether to exclude this entity during exporting.

Result:


setExcluded

NameDescription
setExcluded(value)Gets or sets whether to exclude this entity during exporting.

Result:


getParentNode

NameDescription
getParentNode()Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. The parent node.

Result:


setParentNode

NameDescription
setParentNode(value)Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. The parent node.

Result:


getScene

NameDescription
getScene()Gets the scene that this object belongs to

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


fromPoints

NameDescription
fromPoints(points)Construct a Line instance from a set of points.

Parameters:

NameTypeDescription
pointVector3[]null

Result: Line


makeDefaultIndices

NameDescription
makeDefaultIndices()Generate the sequence 0,1,2,3….Geometry.ControlPoints.Length-1 to Segments so the ControlPoints can be used as a single line

Result: Line


getEntityRendererKey

NameDescription
getEntityRendererKey()Gets the key of the entity renderer registered in the renderer

Result: EntityRendererKey


getBoundingBox

NameDescription
getBoundingBox()Gets the bounding box of current entity in its object space coordinate system.

Result: EntityRendererKey


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property