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 declares 18 methods for Node objects in TypeScript programs. Available methods include: addChildNode, addEntity, clearEntities, constructor, createChildNode, evaluateGlobalTransform, findProperty, getBoundingBox, getChild, getProperty, merge, removeEntity, and 5 additional methods. 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 9 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.
sceneScene | nullRead/WriteGets the scene.
namestringRead/WriteGets the name.
propertiesPropertyCollectionReadGets the properties.

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()stringCalls toString on this Node instance.
constructor(name: string)Calls constructor(name) on this Node instance.
findProperty(propertyName: string)Property | nullCalls findProperty(propertyName) on this Node instance.
getProperty(property: string)anyCalls getProperty(property) on this Node instance.
setProperty(property: string, value: any)Sets the property value.
removeProperty(property: string | Property)booleanCalls removeProperty(property) on this Node instance.

See Also

 English