Add tank catalog with USDZ models and tank selection
Introduce TankDefinition/TankCatalog loaded from Tanks.json, bundle the Drachengas USDZ tank models, add tank selection and preview views, and update the AR experience, editor and project views to use the catalog. Includes tests for catalog loading and model selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -31,6 +31,12 @@ final class Project {
|
||||
/// 16 Floats (spaltenweise). Zusammen mit der WorldMap wird der Tank so wiederhergestellt.
|
||||
var tankTransform: [Float]?
|
||||
|
||||
/// Persistierte, frei eingetragene Strecken als Codable-Daten.
|
||||
@Attribute(.externalStorage) var measurementsData: Data?
|
||||
|
||||
/// Persistierte Rohr-Wegpunkte und ihre Verbindungen als Codable-Daten.
|
||||
@Attribute(.externalStorage) var pipeRouteData: Data?
|
||||
|
||||
/// Im AR-Modus aufgenommene Fotos. Werden beim Löschen des Projekts mitentfernt.
|
||||
@Relationship(deleteRule: .cascade, inverse: \ProjectPhoto.project)
|
||||
var photos: [ProjectPhoto] = []
|
||||
@ -41,7 +47,9 @@ final class Project {
|
||||
creationDate: Date,
|
||||
tank: Tank = Tank(),
|
||||
worldMapData: Data? = nil,
|
||||
tankTransform: [Float]? = nil
|
||||
tankTransform: [Float]? = nil,
|
||||
measurementsData: Data? = nil,
|
||||
pipeRouteData: Data? = nil
|
||||
) {
|
||||
self.leadID = leadID
|
||||
self.customerName = customerName
|
||||
@ -49,6 +57,8 @@ final class Project {
|
||||
self.tank = tank
|
||||
self.worldMapData = worldMapData
|
||||
self.tankTransform = tankTransform
|
||||
self.measurementsData = measurementsData
|
||||
self.pipeRouteData = pipeRouteData
|
||||
}
|
||||
|
||||
/// Human-readable title combining the lead identifier and customer name.
|
||||
|
||||
Reference in New Issue
Block a user