Helper class to handle big coordinates shift/scale (typically while loading entities)
More...
#include <ccGlobalShiftManager.h>
|
enum | Mode { NO_DIALOG
, NO_DIALOG_AUTO_SHIFT
, DIALOG_IF_NECESSARY
, ALWAYS_DISPLAY_DIALOG
} |
| Strategy to handle coordinates shift/scale.
|
|
|
static bool | Handle (const CCVector3d &P, double diagonal, Mode mode, bool useInputCoordinatesShiftIfPossible, CCVector3d &coordinatesShift, bool *_preserveCoordinateShift=nullptr, double *_coordinatesScale=nullptr, bool *_applyAll=nullptr) |
| Handles coordinates shift/scale given the first 3D point and current related parameters.
|
|
static bool | NeedShift (const CCVector3d &P) |
| Returns whether a particular point (coordinates) is too big or not.
|
|
static bool | NeedShift (double d) |
| Returns whether a particular point coordinate is too big or not.
|
|
static bool | NeedRescale (double d) |
| Returns whether a particular dimension (e.g. diagonal) is too big or not.
|
|
static CCVector3d | BestShift (const CCVector3d &P) |
| Suggests a shift for a given point expressed in global coordinate space.
|
|
static double | BestScale (double d) |
| Suggests a scale for a given dimension (e.g. diagonal) in global coordinate space.
|
|
static double | MaxCoordinateAbsValue () |
| Returns the max coordinate (absolute) value.
|
|
static void | SetMaxCoordinateAbsValue (double value) |
| Sets the max coordinate (absolute) value.
|
|
static double | MaxBoundgBoxDiagonal () |
| Returns max bounding-box diagonal.
|
|
static void | SetMaxBoundgBoxDiagonal (double value) |
| Sets the max bounding-box diagonal.
|
|
static void | StoreShift (const CCVector3d &shift, double scale, bool preserve=true) |
| Adds a new shift / scale couple.
|
|
static const std::vector< ShiftInfo > & | GetLast () |
| Returns the default and last input shift/scale entries.
|
|
static bool | LoadInfoFromFile (QString filename, std::vector< ShiftInfo > &infos) |
| Tries to load ShiftInfo data from a (text) file. More...
|
|
|
static double | MAX_COORDINATE_ABS_VALUE = 1.0e4 |
|
static double | MAX_DIAGONAL_LENGTH = 1.0e6 |
|
Helper class to handle big coordinates shift/scale (typically while loading entities)
◆ LoadInfoFromFile()
bool ccGlobalShiftManager::LoadInfoFromFile |
( |
QString |
filename, |
|
|
std::vector< ShiftInfo > & |
infos |
|
) |
| |
|
static |
Tries to load ShiftInfo data from a (text) file.
- Parameters
-
[in] | filename | filename |
[out] | infos | read information |
- Returns
- success
The documentation for this class was generated from the following files:
- ccGlobalShiftManager.h
- ccGlobalShiftManager.cpp