Skip to content

Simple struct based domain#3232

Merged
mwestphal merged 52 commits into
f3d-app:masterfrom
mwestphal:options_domain_struct
Jul 1, 2026
Merged

Simple struct based domain#3232
mwestphal merged 52 commits into
f3d-app:masterfrom
mwestphal:options_domain_struct

Conversation

@mwestphal

@mwestphal mwestphal commented Jun 11, 2026

Copy link
Copy Markdown
Member

Describe your changes

  • Add range, enum and index domain concepts to the options through a dedicated json syntax and related cmake gen.
  • Add options::hasDomain, options::getDomainStyle, options::getEnumDomain, options::increase, options::decrease, options::cycle
  • Use enum domains for command completion
  • Add increase and decrease commands for range domain options
  • Add cycle commands for enum domain options
  • Update all cycle_ and increase_ commands to use increase and cycle whenever possible
  • Add dynamic enumeration domain for camera index
  • Update impacted tests
  • Add unit options domain unit tests
  • Add command script tests
  • Add/update doc

Json syntax:

      "opacity": {
        "type": "double",
        "default_value": "0.9",
        "domain": {
          "style": "range",
          "range": ["0.0", "1.0"],
          "increment": "0.05"
        }
        "mode": {
          "type": "string",
          "default_value": "none",
          "domain": {
            "style": "enum",
            "enum": ["none", "fxaa", "ssaa", "taa"]
          }
      "index": {
        "type": "int",
        "domain": {
          "style": "index",
          "max": "10"
        }

Added Domain list:

  • : render.effect.blending.mode: done
  • : render.effect.antialiasing.mode: done
  • : model.point_sprites.type: done
  • : interactor.style: done
  • : render.light.intensity: done, but implementation is different (percentage)
  • : model.color.opacity: done, but implementation is different (start from min/max)
  • : scene.animation.speed_factor: done
  • : scene.camera.index: done
  • : render.line_width: done
  • : render.point_size: done
  • : render.backface_type : done
  • : render.raytracing.samples: done
  • : render.background.blur.coc: done
  • : ui.backdrop.opacity: done
  • : ui.scale: done
  • : model.normal.scale: done
  • : model.material.metallic: done
  • : model.material.roughness: done
  • : model.material.base_ior: done
  • : model.scivis.discretization: done
  • : model.point_sprites.size: done
  • : model.normal_glyphs.scale: done

TODO:

  • : Bool enum ?
  • : Double computation ?
  • : cmake doc and cleanup
  • : Proper f3d::color_t handling ?
  • : hasDomain/getDomainType/getDomain ?
  • : Ratio += keep in types or not ?
  • : Dynamic camera index
  • : Doc
  • : Finalize options domain doc
  • : Proper integration testing
  • : Unit testing
  • : C bindings
  • : python Bindings
  • : java Bindings
  • : javascript Bindings
  • : Index domain: started impl

Issue ticket number and link if any

Fix #2334

Checklist for finalizing the PR

  • I have performed a self-review of my code
  • I have added tests for new features and bugfixes
  • I have added documentation for new features
  • If it is a modifying the libf3d API, I have updated bindings
  • If it is a modifying the .github/workflows/versions.json, I have updated docker_timestamp

AI Disclosure

  • I did not use AI to generate any of the content of that pull request
  • I used AI to generate code in that pull request, if yes please disclose which part of the code was generated and with which model.
  • ...

Continuous integration

Please write a comment to run CI, eg: \ci fast.
See here for more info.

@github-actions

Copy link
Copy Markdown

You are modifying libf3d public API! ⚠️Please update bindings accordingly⚠️!
You can find them in their respective directories: c, python, java, webassembly.

@mwestphal mwestphal self-assigned this Jun 14, 2026
@mwestphal

Copy link
Copy Markdown
Member Author

\ci fast

@mwestphal
mwestphal force-pushed the options_domain_struct branch 3 times, most recently from 6135506 to 39b547a Compare June 18, 2026 05:43
Comment thread library/public/types.h Outdated
Comment thread library/private/options_tools.h
Comment thread library/options.json
Comment thread library/src/scene_impl.cxx
Comment thread library/src/scene_impl.cxx Outdated
@mwestphal
mwestphal marked this pull request as ready for review June 18, 2026 19:16
@mwestphal
mwestphal requested a review from a team as a code owner June 18, 2026 19:16
@mwestphal
mwestphal marked this pull request as draft June 18, 2026 19:16
Comment thread vtkext/private/module/vtkF3DRenderer.cxx
Comment thread testing/baselines/TestInteractionLightIntensity.png
@mwestphal
mwestphal force-pushed the options_domain_struct branch from 8790656 to 7c543e3 Compare June 21, 2026 13:40
Comment thread doc/libf3d/03-OPTIONS.md
Comment thread doc/user/07-COMMANDS.md
@mwestphal mwestphal added ci:full and removed ci:fast labels Jun 21, 2026
@mwestphal
mwestphal marked this pull request as ready for review June 21, 2026 14:54
@mwestphal
mwestphal requested review from Meakk and snoyer and removed request for a team June 21, 2026 14:54
@mwestphal
mwestphal force-pushed the options_domain_struct branch from 143858d to e606442 Compare July 1, 2026 11:18

@Meakk Meakk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some suggestions about ranges of some options.
base_ior range is a request, not a suggestion.

Comment thread doc/libf3d/03-OPTIONS.md Outdated
Comment thread doc/libf3d/03-OPTIONS.md Outdated
Comment thread doc/libf3d/03-OPTIONS.md Outdated
@mwestphal

Copy link
Copy Markdown
Member Author

some suggestions about ranges of some options. base_ior range is a request, not a suggestion.

I definitely trust you there, no worries.

@mwestphal
mwestphal requested a review from Meakk July 1, 2026 13:38

@Meakk Meakk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mwestphal
mwestphal merged commit 192a5d8 into f3d-app:master Jul 1, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dynamic domains support to option framework

2 participants