import { MeshComponent } from '../MeshComponent.ts'; import { DIVEGeometry } from '../../../types/geometry/DIVEGeometry.ts'; /** * Procedurally generated geometry, built from a {@link DIVEGeometry} descriptor. * * Extends {@link MeshComponent} so material handling is shared -- and so * `getComponent(MeshComponent)` finds it, which is what lets one code path apply * materials to models and primitives alike. * * @module */ export declare class PrimitiveComponent extends MeshComponent { readonly isPrimitiveComponent: true; /** * The shape this component was last built from. * * Kept because the built `BufferGeometry` cannot be handed to a clone -- both * would dispose it -- while the descriptor rebuilds it for free. */ private _geometry; constructor(); /** The shape this component was last built from, if any. */ get geometry(): DIVEGeometry | null; /** * Rebuilds the geometry from a descriptor. * * @param geometry - The shape to build. */ setGeometry(geometry: DIVEGeometry): void; /** * Rebuilds the source's shape, rather than sharing the geometry it built. * * @param source - The component to copy from. */ copy(source: this): this; private _assembleGeometry; private _createCylinderGeometry; private _createSphereGeometry; private _createPyramidGeometry; private _createBoxGeometry; private _createConeGeometry; private _createWallGeometry; }