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

NameTypeAccessDescription
visiblebooleanRead/WriteGets the visible.
castShadowsbooleanRead/WriteGets the cast shadows.
receiveShadowsbooleanRead/WriteGets the receive shadows.
vertexElementsVertexElement[]ReadGets the vertex elements.
controlPointsVector4[]Read/WriteGets the control points.

Methods

SignatureDescription
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)VertexElementCreates a VertexElement of the given type with optional mapping and reference modes
createElementUV(uvMapping: TextureMapping, mappingMode: MappingMode | null, referenceMode: ReferenceMode | null)VertexElementUVCreates 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 | nullReturns the VertexElement of the specified type or null if not present
getVertexElementOfUV(textureMapping: TextureMapping)VertexElementUV | nullReturns the UV VertexElement for the given texture mapping or null
removeProperty(_prop: Property | string)booleanRemoves 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()anyReturns the bounding box.
getEntityRendererKey()anyNot implemented in the FOSS edition — throws at runtime. Returns the entity renderer key.

See Also