-
Notifications
You must be signed in to change notification settings - Fork 41
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
[Citadel][TPE] Cache Entity data #73
Conversation
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## tpe_collide_bitmask #73 +/- ##
=======================================================
+ Coverage 82.66% 82.74% +0.08%
=======================================================
Files 106 106
Lines 3622 3645 +23
=======================================================
+ Hits 2994 3016 +22
- Misses 628 629 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I think the added logic of keeping track of parents and children is OK, considering it will help in case we have other properties to keep track of (like the bounding box issue you just found).
Just a small note on adding tests for the bitmask feature but other than that looks good!
EXPECT_EQ(expectedBoxLinkFrame, linkEnt.GetBoundingBox(true)); | ||
EXPECT_EQ(expectedBoxLinkFrame, linkEnt.GetBoundingBox()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting, so basically since _force
was being set to true before the dirty flag was actually not being tested?
Can you add a few lines to set bitmasks for the Collision objects here and test the OR-ing / collideBitmaskDirty
logic as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok saw it, looks great!
…nd add CollisionFilterMaskFeature (#69) * Add collide bitmask and CollisionFilterMaskFeature Signed-off-by: Ian Chen <[email protected]> * cleanup Signed-off-by: Ian Chen <[email protected]> * use unordered map in tpe collision checking, remove bitmask cache Signed-off-by: Ian Chen <[email protected]> * tpe cache collide bitmask and bbox (#73) Signed-off-by: Ian Chen <[email protected]> * add sdf include Signed-off-by: Ian Chen <[email protected]> * fixing windows build Signed-off-by: Ian Chen <[email protected]> * fixing windows Signed-off-by: Ian Chen <[email protected]> * fixing windows Signed-off-by: Ian Chen <[email protected]>
Added flags to keep track of entity changes so that we can return cached data like collide bitmasks and bounding box if no changes are detected.
While making these changes, I noticed there was already a flag to keep track of bounding box changes (
bboxDirty
) but it was never set to true so bounding boxes were never recomputed.I added some logic and public functions to to help propagate these flags up the tree (
Set|GetParent
,ChildrenChanged
). Not ideal so feedback welcome.Signed-off-by: Ian Chen [email protected]