57 const CCVector3d& globalShift = getGlobalShift();
58 return (globalShift.
x != 0 || globalShift.
y != 0 ||
59 globalShift.
z != 0 || getGlobalScale() != 1.0);
66 return Plocal.
toDouble() / getGlobalScale() - getGlobalShift();
73 return (Pglobal.
toDouble() + getGlobalShift()) * getGlobalScale();
79 Pglobal.
toDouble() * getGlobalScale() + getGlobalShift();
Vector3Tpl< double > CCVector3d
Double 3D Vector.
Vector3Tpl< PointCoordinateType > toPC() const
Vector3Tpl< double > toDouble() const
Cast operator to a double vector (explicit call version)
Hierarchical CLOUDVIEWER Object.
Shifted entity interface.
double m_globalScale
Global scale (typically applied at loading time)
CCVector3d m_globalShift
Global shift (typically applied at loading time)
ccShiftedObject(const ccShiftedObject &s)
Copy constructor.
bool loadShiftInfoFromFile(QFile &in)
Serialization helper (input)
virtual void setGlobalScale(double scale)
bool getOwnGlobalBB(CCVector3d &minCorner, CCVector3d &maxCorner) override
CCVector3d toGlobal3d(const Vector3Tpl< T > &Plocal) const
Returns the point back-projected into the original coordinates system.
CCVector3 toLocal3pc(const Vector3Tpl< T > &Pglobal) const
Returns the point projected into the local (shifted) coordinates system.
CCVector3d toLocal3d(const Vector3Tpl< T > &Pglobal) const
Returns the point projected into the local (shifted) coordinates system.
GlobalBoundingBox getOwnGlobalBB(bool withGLFeatures=false) override
bool isShifted() const
Returns whether the cloud is shifted or not.
virtual void setGlobalShift(double x, double y, double z)
Sets shift applied to original coordinates (information storage only)
virtual const CCVector3d & getGlobalShift() const
Returns the shift applied to original coordinates.
virtual void setGlobalShift(const CCVector3d &shift)
Sets shift applied to original coordinates (information storage only)
virtual double getGlobalScale() const
Returns the scale applied to original coordinates.
void copyGlobalShiftAndScale(const ccShiftedObject &s)
Copies the Global Shift and Scale from another entity.
ccShiftedObject(QString name=QString())
Default constructor.
bool saveShiftInfoToFile(QFile &out) const
Serialization helper (output)