Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new option type: direction_t #2007

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

mwestphal
Copy link
Contributor

@mwestphal mwestphal commented Feb 20, 2025

  • Add a new option type: direction_t
  • Use it for up-direction and modify implementation accordingly
  • Use parsing of direction for camera-direction
  • Add doc and testing

Copy link

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

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.71%. Comparing base (6fd0155) to head (927ea8d).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2007      +/-   ##
==========================================
+ Coverage   95.68%   95.71%   +0.02%     
==========================================
  Files         126      126              
  Lines       10198    10266      +68     
==========================================
+ Hits         9758     9826      +68     
  Misses        440      440              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -74,10 +74,6 @@ int TestSDKOptions(int argc, char* argv[])
test("set/get string", std::get<std::string>(opt.get("model.color.texture")) == "test");

// Test double vector
std::stringstream ssDouble;
ssDouble << std::vector<double>{ 1.1, 2., 3. };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Meakk I had to remove this test because the constructor for color_t and direction_t are not explicit.
It fails to compile because the compiler is not able to figure out which type should be used for this << operator.

So maybe you are right on that regard ?

I could add them but it requires some work in the cmake code generation stuff.

Copy link
Member

@Meakk Meakk Feb 25, 2025

Choose a reason for hiding this comment

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

Yes I still think the constructor should be explicit. I don't like the idea of the compiler having the freedom the implicitly convert types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

something like that @Meakk ?

Copy link
Member

Choose a reason for hiding this comment

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

yes it looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants