-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Generalize up direction #1536
base: master
Are you sure you want to change the base?
Generalize up direction #1536
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1536 +/- ##
==========================================
- Coverage 96.81% 96.78% -0.03%
==========================================
Files 106 106
Lines 7823 7907 +84
==========================================
+ Hits 7574 7653 +79
- Misses 249 254 +5 ☔ View full report in Codecov by Sentry. |
const std::string repr = std::string(prop3d->GetClassName()); | ||
F3DLog::Print(F3DLog::Severity::Warning, | ||
"Could not properly account for " + repr + | ||
" in non-axis-aligned bounds computation"); | ||
extendBoxAxisAligned(prop3d, box); |
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.
This is a fallback in the unlikely case there is no custom bounds implementation for a given prop3d
. It should not happen if we have all the possible props/actors/mappers types handled so I don't think it can be covered by tests.
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.
then let's assert?
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.
couldn't a plugin use some exotic prop we haven't covered tho?
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.
here are some comments
const std::string repr = std::string(prop3d->GetClassName()); | ||
F3DLog::Print(F3DLog::Severity::Warning, | ||
"Could not properly account for " + repr + | ||
" in non-axis-aligned bounds computation"); | ||
extendBoxAxisAligned(prop3d, box); |
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.
then let's assert?
double delta[3]; | ||
this->GetEnvironmentUp(delta); | ||
vtkMath::MultiplyScalar(delta, downShift); | ||
vtkMath::Subtract(gridPos, delta, gridPos); |
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.
not sure here, but it seems like you are using the 4x4 matrix to rotate and then this code does the translation.
You can encode rotation and translation within the same 4x4 matrix (last column for the translation)
|
||
double orientation[3]; | ||
vtkTransform::GetOrientation(orientation, upMatrixInv); | ||
this->GridActor->SetOrientation(orientation); |
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.
If properly built, you can just use SetUserMatrix
directly.
would fix #1533