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

Refactor vector3_t #1645 #1648

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

Conversation

Yogesh9000
Copy link
Contributor

refactored vector3_t and added a naive parse function

Copy link

github-actions bot commented Oct 5, 2024

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 Oct 5, 2024

Codecov Report

Attention: Patch coverage is 99.47971% with 5 lines in your changes missing coverage. Please review.

Project coverage is 96.93%. Comparing base (544ae70) to head (2a0eef1).
Report is 35 commits behind head on master.

Files with missing lines Patch % Lines
library/public/types.h 90.24% 4 Missing ⚠️
application/F3DStarter.cxx 99.60% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1648      +/-   ##
==========================================
+ Coverage   96.85%   96.93%   +0.08%     
==========================================
  Files         108      106       -2     
  Lines        7691     8789    +1098     
==========================================
+ Hits         7449     8520    +1071     
- Misses        242      269      +27     

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

library/public/types.h Outdated Show resolved Hide resolved
library/public/types.h Outdated Show resolved Hide resolved
library/public/types.h Outdated Show resolved Hide resolved
@@ -4,6 +4,10 @@
"type": "string",
"default_value": "+Y"
},
"up_direction2": {
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a test in TestSDKOption.cxx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what am I supposed to here exactly. there doesn't seems to be test for other options in TestSDKOption.cxx

Copy link
Contributor

Choose a reason for hiding this comment

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

TestSDKOptions.cxx test all types of options, you are adding a new type of option, you should test it.

@Yogesh9000 Yogesh9000 requested a review from mwestphal October 8, 2024 20:03
{
throw options::parsing_exception("cannot parse " + str + " to a vector3_t");
}
int sign = +1;
Copy link
Member

Choose a reason for hiding this comment

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

We do have a logic based on regex working there:

if (std::regex_match(upString, match, re))

Feel free to copy it.
The advantage is it supports lowercase, omitting the + prefix, and errors out if invalid.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Yogesh9000 please take this into account.

library/public/types.h Show resolved Hide resolved
library/testing/PseudoUnitTest.h Outdated Show resolved Hide resolved
library/public/types.h Outdated Show resolved Hide resolved
library/public/types.h Outdated Show resolved Hide resolved
library/public/types.h Outdated Show resolved Hide resolved
library/public/types.h Outdated Show resolved Hide resolved
library/public/types.h Outdated Show resolved Hide resolved
library/testing/TestSDKOptionsIO.cxx Outdated Show resolved Hide resolved
python/F3DPythonBindings.cxx Show resolved Hide resolved
mwestphal and others added 26 commits November 15, 2024 22:34
Fix nightly CI logic in VTK action and also remove useless label in nightly CI.
Chaning cache number not needed has there is no cache used for nightly.
Fixes issue f3d-app#1259 

Changes:
* Renamed page title from "Usage" to "Quickstart Guide".
* Added short introduction.
* Added "Prerequisites" section.
* Added "Run F3D" section and added quickstart section from README file.
* Reformatted supported file formats into table including scene and animation support.
* Improved style in "Animations" and "Plugins" sections.
* Added "Further Reading" section with links to other user documentation pages.
* Rename the "Usage" page to "Quickstart"

Co-authored-by: kli332 <kli332@wisc.edu>
 - Add a interactor::command API
 - Add the following commands:
   - set
   - toggle
   - reset
   - unset
   - print
   -  many specific commands
 - Add dedicated documentation
 - Add python bindings and tests
 - Fix f3d-app#1685
 - Change options::toggle behavior with optional bool
 - Add tests
 - Add triggerCommand binding for java and wasm
Add an API to let libf3d users control how interactions are handled

 - Add `interactor::addInteractionCommand`, `interactor::removeInteractorCommand`
 - Use it in `interactor_impl` to declare all libf3d interactions
 - Use it in F3DStarter to to declare all F3D interactions
 - Remove `interactor::setKeyPressCallBack`
 - Implement the interaction command logic in OnKeyPress
 - Update TestSDKInteractorCallback accordingly
 - Add libf3d doc
 - Add python bindings and tests


Co-authored-by: snoyer <noyer.stephane@gmail.com>
  - Add a command callback "add_files" in libf3d to add files to a scene
  - Add an interaction command for "Drop" interaction to trigger "add_files"
  - Rework OnDropFiles interaction to trigger a "Drop" interaction with added "files" as arguments of the command
  - Add command callbacks in F3D application to "add_files" , "set_hdri", "add_files_or_set_hdri"
  - Add interactions commands for "Drop" -> "add_files_or_set_hdri", "CTRL+Drop"  -> add_files, "SHIFT+Drop" -> "set_hdri"
  - Remove user drop files callback logic
  - Rework tests to ensure multifile drop is tested
  - Add a modified drops test
  - Rework SDK callback test to test Drop interaction
  - Fix: f3d-app#1159
  - Add libf3d doc
  - Add doc for the new commands
+ add test for new types to TestSDKOptions.cxx
+ update vector3_t parse() function to using std::regex
+ add attribute F3D_EXPORT to struct type_creation_exception
@Yogesh9000 Yogesh9000 requested a review from mwestphal November 15, 2024 19:45
@mwestphal
Copy link
Contributor

Please rebase your branch on master instead of merging

@mwestphal
Copy link
Contributor

@Yogesh9000
Copy link
Contributor Author

here is a cleaned up rebase: https://github.com/mwestphal/f3d/tree/feature/add-a-direction-type

nice.

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.

6 participants