Viewer
    Preparing search index...

    Class TreeNode

    Implements

    Index

    Constructors

    Accessors

    • get boundingBoxViewport(): { [key: string]: IBox }

      The bounding box of this tree node for each viewport. As there can be properties where tree nodes are excluded from the viewport, the bounding boxes may be different per viewport. The boundingBox property can be used as the general bounding box without any viewport specific exclusions.

      Returns { [key: string]: IBox }

    • get convertedObject(): { [key: string]: unknown }

      The converted object of the tree node.

      Returns { [key: string]: unknown }

    • set convertedObject(value: { [key: string]: unknown }): void

      The converted object of the tree node.

      Parameters

      • value: { [key: string]: unknown }

      Returns void

    • get displayName(): string | undefined

      An optional name that can be used for display purposes. If not specified, the name property will be used.

      Returns string | undefined

    • set displayName(value: string | undefined): void

      An optional name that can be used for display purposes. If not specified, the name property will be used.

      Parameters

      • value: string | undefined

      Returns void

    • get excludeViewports(): string[]

      The viewports to exclude this tree node from.

      Returns string[]

    • set excludeViewports(value: string[]): void

      The viewports to exclude this tree node from.

      Parameters

      • value: string[]

      Returns void

    • get id(): string

      The ID of the tree node.

      Returns string

    • get intersectionTest(): boolean

      If for this node, global intersection tests should be performed. (default: true)

      Returns boolean

    • set intersectionTest(value: boolean): void

      If for this node, global intersection tests should be performed. (default: true)

      Parameters

      • value: boolean

      Returns void

    • get name(): string

      The name of the tree node.

      Returns string

    • set name(value: string): void

      The name of the tree node.

      Parameters

      • value: string

      Returns void

    • get nodeMatrix(): mat4

      The matrix of the tree node. This is computed via all transformations in the transformations property.

      Returns mat4

    • get originalId(): string

      The original ID of the tree node, if it was copied.

      Returns string

    • set originalId(value: string): void

      The original ID of the tree node, if it was copied.

      Parameters

      • value: string

      Returns void

    • get originalName(): string | undefined

      The original name of the tree node, if one was supplied.

      Returns string | undefined

    • set originalName(value: string | undefined): void

      The original name of the tree node, if one was supplied.

      Parameters

      • value: string | undefined

      Returns void

    • get restrictViewports(): string[]

      The viewports to restrict this tree node to.

      Returns string[]

    • set restrictViewports(value: string[]): void

      The viewports to restrict this tree node to.

      Parameters

      • value: string[]

      Returns void

    • get updateCallback(): ((newVersion: string, oldVersion: string) => void) | null

      The update callback for the tree node. This callback is called when the node is updated, e.g. when the version changes.

      Returns ((newVersion: string, oldVersion: string) => void) | null

    • set updateCallback(
          value: ((newVersion: string, oldVersion: string) => void) | null,
      ): void

      The update callback for the tree node. This callback is called when the node is updated, e.g. when the version changes.

      Parameters

      • value: ((newVersion: string, oldVersion: string) => void) | null

      Returns void

    • get updateCallbackConvertedObject(): | (
          (newObj: unknown, oldObj: unknown, viewport: string) => void
      )
      | null

      The update callback for the converted object of the tree node.

      Returns ((newObj: unknown, oldObj: unknown, viewport: string) => void) | null

    • set updateCallbackConvertedObject(
          value:
              | ((newObj: unknown, oldObj: unknown, viewport: string) => void)
              | null,
      ): void

      The update callback for the converted object of the tree node.

      Parameters

      • value: ((newObj: unknown, oldObj: unknown, viewport: string) => void) | null

      Returns void

    • get version(): string

      The version of the tree node. If the version changes, the node will be marked for an update. A version change can be triggered via updateVersion.

      Returns string

    • set version(value: string): void

      The version of the tree node. If the version changes, the node will be marked for an update. A version change can be triggered via updateVersion.

      Parameters

      • value: string

      Returns void

    • get visible(): boolean

      Option to make this tree node visible. (default: true)

      Returns boolean

    • set visible(value: boolean): void

      Option to make this tree node visible. (default: true)

      Parameters

      • value: boolean

      Returns void

    • get worldMatrix(): mat4

      The world matrix of the tree node. This includes also the transformations of all parents.

      Returns mat4

    Methods

    • Clones this node and all its children. The data objects like GeometryData, MaterialData, etc. are cloned as well. Depending on the size of the node and the amount of children, this can therefore be relatively slow.

      Returns ITreeNode

    • Clones this node and all its children. The data objects like GeometryData, MaterialData, etc. are not copied in this case.

      Returns ITreeNode

    • Test this node and all it's descendants for nodes with the specified name and return them in an array.

      Parameters

      • name: string

      Returns ITreeNode[]

    • Test this nodes name and all it's descendants name for nodes for the specified regex and return them in an array.

      Parameters

      • regex: RegExp

      Returns ITreeNode[]

    • Return the path to this node with the original names. If no original name is set, the entry is left empty.

      Returns string

    • Return the path to this node.

      Returns string

    • Check for existence of a child from the children of this node.

      Parameters

      Returns boolean

    • Traverse this node and all it's children and executes the callback for all of them

      Parameters

      Returns void

    • Traverse this node and all it's children and executes the callback for all data items of them

      Parameters

      Returns void

    • Update the version.

      Parameters

      • Optionalparents: boolean

        if true, the version of all parents will be updated as well (default: true)

      • Optionalchildren: boolean

        if true, the version of all children will be updated as well (default: true)

      Returns void