mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
parent
2e0d972761
commit
08b4fec678
@ -450,15 +450,17 @@ std::array<cvf::Vec3f, 7>
|
||||
std::swap( headTop, shaftStart );
|
||||
}
|
||||
|
||||
float headLength = std::min<float>( evrViz.approximateCellLength / 5.0f, ( headTop - shaftStart ).length() / 2.0 );
|
||||
float headLength = std::min<float>( evrViz.approximateCellLength / 3.0f, ( headTop - shaftStart ).length() / 2.0 );
|
||||
|
||||
// A fixed size is preferred here
|
||||
cvf::Vec3f headBottom = headTop - ( headTop - shaftStart ).getNormalized() * headLength;
|
||||
|
||||
float arrowWidth = headLength / 2.0f;
|
||||
|
||||
cvf::Vec3f headBottomDirection1 = evrViz.faceNormal ^ evrViz.faceCenter;
|
||||
cvf::Vec3f headBottomDirection2 = headBottomDirection1 ^ evrViz.faceNormal;
|
||||
cvf::Vec3f arrowBottomSegment1 = headBottomDirection1.getNormalized() * headLength / 8.0f;
|
||||
cvf::Vec3f arrowBottomSegment2 = headBottomDirection2.getNormalized() * headLength / 8.0f;
|
||||
cvf::Vec3f arrowBottomSegment1 = headBottomDirection1.getNormalized() * arrowWidth;
|
||||
cvf::Vec3f arrowBottomSegment2 = headBottomDirection2.getNormalized() * arrowWidth;
|
||||
|
||||
vertices[0] = shaftStart;
|
||||
vertices[1] = headBottom;
|
||||
|
Loading…
Reference in New Issue
Block a user