NCBI C++ ToolKit
Public Member Functions | Protected Attributes | List of all members
CNormalizer Class Reference

Search Toolkit Book for CNormalizer

this class converts model units to the integers distribited in [0, m_IntRange] and vice versa More...

#include <gui/widgets/gl/gl_widget_base.hpp>

Public Member Functions

 CNormalizer (double min, double max, int int_range)
 
int RealToInt (double real)
 
int SizeToInt (double size)
 
double IntToReal (int i)
 
double IntToSize (int i)
 

Protected Attributes

double m_Min
 
double m_Max
 
int m_IntRange
 

Detailed Description

this class converts model units to the integers distribited in [0, m_IntRange] and vice versa

Definition at line 176 of file gl_widget_base.hpp.

Constructor & Destructor Documentation

◆ CNormalizer()

CNormalizer::CNormalizer ( double  min,
double  max,
int  int_range 
)
inline

Definition at line 179 of file gl_widget_base.hpp.

Member Function Documentation

◆ IntToReal()

double CNormalizer::IntToReal ( int  i)
inline

◆ IntToSize()

double CNormalizer::IntToSize ( int  i)
inline

Definition at line 197 of file gl_widget_base.hpp.

References i, m_IntRange, m_Max, m_Min, and ncbi_round.

◆ RealToInt()

int CNormalizer::RealToInt ( double  real)
inline

◆ SizeToInt()

int CNormalizer::SizeToInt ( double  size)
inline

Member Data Documentation

◆ m_IntRange

int CNormalizer::m_IntRange
protected

Definition at line 204 of file gl_widget_base.hpp.

Referenced by IntToReal(), IntToSize(), RealToInt(), and SizeToInt().

◆ m_Max

double CNormalizer::m_Max
protected

Definition at line 203 of file gl_widget_base.hpp.

Referenced by IntToReal(), IntToSize(), RealToInt(), and SizeToInt().

◆ m_Min

double CNormalizer::m_Min
protected

Definition at line 203 of file gl_widget_base.hpp.

Referenced by IntToReal(), IntToSize(), RealToInt(), and SizeToInt().


The documentation for this class was generated from the following file:
Modified on Tue Jul 16 13:24:11 2024 by modify_doxy.py rev. 669887