Skip to content

Commit

Permalink
#11332 2D Intersection Views: Improve automatic depth resolution.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriben committed Apr 10, 2024
1 parent 7836181 commit eb02e9e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,13 @@ void RivWindowEdgeAxesOverlayItem::updateFromCamera( const Camera* camera )
double domainMinY = m_domainAxes == XY_AXES ? windowOrigoInDomain.y() : windowOrigoInDomain.z();
double domainMaxY = m_domainAxes == XY_AXES ? windowMaxInDomain.y() : windowMaxInDomain.z();

int xTickMaxCount = m_windowSize.x() / ( 2 * m_textSize.x() );
int yTickMaxCount = m_windowSize.y() / ( 2 * m_textSize.x() );
int textSizeX = 2 * m_textSize.x();
int xTickMaxCount = m_windowSize.x() / textSizeX;

// Use same textsize for Y dimension for XY axes to get square "tiles".
// For XZ axes more ticks looks better in Z (depth) axis.
int textSizeY = m_domainAxes == XY_AXES ? textSizeX : 4 * m_textSize.y();
int yTickMaxCount = m_windowSize.y() / textSizeY;

double minDomainXStepSize = ( domainMaxX - domainMinX ) / xTickMaxCount;
caf::TickMarkGenerator xTickCreator( domainMinX, domainMaxX, minDomainXStepSize );
Expand Down

0 comments on commit eb02e9e

Please sign in to comment.