17 :
ccHObject(
name), m_globalShift(0, 0, 0), m_globalScale(1.0) {}
21 m_globalShift(s.m_globalShift),
22 m_globalScale(s.m_globalScale) {}
44 if (out.write((
const char*)
m_globalShift.
u,
sizeof(
double) * 3) < 0)
47 if (out.write((
const char*)&
m_globalScale,
sizeof(
double)) < 0)
73 bool withGLFeatures ) {
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Hierarchical CLOUDVIEWER Object.
cloudViewer::BoundingBoxTpl< double > GlobalBoundingBox
Global (non-shifted) bounding-box.
virtual ccBBox getOwnBB(bool withGLFeatures=false)
Returns the entity's own bounding-box.
static bool ReadError()
Sends a custom error message (read error) and returns 'false'.
static bool WriteError()
Sends a custom error message (write error) and returns 'false'.
Shifted entity interface.
double m_globalScale
Global scale (typically applied at loading time)
CCVector3d m_globalShift
Global shift (typically applied at loading time)
bool loadShiftInfoFromFile(QFile &in)
Serialization helper (input)
bool getOwnGlobalBB(CCVector3d &minCorner, CCVector3d &maxCorner) override
CCVector3d toGlobal3d(const Vector3Tpl< T > &Plocal) const
Returns the point back-projected into the original coordinates system.
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 setGlobalScale(double scale)
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)
const Vector3Tpl< T > & maxCorner() const
Returns max corner (const)
const Vector3Tpl< T > & minCorner() const
Returns min corner (const)
bool isValid() const
Returns whether bounding box is valid or not.