Geometry
Overview
Geometry is a class in Aspose.3D FOSS for Typescript.
Inherits from: Entity.
Geometry.constructor creates a Geometry with an optional name.
This class provides 13 methods for working with Geometry objects in Typescript programs.
Available methods include: addControlPoint, addElement, constructor, createElement, createElementUV, findProperty, getBoundingBox, getElement, getEntityRendererKey, getProperty, getVertexElementOfUV, removeProperty, and 1 additional methods.
All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package.
Properties: castShadows, controlPoints, receiveShadows, vertexElements, visible.
Description
Geometry is a class in the Aspose.3D FOSS library for TypeScript that exposes 12 methods and 5 properties for programmatic use. It extends Entity, inheriting shared functionality from its parent type.
Core capabilities include: boolean; boolean; boolean. These operations enable developers to integrate geometry functionality directly into TypeScript applications.
The class also provides the vertexElements property (gets the vertex elements).
Instances are created through a single constructor that initializes the object with default values.
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. |
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 | |
setProperty(_property: string, _value: any) | Sets the property value. |
findProperty(_property: string) → Property | null | |
getBoundingBox() → any | Returns the bounding box. |
getEntityRendererKey() → any | Not implemented in the FOSS edition — throws at runtime. Returns the entity renderer key. |