Skip to content

Create vector math structs#345

Merged
weshinsley merged 17 commits into
mrc-ide:masterfrom
CloneDeath:create-vector-math-structs
Jun 16, 2020
Merged

Create vector math structs#345
weshinsley merged 17 commits into
mrc-ide:masterfrom
CloneDeath:create-vector-math-structs

Conversation

@CloneDeath

Copy link
Copy Markdown
Contributor

My other PR #325 was getting very large, and I decided to split it up into parts. Future pull requests (after this is merged) will focus on utilizing this refactoring, ie by simplifying a lot of vector math.

This PR mainly focuses on introducing the Vector2, Size, and BoundingBox classes, and replacing several member pairs with their usage.

@matt-gretton-dann I held back on pulling structs out of Model except for the bare minimum.
The ones I pulled out were simply due to circular dependencies in the header files, caused by Diff.h.
Ideally, I'd like to remove the dependency of Diff on several Model classes (as I did in #325) but I'll do that in a separate PR.

@CloneDeath

Copy link
Copy Markdown
Contributor Author

@matt-gretton-dann Do you think you'll have a chance to look at this PR today?

@NeilFerguson NeilFerguson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Despite my fondness for pure C, these look fine, assuming regression tests are OK.

@CloneDeath

Copy link
Copy Markdown
Contributor Author

@NeilFerguson

Despite my fondness for pure C, these look fine, assuming regression tests are OK.

Yup, all the tests currently pass.

I've purposely only introduced the classes and replaced the member pairs, in order to minimize the chance of any errors being introduced.

@CloneDeath CloneDeath force-pushed the create-vector-math-structs branch from f7efa10 to 369a2df Compare June 8, 2020 13:30
@CloneDeath

Copy link
Copy Markdown
Contributor Author

@matt-gretton-dann Given Neil's approval, do you think you can merge this, so I can start working on the next part?

@CloneDeath CloneDeath force-pushed the create-vector-math-structs branch from 369a2df to 276eea7 Compare June 12, 2020 13:03
@CloneDeath

Copy link
Copy Markdown
Contributor Author

@weshinsley Would you mind taking a look at this PR for merge? It's the first step in refactoring out the vector math, which is why the changes are pretty limited.

@weshinsley

weshinsley commented Jun 15, 2020

Copy link
Copy Markdown
Collaborator

Got 2 or 3 I'm looking at/testing at the moment - will do this next... very quick picky thing - can we have a newline at the end of your new files?

(Also, I think another merge has just nudged Model.h... sorry)

@CloneDeath CloneDeath force-pushed the create-vector-math-structs branch from 276eea7 to b845f55 Compare June 15, 2020 14:35
@CloneDeath CloneDeath force-pushed the create-vector-math-structs branch from 19324ad to b2fecc5 Compare June 15, 2020 14:39
@CloneDeath

Copy link
Copy Markdown
Contributor Author

@weshinsley No problem. Merge conflict fixed, and newlines added. 👍

@weshinsley

Copy link
Copy Markdown
Collaborator

Ok, on the basis of Neil's approval, tests passing, and identical report 9 results, this looks good to merge.

@weshinsley weshinsley merged commit aeef9e5 into mrc-ide:master Jun 16, 2020
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.

3 participants