18 m_showAsPolyline(false),
19 m_showTrihedrons(true),
20 m_trihedronsScale(1.0f) {}
25 m_bBox(buffer.m_bBox),
26 m_bBoxValidSize(buffer.m_bBoxValidSize),
27 m_showAsPolyline(buffer.m_showAsPolyline),
28 m_showTrihedrons(buffer.m_showTrihedrons),
29 m_trihedronsScale(buffer.m_trihedronsScale) {
31 this->std::vector<ccIndexedTransformation>::operator=(buffer);
32 }
catch (
const std::bad_alloc&) {
34 "[ccIndexedTransformationBuffer] Failed to copy original "
35 "content (not enough memory)");
45 return a.getIndex() < index;
56 size_t* trans1IndexInBuffer,
57 size_t* trans2IndexInBuffer)
const {
64 if (trans1IndexInBuffer) *trans1IndexInBuffer = 0;
65 if (trans2IndexInBuffer) *trans2IndexInBuffer = 0;
67 #if defined(_MSC_VER) && _MSC_VER > 1000
70 ccIndexedTransformationBuffer::const_iterator it =
73 ccIndexedTransformationBuffer::const_iterator it =
80 if (trans1IndexInBuffer) *trans1IndexInBuffer =
size() - 1;
85 if (it->getIndex() == index) {
87 if (trans1IndexInBuffer) *trans1IndexInBuffer = it - begin();
91 if (trans2IndexInBuffer) *trans2IndexInBuffer = it - begin();
95 if (trans2IndexInBuffer) *trans2IndexInBuffer = it - begin();
99 if (trans1IndexInBuffer) *trans1IndexInBuffer = it - begin();
112 for (ccIndexedTransformationBuffer::const_iterator it = begin();
135 double maxIndexDistForInterpolation )
const {
146 if (i1 + maxIndexDistForInterpolation < index)
150 double i2 = t2->getIndex();
151 if (i2 - maxIndexDistForInterpolation >
163 if (t2->getIndex() != index)
173 short dataVersion)
const {
174 assert(out.isOpen() && (out.openMode() & QIODevice::WriteOnly));
175 if (dataVersion < 34) {
183 uint32_t
count =
static_cast<uint32_t
>(
size());
187 for (ccIndexedTransformationBuffer::const_iterator it = begin();
189 if (!it->toFile(out, dataVersion))
return false;
208 short minVersion = std::max(
static_cast<short>(34),
211 minVersion = std::max(
219 QFile& in,
short dataVersion,
int flags,
LoadedIDMap& oldToNewIDMap) {
230 }
catch (
const std::bad_alloc&) {
236 for (ccIndexedTransformationBuffer::iterator it = begin(); it != end();
238 if (!it->fromFile(in, dataVersion, flags, oldToNewIDMap))
return false;
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Hierarchical CLOUDVIEWER Object.
virtual short minimumFileVersion_MeOnly() const
virtual bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
Loads own object data.
short minimumFileVersion() const override
Returns the minimum file version required to save this instance.
virtual bool toFile_MeOnly(QFile &out, short dataVersion) const
Save own object data.
QMultiMap< unsigned, unsigned > LoadedIDMap
Map of loaded unique IDs (old ID --> new ID)
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'.
static bool MemoryError()
Sends a custom error message (not enough memory) and returns 'false'.
const Vector3Tpl< T > & maxCorner() const
Returns max corner (const)
void setValidity(bool state)
Sets bonding box validity.
const Vector3Tpl< T > & minCorner() const
Returns min corner (const)
bool isValid() const
Returns whether bounding box is valid or not.
void add(const Vector3Tpl< T > &P)
'Enlarges' the bounding box with a point