Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
PbNumericDisplayFormat Class Reference

MeshViz Class to define a numeric display format. More...

#include <MeshViz/graph/PbNumericDisplayFormat.h>

+ Inheritance diagram for PbNumericDisplayFormat:

Public Types

enum  FormatType {
  AUTO_FORMAT ,
  FLOAT_FORMAT ,
  INTEGER_FORMAT
}
 

Public Member Functions

 PbNumericDisplayFormat (FormatType type=AUTO_FORMAT, int tenPower=0, int numDecimal=0)
 Constructor.
 
 PbNumericDisplayFormat (const PbNumericDisplayFormat &format)
 Copy constructor.
 
void setFormat (FormatType type=AUTO_FORMAT, int tenPower=0, int numDecimal=0)
 Sets the numerical display format.
 
void getFormat (FormatType &type, int &tenPower, int &numDecimal) const
 Gets the numerical display format.
 
PbNumericDisplayFormatoperator= (const PbNumericDisplayFormat &format)
 Assignment operator.
 
- Public Member Functions inherited from PbBase
void enableConnection (SbBool flag)
 Activates/deactivates the mechanism of connection.
 
SbBool isConnectionEnabled () const
 Returns TRUE if the connection mechanism is active, otherwise FALSE.
 
void touch ()
 Simulates the changing of an instance of this object, so all connected objects are informed of this change.
 
PbBaseoperator= (const PbBase &base)
 Assignment operator.
 

Detailed Description

MeshViz Class to define a numeric display format.

This class is used to define a numerical display format for numerical values to be displayed. There are three formats available: automatic format, floating point format, integer format. The default format is the automatic format. The automatic format selects the best format adapted to the domain of values to be displayed. The floating point format and the integer format divide the numerical value to be displayed by the power of ten, and then display it in the selected format.

Definition at line 43 of file PbNumericDisplayFormat.h.

Member Enumeration Documentation

◆ FormatType

Enumerator
AUTO_FORMAT 

Automatic numerical display format.

FLOAT_FORMAT 

Floating-point numerical display format.

INTEGER_FORMAT 

Integer numerical display format.

Definition at line 48 of file PbNumericDisplayFormat.h.

Constructor & Destructor Documentation

◆ PbNumericDisplayFormat() [1/2]

PbNumericDisplayFormat::PbNumericDisplayFormat ( FormatType  type = AUTO_FORMAT,
int  tenPower = 0,
int  numDecimal = 0 
)

Constructor.

◆ PbNumericDisplayFormat() [2/2]

PbNumericDisplayFormat::PbNumericDisplayFormat ( const PbNumericDisplayFormat format)

Copy constructor.

Member Function Documentation

◆ getFormat()

void PbNumericDisplayFormat::getFormat ( FormatType type,
int &  tenPower,
int &  numDecimal 
) const
inline

Gets the numerical display format.

Definition at line 91 of file PbNumericDisplayFormat.h.

◆ operator=()

PbNumericDisplayFormat & PbNumericDisplayFormat::operator= ( const PbNumericDisplayFormat format)

Assignment operator.

◆ setFormat()

void PbNumericDisplayFormat::setFormat ( FormatType  type = AUTO_FORMAT,
int  tenPower = 0,
int  numDecimal = 0 
)

Sets the numerical display format.

If the format is AUTO_FORMAT, numDecimal and tenPower are useless. If the format is FLOAT_FORMAT, numDecimal indicates the number of decimals placed after the decimal point and tenPower is the power of ten divisor. If the format is INTEGER_FORMAT, numDecimal is useless.


The documentation for this class was generated from the following file: