Repository navigation
Boats: the patrol boat on its own baked hull, drawn as its model - #1346
Merged
Merged
Conversation
- physics: loft_hull() builds a closed hull through stations (each a half-section from keel to sheer); hull_waterline_box() is the largest box inside a hull at a waterline. tools/boat_hulls/bake_loft.py bakes a .glb's hull into stations. - dyn_boat_desc::tactical(): the vehicle-tactical-boat package's TacticalBoat baked into 16 stations (480 triangles), 2800 kg, floating 0.49 m over its keel; its outboards steer by thrust, and a fixed 0.4 m^2 foil gives the V hull its grip sideways. 10.5 m/s, 32.5 m at full lock; length_overall 7.8 m. - BoatRuntime::cutout(): the water keeps out of the box inside each boat's hull at its waterline (a boat world vehicle's too), not its bounding box. - cvcGL: fit_vehicle_geometry() public, its up axis the one a file stands on, so a Y-up file stands up; make_vehicle_model_cache() and attach_vehicle_model(); the boat node's model: prop, the tactical preset drawing TacticalBoat when it is installed. - terrain_lab's lake boat is the tactical preset. - Docs and tests.
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The owner's patrol boat (the
vehicle-tactical-boatpackage, cy-pca/graphics-assets#19) as a boat preset that floats on its own hull, drawn on the boat node.The hull, baked from the model.
loft_hull(stations)(new,hull.h/hull.cpp) builds a closed, outward-woundhull_meshthrough stations. Each station is a half-section from keel to sheer, mirrored to port and closed across the sheer, with the end stations capped.tools/boat_hulls/bake_loft.py(standard library only) fits a.glbasfit_vehicle_geometrydoes and slices it. It writes the C++ table and prints the hull's size and draft. Its README covers re-baking and adding a new boat.dyn_boat_desc::length_overall). Its collision shape is the hull's convex hull.Steering and grip.
max_angle0) on the keel at x −0.8, just aft of the centre of mass. Its area and place were found by measuring:hull_meshcoefficient) would give a V hull its grip without the foil. Not written.PresetsDoWhatTheySay): top speed 10.5169 m/s; full lock 9.230 m/s at 0.2840 rad/s, a 32.50 m radius. Somax_speedis 10.5 andturn_radius32.5.The water's cut-out.
hull_waterline_box(hull, z)(new) is the largest box on the centre line inside a hull's outline at a waterline.BoatRuntime::cutout()takes it at the boat's fresh-water waterline. The water node keeps out of it (offset along the hull) for boat nodes, and, through a per-archetype cache, for boat world vehicles. It is no longer the hull's bounding box.Model fitting.
fitted()'s frame is now a publicfit_vehicle_geometry(geometry, length, vehicle_fit_axes)invehicle_view.h.make_vehicle_model_cache()andattach_vehicle_model()are added byte for byte as in Clients draw a room entity's model; the tactical boat's model is its default look #1343, so either merge order is clean.The boat node's
model:..glbis tried after a bare name);nonedraws the hull.length_overallabout the hull body's origin, with its keel on the hull's keel. The loft is baked in the model's own fitted frame, so the two line up with no offset.tacticalpreset defaults toTacticalBoat, and quietly draws its hull (the loft) when the package isn't installed. Amodel:that isn't found warns.terrain_lab. The lake's boat (node
launch, Settings > Launch) is nowpreset: tactical.Docs:
tools/boat_hulls/README.md.Tests (Windows MSVC Release):
physics_hull_test:physics_dyn_boat_plant_test:TheTacticalBoatIsItsModelsHull(vertex and triangle counts, size, a 0.488 m draft, the cut-out inside the hull);cvcgl_ariadne_physics:test_fit_vehicle_geometry, synthetic, in CI;test_boat_models_drawn: an OBJmodel:is drawn fitted tolength_overallon the hull's keel, the water usesBoatRuntime::cutout, a missing model warns, and the tactical boat draws its model or its hull;test_installed_vehicle_models_fit, which skips without the files.ariadne_scene_world_test(terrain_lab's tactical boat reaches its goal by nav),physics_boat_testandcvcgl_ariadne_realizepass.