/** * AR Contextual Recommender * * Analyzes the AR environment and provides contextual object recommendations * based on detected surfaces, lighting conditions, and scene understanding. */ /** * Environment context types that can be detected */ export declare enum AREnvironmentContext { FLOOR = "floor", TABLE = "table", WALL = "wall", CEILING = "ceiling", OUTDOOR = "outdoor", INDOOR = "indoor", BRIGHT = "bright", DIM = "dim", SMALL_SPACE = "smallSpace", LARGE_SPACE = "largeSpace", OFFICE = "office", LIVING_ROOM = "livingRoom", KITCHEN = "kitchen", BEDROOM = "bedroom", BATHROOM = "bathroom", UNKNOWN = "unknown" } /** * Object recommendation including score and metadata */ export interface ARObjectRecommendation { /** * Unique identifier for the recommended object */ id: string; /** * Display name of the recommended object */ name: string; /** * URI to the 3D model */ modelUri: string; /** * Recommendation score (0.0 to 1.0) with higher being more relevant */ score: number; /** * Category of the object */ category: string; /** * Environment contexts this object is well-suited for */ suitableContexts: AREnvironmentContext[]; /** * Suggested scale for the object in this context */ suggestedScale: number; /** * Suggested position relative to the detected plane/feature * Values: 'center', 'edge', 'corner', 'wall', 'hanging' */ suggestedPlacement?: string; /** * Preview image URI */ previewImageUri?: string; /** * Additional metadata for the object */ metadata?: Record; } /** * Environment analysis result */ export interface AREnvironmentAnalysis { /** * Dominant environment contexts detected */ detectedContexts: AREnvironmentContext[]; /** * Confidence score for each detected context (0.0 to 1.0) */ contextConfidence: Record; /** * Detected horizontal planes (floor, tables) */ horizontalPlanes: number; /** * Detected vertical planes (walls) */ verticalPlanes: number; /** * Estimated room size in cubic meters (if indoor) */ estimatedSpaceVolume?: number; /** * Estimated ambient light intensity (0.0 to 1.0) */ lightIntensity: number; /** * Whether the environment has been successfully analyzed */ isAnalyzed: boolean; /** * Timestamp of the analysis */ timestamp: number; } /** * Configuration options for recommendations */ export interface ARRecommendationOptions { /** * Maximum number of recommendations to return * @default 5 */ maxResults?: number; /** * Minimum score threshold for recommendations (0.0 to 1.0) * @default 0.5 */ minScore?: number; /** * Categories to include in recommendations * If empty, all categories are included */ includeCategories?: string[]; /** * Categories to exclude from recommendations */ excludeCategories?: string[]; /** * Whether to prefer previously used/favorited objects * @default true */ preferUserHistory?: boolean; /** * Whether to use remote recommendation service * If false, only uses local recommendations * @default false */ useRemoteRecommendations?: boolean; /** * URL for remote recommendation service */ remoteServiceUrl?: string; /** * Authentication token for remote service */ remoteServiceToken?: string; } /** * Data source for object catalog */ export interface ARObjectCatalogSource { /** * Gets all available objects in the catalog */ getAllObjects(): Promise; /** * Gets objects filtered by category */ getObjectsByCategory(category: string): Promise; /** * Gets a specific object by ID */ getObjectById(id: string): Promise; /** * Gets objects that match the given search query */ searchObjects(query: string): Promise; } /** * Class for AR contextual object recommendations */ export declare class ARContextualRecommender { private static environmentAnalysis; private static isAnalyzing; private static options; private static localCatalog; private static remoteCatalog; private static userHistory; /** * Configure the recommender */ static setOptions(options: Partial): void; /** * Analyzes the current AR environment to detect contexts */ static analyzeEnvironment(): Promise; /** * Creates an empty analysis result when proper analysis fails */ private static createEmptyAnalysis; /** * Estimates the room type based on detected planes */ private static estimateRoomType; /** * Groups similar heights together (within 10cm) */ private static groupSimilarHeights; /** * Estimates room volume based on detected planes */ private static estimateRoomVolume; /** * Calculate approximate distance between two planes */ private static distanceBetweenPlanes; /** * Gets object catalog source based on current options */ private static getObjectCatalog; /** * Records that a user has selected/used an object */ static recordObjectUsage(objectId: string): void; /** * Clears the user history */ static clearUserHistory(): void; /** * Gets recommendations based on the current environment */ static getRecommendations(options?: Partial): Promise; /** * Gets the current environment analysis */ static getCurrentAnalysis(): AREnvironmentAnalysis | null; /** * Gets recommendations for a specific position */ static getRecommendationsForPosition(position: { x: number; y: number; z: number; }, options?: Partial): Promise; /** * Searches for objects by name or category */ static searchObjects(query: string): Promise; } //# sourceMappingURL=ARContextualRecommender.d.ts.map