ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvGlobalShiftManager Class Reference

#include <ecvGlobalShiftManager.h>

Classes

struct  ShiftInfo
 Shift and scale info. More...
 

Public Types

enum  Mode { NO_DIALOG , NO_DIALOG_AUTO_SHIFT , DIALOG_IF_NECESSARY , ALWAYS_DISPLAY_DIALOG }
 Strategy to handle coordinates shift/scale. More...
 

Static Public Member Functions

static bool Handle (const CCVector3d &P, double diagonal, Mode mode, bool useInputCoordinatesShiftIfPossible, CCVector3d &coordinatesShift, bool *preserveCoordinateShift, double *coordinatesScale, bool *applyAll=0)
 
static bool NeedShift (const CCVector3d &P)
 Returns whether a particular point (coordinates) is too big or not. More...
 
static bool NeedShift (double d)
 Returns whether a particular point coordinate is too big or not. More...
 
static bool NeedRescale (double d)
 Returns whether a particular dimension (e.g. diagonal) is too big or not. More...
 
static CCVector3d BestShift (const CCVector3d &P)
 Suggests a shift for a given point expressed in global coordinate space. More...
 
static double BestScale (double d)
 
static double MaxCoordinateAbsValue ()
 Returns the max coordinate (absolute) value. More...
 
static void SetMaxCoordinateAbsValue (double value)
 Sets the max coordinate (absolute) value. More...
 
static double MaxBoundgBoxDiagonal ()
 Returns max bounding-box diagonal. More...
 
static void SetMaxBoundgBoxDiagonal (double value)
 Sets the max bounding-box diagonal. More...
 
static void StoreShift (const CCVector3d &shift, double scale, bool preserve=true)
 Adds a new shift / scale couple. More...
 
static bool GetLast (ShiftInfo &info)
 
static bool GetLast (std::vector< ShiftInfo > &infos)
 

Static Protected Attributes

static double MAX_COORDINATE_ABS_VALUE
 
static double MAX_DIAGONAL_LENGTH
 

Detailed Description

Helper class to handle big coordinates shift/scale (typically while loading entities)

Definition at line 26 of file ecvGlobalShiftManager.h.

Member Enumeration Documentation

◆ Mode

Strategy to handle coordinates shift/scale.

Enumerator
NO_DIALOG 
NO_DIALOG_AUTO_SHIFT 
DIALOG_IF_NECESSARY 
ALWAYS_DISPLAY_DIALOG 

Definition at line 29 of file ecvGlobalShiftManager.h.

Member Function Documentation

◆ BestScale()

static double ecvGlobalShiftManager::BestScale ( double  d)
static

Suggests a scale for a given dimension (e.g. diagonal) in global coordinate space

◆ BestShift()

static CCVector3d ecvGlobalShiftManager::BestShift ( const CCVector3d P)
static

Suggests a shift for a given point expressed in global coordinate space.

◆ GetLast() [1/2]

static bool ecvGlobalShiftManager::GetLast ( ShiftInfo info)
static

◆ GetLast() [2/2]

static bool ecvGlobalShiftManager::GetLast ( std::vector< ShiftInfo > &  infos)
static

◆ Handle()

static bool ecvGlobalShiftManager::Handle ( const CCVector3d P,
double  diagonal,
Mode  mode,
bool  useInputCoordinatesShiftIfPossible,
CCVector3d coordinatesShift,
bool *  preserveCoordinateShift,
double *  coordinatesScale,
bool *  applyAll = 0 
)
static

Handles coordinates shift/scale given the first 3D point and current related parameters

Referenced by ccPointPairRegistrationDlg::addReferencePoint(), and MainWindow::addToDB().

◆ MaxBoundgBoxDiagonal()

static double ecvGlobalShiftManager::MaxBoundgBoxDiagonal ( )
inlinestatic

Returns max bounding-box diagonal.

Definition at line 68 of file ecvGlobalShiftManager.h.

Referenced by InitEnvironment(), and main().

◆ MaxCoordinateAbsValue()

static double ecvGlobalShiftManager::MaxCoordinateAbsValue ( )
inlinestatic

Returns the max coordinate (absolute) value.

Definition at line 61 of file ecvGlobalShiftManager.h.

Referenced by InitEnvironment(), and main().

◆ NeedRescale()

static bool ecvGlobalShiftManager::NeedRescale ( double  d)
static

Returns whether a particular dimension (e.g. diagonal) is too big or not.

◆ NeedShift() [1/2]

static bool ecvGlobalShiftManager::NeedShift ( const CCVector3d P)
static

Returns whether a particular point (coordinates) is too big or not.

Referenced by LASFWFFilter::saveToFile(), LasIOFilter::saveToFile(), and LASFilter::saveToFile().

◆ NeedShift() [2/2]

static bool ecvGlobalShiftManager::NeedShift ( double  d)
static

Returns whether a particular point coordinate is too big or not.

◆ SetMaxBoundgBoxDiagonal()

static void ecvGlobalShiftManager::SetMaxBoundgBoxDiagonal ( double  value)
inlinestatic

Sets the max bounding-box diagonal.

Definition at line 70 of file ecvGlobalShiftManager.h.

Referenced by InitEnvironment().

◆ SetMaxCoordinateAbsValue()

static void ecvGlobalShiftManager::SetMaxCoordinateAbsValue ( double  value)
inlinestatic

Sets the max coordinate (absolute) value.

Definition at line 63 of file ecvGlobalShiftManager.h.

Referenced by InitEnvironment().

◆ StoreShift()

static void ecvGlobalShiftManager::StoreShift ( const CCVector3d shift,
double  scale,
bool  preserve = true 
)
static

Adds a new shift / scale couple.

Member Data Documentation

◆ MAX_COORDINATE_ABS_VALUE

double ecvGlobalShiftManager::MAX_COORDINATE_ABS_VALUE
staticprotected

Definition at line 100 of file ecvGlobalShiftManager.h.

◆ MAX_DIAGONAL_LENGTH

double ecvGlobalShiftManager::MAX_DIAGONAL_LENGTH
staticprotected

Definition at line 103 of file ecvGlobalShiftManager.h.


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