forked from 1b-agent/fieldcraft-upstream
Camera::fit_in frames a box's corners in part of the view
The distance and the target follow from the eight corners' exact projections, for orthographic and perspective cameras and any direction of view, so a long beam seen side on fills the width instead of a sphere around it the height (#147). The free part is given as fractions of the view, so overlays can be left out (#76); a margin is kept on each side. Camera::fit is fit_in over the whole of a square view, and the headless renderer fits to the picture's aspect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
696b64c30f
commit
29af2aef91
4 files changed
+158
-7
No files matched your search
@@ -15,7 +15,7 @@ pub mod pick;
|
||||
mod raster;
|
||||
mod vec;
|
||||
|
||||
pub use camera::{Camera, Mat4, Orientation, StandardView};
|
||||
pub use camera::{Camera, FIT_MARGIN, FULL_VIEW, Mat4, Orientation, StandardView};
|
||||
pub use display::{DisplayEdge, DisplayLine, DisplayMesh, DisplayNode, DisplayTri, SurfaceCurve, SurfaceTri};
|
||||
pub use raster::{
|
||||
Canvas, LABEL_OFFSET, MAX_DIM, MAX_PIXELS, MAX_PRIMITIVES, RenderError, Rgb, Scene, SceneLabel, SceneLine, ScenePoint, SceneTri, fit_size, png,
|
||||
|
||||
Reference in new issue
Block a user