Commit 0686606a authored by Martin Heistermann's avatar Martin Heistermann
Browse files

mat3x3 vis: remove misguided normalize feature.

parent 39cc622b
...@@ -100,15 +100,13 @@ visualizeAsCrossesForEntity(Property prop, EntityIterator e_begin, EntityIterato ...@@ -100,15 +100,13 @@ visualizeAsCrossesForEntity(Property prop, EntityIterator e_begin, EntityIterato
EntityPosition<MeshT> ep{m}; EntityPosition<MeshT> ep{m};
bool normalized = getWidget()->normalize_colors->isChecked();
double scaleFactor = getWidget()->getScaleFactor(); double scaleFactor = getWidget()->getScaleFactor();
for (EntityIterator e_it = e_begin; e_it != e_end; ++e_it) { for (EntityIterator e_it = e_begin; e_it != e_end; ++e_it) {
Matrix3x3d mat = prop[*e_it]; Matrix3x3d mat = prop[*e_it];
Vec3d center_pos = ep(*e_it); Vec3d center_pos = ep(*e_it);
for (unsigned char dim = 0; dim < 3; ++dim) { for (unsigned char dim = 0; dim < 3; ++dim) {
ACG::Vec3d v = mat.getCol(dim); ACG::Vec3d v = mat.getCol(dim) * scaleFactor;
v *= (normalized ? (scaleFactor / v.norm()) : scaleFactor);
lineNode->add_line(center_pos - v, center_pos + v); lineNode->add_line(center_pos - v, center_pos + v);
lineNode->add_color(dim_color[dim]); lineNode->add_color(dim_color[dim]);
} }
...@@ -125,19 +123,11 @@ visualizeAsBoxesForEntity(Property prop, EntityIterator e_begin, EntityIterator ...@@ -125,19 +123,11 @@ visualizeAsBoxesForEntity(Property prop, EntityIterator e_begin, EntityIterator
MeshT &m = *OVMPropertyVisualizer<MeshT>::mesh; MeshT &m = *OVMPropertyVisualizer<MeshT>::mesh;
EntityPosition<MeshT> ep{m}; EntityPosition<MeshT> ep{m};
bool normalized = getWidget()->normalize_colors->isChecked();
for (EntityIterator e_it = e_begin; e_it != e_end; ++e_it) { for (EntityIterator e_it = e_begin; e_it != e_end; ++e_it) {
const Matrix3x3d &mat = prop[*e_it]; const Matrix3x3d &mat = prop[*e_it];
Vec3d center_pos = ep(*e_it); Vec3d center_pos = ep(*e_it);
std::array<Vec3d, 3> dir; boxesNode->push_back({mat, center_pos});
for (unsigned char dim = 0; dim < 3; ++dim) {
dir[dim] = mat.getCol(dim);
if (normalized) {
dir[dim].normalize();
}
}
boxesNode->push_back({Matrix3x3d::fromColumns(dir[0], dir[1], dir[2]), center_pos});
} }
boxesNode->setScaleFactor(getWidget()->getScaleFactor()); boxesNode->setScaleFactor(getWidget()->getScaleFactor());
} }
......
...@@ -159,16 +159,6 @@ ...@@ -159,16 +159,6 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item>
<widget class="QCheckBox" name="normalize">
<property name="text">
<string>Normalize</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item> <item>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="1"> <item row="1" column="1">
...@@ -262,7 +252,6 @@ ...@@ -262,7 +252,6 @@
<tabstops> <tabstops>
<tabstop>as_crosses</tabstop> <tabstop>as_crosses</tabstop>
<tabstop>as_boxes</tabstop> <tabstop>as_boxes</tabstop>
<tabstop>normalize</tabstop>
<tabstop>scale</tabstop> <tabstop>scale</tabstop>
<tabstop>scaleBox</tabstop> <tabstop>scaleBox</tabstop>
<tabstop>vectors_edges_alpha</tabstop> <tabstop>vectors_edges_alpha</tabstop>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment