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 = 1.0e4
 
static double MAX_DIAGONAL_LENGTH = 1.0e6
 

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()

double ecvGlobalShiftManager::BestScale ( double  d)
static

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

Definition at line 308 of file ecvGlobalShiftManager.cpp.

References cloudViewer::utility::ceil(), and MAX_DIAGONAL_LENGTH.

Referenced by Handle().

◆ BestShift()

CCVector3d ecvGlobalShiftManager::BestShift ( const CCVector3d P)
static

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

Definition at line 291 of file ecvGlobalShiftManager.cpp.

References MAX_COORDINATE_ABS_VALUE, NeedShift(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

Referenced by Handle().

◆ GetLast() [1/2]

bool ecvGlobalShiftManager::GetLast ( ShiftInfo info)
static

Definition at line 51 of file ecvGlobalShiftManager.cpp.

References s_lastInfoBuffer.

◆ GetLast() [2/2]

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

Definition at line 59 of file ecvGlobalShiftManager.cpp.

References s_lastInfoBuffer, and CVLog::Warning().

◆ Handle()

◆ 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()

bool ecvGlobalShiftManager::NeedRescale ( double  d)
static

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

Definition at line 78 of file ecvGlobalShiftManager.cpp.

References MAX_DIAGONAL_LENGTH.

Referenced by Handle(), and ecvShiftAndScaleCloudDlg::updateLocalSystem().

◆ NeedShift() [1/2]

bool ecvGlobalShiftManager::NeedShift ( const CCVector3d P)
static

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

Definition at line 70 of file ecvGlobalShiftManager.cpp.

References Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

Referenced by BestShift(), Handle(), LASFWFFilter::saveToFile(), LasIOFilter::saveToFile(), LASFilter::saveToFile(), and ecvShiftAndScaleCloudDlg::updateLocalSystem().

◆ NeedShift() [2/2]

bool ecvGlobalShiftManager::NeedShift ( double  d)
static

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

Definition at line 74 of file ecvGlobalShiftManager.cpp.

References MAX_COORDINATE_ABS_VALUE.

◆ 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()

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

Member Data Documentation

◆ MAX_COORDINATE_ABS_VALUE

double ecvGlobalShiftManager::MAX_COORDINATE_ABS_VALUE = 1.0e4
staticprotected

Definition at line 100 of file ecvGlobalShiftManager.h.

Referenced by BestShift(), and NeedShift().

◆ MAX_DIAGONAL_LENGTH

double ecvGlobalShiftManager::MAX_DIAGONAL_LENGTH = 1.0e6
staticprotected

Definition at line 103 of file ecvGlobalShiftManager.h.

Referenced by BestScale(), and NeedRescale().


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