/** * Primitive Shape Generation * * Provides functions to generate common 3D primitive shapes as mesh data. * These functions can be used with the Mesh class to create basic shapes. */ import { Vector3 } from './transform'; import type { MeshFaceData } from '../geometry/mesh_face'; export type PrimitiveShape = 'cuboid' | 'beveled_cuboid' | 'pyramid' | 'plane' | 'circle' | 'cylinder' | 'tube' | 'cone' | 'sphere' | 'torus'; export interface PrimitiveOptions { /** Diameter/width of the shape */ diameter?: number; /** Height of the shape (for shapes that have height) */ height?: number; /** Number of sides for circular shapes */ sides?: number; /** Minor diameter for torus and tube */ minor_diameter?: number; /** Minor sides for torus */ minor_sides?: number; /** Edge size for beveled cuboid */ edge_size?: number; /** Whether to align edges (for circular shapes) */ align_edges?: boolean; } export interface PrimitiveResult { vertices: Vector3[]; faces: MeshFaceData[]; } /** * Create a circle primitive */ export declare function createCircle(options?: PrimitiveOptions): PrimitiveResult; /** * Create a cone primitive */ export declare function createCone(options?: PrimitiveOptions): PrimitiveResult; /** * Create a cylinder primitive */ export declare function createCylinder(options?: PrimitiveOptions): PrimitiveResult; /** * Create a tube primitive */ export declare function createTube(options?: PrimitiveOptions): PrimitiveResult; /** * Create a torus primitive */ export declare function createTorus(options?: PrimitiveOptions): PrimitiveResult; /** * Create a sphere primitive */ export declare function createSphere(options?: PrimitiveOptions): PrimitiveResult; /** * Create a cuboid primitive */ export declare function createCuboid(options?: PrimitiveOptions): PrimitiveResult; /** * Create a beveled cuboid primitive */ export declare function createBeveledCuboid(options?: PrimitiveOptions): PrimitiveResult; /** * Create a pyramid primitive */ export declare function createPyramid(options?: PrimitiveOptions): PrimitiveResult; /** * Create a plane primitive */ export declare function createPlane(options?: PrimitiveOptions): PrimitiveResult; /** * Create a primitive shape */ export declare function createPrimitive(shape: PrimitiveShape, options?: PrimitiveOptions): PrimitiveResult; /** * Apply primitive data to a mesh * This is a helper function that takes a Mesh instance and applies primitive data to it */ export declare function applyPrimitiveToMesh(mesh: any, // Mesh instance (from '../geometry/mesh') shape: PrimitiveShape, options?: PrimitiveOptions): void; //# sourceMappingURL=primitives.d.ts.map