Geometry
Overview
Geometry is a class in Aspose.3D FOSS for TypeScript.
Inherits from: Entity.
Geometry objects allow adding control points, creating vertex elements (including UVs), and retrieving bounding boxes for mesh data.
This class declares 16 methods for Geometry objects in TypeScript programs.
Available methods include: addControlPoint, addElement, constructor, createElement, createElementUV, findProperty, getBoundingBox, getElement, getEntityRendererKey, getProperty, getVertexElementOfUV, removeProperty, and 2 additional methods.
Public members are accessible to any TypeScript application after installing the Aspose.3D FOSS for TypeScript package.
Properties: castShadows, controlPoints, excluded, name, parentNode, parentNodes, and 5 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
visible | boolean | Read/Write | Gets the visible. |
castShadows | boolean | Read/Write | Gets the cast shadows. |
receiveShadows | boolean | Read/Write | Gets the receive shadows. |
vertexElements | VertexElement[] | Read | Gets the vertex elements. |
controlPoints | Vector4[] | Read/Write | Gets the control points. |
parentNodes | Node[] | Read | Gets the parent nodes. |
parentNode | Node | undefined | Read/Write | Gets the parent node. |
excluded | boolean | Read/Write | Gets the excluded. |
scene | Scene | null | Read/Write | Gets the scene. |
name | string | Read/Write | Gets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
constructor(name: string | null) | Creates a Geometry with an optional name |
addControlPoint(point: Vector4) | Adds a Vector4 point to the geometry’s control points list |
createElement(elementType: VertexElementType, mappingMode: MappingMode | null, referenceMode: ReferenceMode | null) → VertexElement | Creates a VertexElement of the given type with optional mapping and reference modes |
createElementUV(uvMapping: TextureMapping, mappingMode: MappingMode | null, referenceMode: ReferenceMode | null) → VertexElementUV | Creates a UV VertexElement for the specified texture mapping and optional modes |
addElement(element: VertexElement) | Adds a VertexElement to the geometry’s vertexElements collection |
getElement(elementType: VertexElementType) → VertexElement | null | Returns the VertexElement of the specified type or null if not present |
getVertexElementOfUV(textureMapping: TextureMapping) → VertexElementUV | null | Returns the UV VertexElement for the given texture mapping or null |
removeProperty(_prop: Property | string) → boolean | Removes a property by object or name and returns true if removal succeeded |
getProperty(_property: string) → any | Calls getProperty(_property) on this Geometry instance. |
setProperty(_property: string, _value: any) | Sets the property value. |
findProperty(_property: string) → Property | null | Calls findProperty(_property) on this Geometry instance. |
getBoundingBox() → any | Returns the bounding box. |
getEntityRendererKey() → any | Not implemented in the FOSS edition — throws at runtime. Returns the entity renderer key. |
constructor(name: string) | Calls constructor(name) on this Geometry instance. |
removeProperty(property: string | Property) → boolean | Calls removeProperty(property) on this Geometry instance. |
toString() → string | Calls toString on this Geometry instance. |