83 assert(out.isOpen() && (out.openMode() & QIODevice::WriteOnly));
84 if (dataVersion < 21) {
92 QDataStream outStream(&out);
101 return std::max(
static_cast<short>(21),
114 QDataStream inStream(&in);
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
float PointCoordinateType
Type of the coordinates of a (N-D) point.
void clear(bool releaseMemory=false)
ccBox(const CCVector3 &dims, const ccGLMatrix *transMat=nullptr, QString name=QString("Box"))
Default constructor.
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
CCVector3 m_dims
Box dimensions.
short minimumFileVersion_MeOnly() const override
virtual bool buildUp() override
Builds primitive.
virtual ccGenericPrimitive * clone() const override
Clones primitive.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
T * getTranslation()
Retruns a pointer to internal translation.
void initFromParameters(T alpha_rad, const Vector3Tpl< T > &axis3D, const Vector3Tpl< T > &t3D)
Inits transformation from a rotation axis, an angle and a translation.
Float version of ccGLMatrixTpl.
Generic primitive interface.
virtual bool updateRepresentation()
Updates internal representation (as a mesh)
ccGenericPrimitive * finishCloneJob(ccGenericPrimitive *primitive) const
Finished 'clone' job (vertices color, etc.)
ccPointCloud * vertices()
Returns vertices.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
ccGLMatrix m_transformation
Associated transformation (applied to vertices)
short minimumFileVersion_MeOnly() const override
void removePerTriangleNormalIndexes()
Removes any per-triangle triplets of normal indexes.
virtual unsigned size() const override
Returns the number of triangles.
NormsIndexesTableType * m_triNormals
Per-triangle normals.
triangleIndexesContainer * m_triVertIndexes
Triangles' vertices indexes (3 per triangle)
virtual QString getName() const
Returns object name.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
void clear() override
Clears the entity from all its points and features.
QMultiMap< unsigned, unsigned > LoadedIDMap
Map of loaded unique IDs (old ID --> new ID)
static void CoordsFromDataStream(QDataStream &stream, int flags, PointCoordinateType *out, unsigned count=1)