Node

Overview

Node is a class in Aspose.3D FOSS for Typescript. Inherits from: SceneObject.

Node.constructor creates a node with the specified name and initial entity.

This class provides 13 methods for working with Node objects in Typescript programs. Available methods include: addChildNode, addEntity, clearEntities, constructor, createChildNode, evaluateGlobalTransform, getBoundingBox, getChild, merge, removeEntity, selectObjects, selectSingleObject, and 1 additional methods. All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package. Properties: assetInfo, childNodes, entities, entity, excluded, globalTransform, and 6 more.

Properties

NameTypeAccessDescription
parentNodeNode | nullRead/WriteGets the parent node.
childNodesNode[]ReadGets the child nodes.
entitiesEntity[]ReadGets the entities.
entityEntity | undefinedRead/WriteGets the entity.
materialsMaterial[]ReadGets the materials.
materialMaterial | nullRead/WriteGets the material.
transformTransformReadGets the transform.
globalTransformGlobalTransformReadGets the global transform.
visiblebooleanRead/WriteGets the visible.
excludedbooleanRead/WriteGets the excluded.
assetInfoanyRead/WriteGets the asset info.
metaDatasany[]ReadGets the meta datas.

Methods

SignatureDescription
constructor(name: string, entity: Entity)Creates a node with the specified name and initial entity
addEntity(entity: Entity)Attaches the given entity to the node’s entity collection
removeEntity(entity: Entity)Detaches the specified entity from the node
clearEntities()Removes all entities from the node
addChildNode(node: Node)Adds an existing node as a child of this node
createChildNode(nodeName: string, entity: Entity, material: Material)NodeCreates a new child node with name, entity, and material, and returns it
getChild(indexOrName: number | string)Node | nullReturns the child node at the given index or with the given name, or null
merge(node: Node)Incorporates the contents of another node into this node
evaluateGlobalTransform(withGeometricTransform: boolean)Matrix4Computes the node’s global transform matrix, optionally including geometric transform
getBoundingBox()BoundingBoxReturns the bounding box.
selectSingleObject(_path: string)anyNot implemented in the FOSS edition — throws at runtime. Selects a single object in the node hierarchy using the provided path
selectObjects(_path: string)any[]Not implemented in the FOSS edition — throws at runtime. Selects all objects matching the given path and returns them as an array
toString()string

See Also