[213] Kameras als Modell-Elemente und Begehen (WASD) im 3D

Project.cameras (Rust Camera: Standpunkt + Augenhöhe über Geschoss, Ziel, Bildwinkel, Perspektive/
Axonometrie/Parallel, Sonnenstand) auf der neuen Klasse "Kameras" (92). Grundriss-Symbol im Kern
(plan/cameras.rs: Gehäuse, Sichtkegel, Ziel, Name, schmale Pick-Bänder), Griffe im Kern (camera.rs,
grips.rs: Standpunkt, Ziel, Bildwinkel/Sichtbreite), Auswahl/Entf, Objekt-Info CameraSection, Liste im
Panel Ausschnitte, "Kamera aus aktueller Ansicht anlegen", "Kamera öffnen" (auch per Doppelklick auf das
Symbol), cameraToView() für das Rendering [211]. Begehen im 3D: Umschalt+F, W/A/S/D/Pfeile, Q/E,
Umschalt/Alt, Umschauen um den Augpunkt (viewport/walk.ts). Beispiel: Kamera im Musterhaus komplex.
This commit is contained in:
Claude committed 2026-11-12 18:31:37 +00:00
1 parent b02b9232bd
commit ed475fe64b
64 files changed
+2031 -50

No files matched your search

+9 -2
View File
@@ -4,7 +4,7 @@
import type { GroupableHit, BodyTarget } from "./types";
import { planPrimAt, nearestInDrawings, marqueeHitUnderlay } from "../../../core";
import { LINE_PICK_PX, TREE_PICK } from "./constants";
import { CAMERA_PICK, LINE_PICK_PX, TREE_PICK } from "./constants";
import type { Primitive, ModelRect } from "../../../core";
import type { Vec2 } from "../../../model/types";
import { useState, useRef, useEffect } from "react";
@@ -257,7 +257,7 @@ export function usePlanPicking(inp: UsePlanPickingArgs) {
// [137] Getroffene Lage-Darstellung: Quelle `"sunStudy"`/`"siteRules"` (Baurechtslinie vor Schatten) oder null.
const pickSiteAt = (clientX: number, clientY: number): string | null => {
const all = contextIdsAt(clientX, clientY).filter((id) => !id.startsWith(TREE_PICK));
const all = contextIdsAt(clientX, clientY).filter((id) => !id.startsWith(TREE_PICK) && !id.startsWith(CAMERA_PICK));
// [193] Liegt ein Kontext-Element (Baugrube, Netz) über der Schattenfläche, gehört der Klick ihm — sonst wäre
// die Baugrube unter dem Schatten des Hauses nicht anzuwählen. Die Baurechtslinie (unsichtbares Band) gewinnt immer.
if (all.includes("@siteRules")) return "siteRules";
@@ -271,6 +271,12 @@ export function usePlanPicking(inp: UsePlanPickingArgs) {
return id ? id.slice(TREE_PICK.length) : null;
};
// [213] Getroffene Kamera (oberste Pickfläche aus Gehäuse und Sichtkegel) oder null.
const pickCamera = (clientX: number, clientY: number): string | null => {
const id = contextIdsAt(clientX, clientY).find((x) => x.startsWith(CAMERA_PICK));
return id ? id.slice(CAMERA_PICK.length) : null;
};
const pickContextObject = (clientX: number, clientY: number): string | null =>
contextIdsAt(clientX, clientY).find((id) => !id.startsWith("@")) ?? null;
@@ -407,6 +413,7 @@ export function usePlanPicking(inp: UsePlanPickingArgs) {
pickSectionLine,
pickSiteAt,
pickTree,
pickCamera,
pickContextObject,
pickExtrudedSolid,
pickColumn,