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.

Description

Node is a class in the Aspose.3D FOSS library for TypeScript that exposes 12 methods and 12 properties for programmatic use. It extends SceneObject, inheriting shared functionality from its parent type.

Core capabilities include: node \; node[]; entity[]`. These operations enable developers to integrate node functionality directly into TypeScript applications.

The class also provides the childNodes property (gets the child nodes), the entities property (gets the entities), the materials property (gets the materials).

Instances are created through a single constructor that initializes the object with default values.

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

 English