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

Hard-coded marker number #4

Open
shae-wat opened this issue Aug 26, 2013 · 1 comment
Open

Hard-coded marker number #4

shae-wat opened this issue Aug 26, 2013 · 1 comment

Comments

@shae-wat
Copy link
Contributor

The program is designed to handle 50 markers.

Over the summer I was able to get around this to handle c3d files with less than 50 markers. But to truly trust implementation and expand it to any marker number a refactoring is required.

The hard-coded marker number should be removed from the code by refactoring the areas that handle this hard-set number. First, hard-coded "50"s should be replaced with a variable. Then, hard-coded arrays (any other things affected by marker number) should have the way they interact with the code base abstracted such that any number of markers is ok. This may take awhile if done correctly. I will be referencing Martin Fowler's Refactoring: Improving the Design of Existing Code as a source of inspiration / design guidelines for my part in the refactoring process.

@lmjohns3
Copy link
Member

Joseph added a compile-time constant defined in QtVR.pro as MARKER_COUNT (see https://github.com/EmbodiedCognition/QtVR/blob/master/QtVR.pro#L103).

It's not a runtime variable, but it does seem like this should help the code be able to handle other marker counts.

If nothing else it'll be easier to grep for MARKER_COUNT than for 50.

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

No branches or pull requests

2 participants