14 &p->getTransformation(),
20 QVariantMap* map =
new QVariantMap();
21 map->insert(
"ccCompassType",
"FitPlane");
27 if (N.
z < 0.0) N *= -1.0;
31 QString dipAndDipDirStr = QString(
"%1/%2")
32 .arg((
int)dip, 2, 10, QChar(
'0'))
33 .arg((
int)dipdir, 3, 10, QChar(
'0'));
61 if (N.
z < 0.0) N *= -1.0;
64 float strike, dip, dipdir;
84 QVariantMap* map =
new QVariantMap();
85 map->insert(
"Cx", C.
x);
86 map->insert(
"Cy", C.
y);
87 map->insert(
"Cz", C.
z);
88 map->insert(
"Nx", N.
x);
89 map->insert(
"Ny", N.
y);
90 map->insert(
"Nz", N.
z);
91 map->insert(
"Strike", strike);
92 map->insert(
"Dip", dip);
93 map->insert(
"DipDir", dipdir);
94 map->insert(
"RMS", rms);
95 map->insert(
"Radius", search_r);
101 return object->getMetaData(
"ccCompassType")
103 .contains(
"FitPlane");
virtual void showNameIn3D(bool state)
Sets whether name should be displayed in 3D.
static ccFitPlane * Fit(cloudViewer::GenericIndexedCloudPersist *cloud, double *rms)
void updateAttributes(float rms, float search_r)
static bool isFitPlane(ccHObject *object)
void enableStippling(bool state)
Enables polygon stippling.
Hierarchical CLOUDVIEWER Object.
void transferChildren(ccHObject &newParent, bool forceFatherDependent=false)
Transfer all children to another parent.
static void ConvertNormalToDipAndDipDir(const CCVector3 &N, PointCoordinateType &dip_deg, PointCoordinateType &dipDir_deg)
Converts a normal vector to geological 'dip direction & dip' parameters.
void setMetaData(const QString &key, const QVariant &data)
Sets a meta-data element.
QVariant getMetaData(const QString &key) const
Returns a given associated meta data.
bool hasMetaData(const QString &key) const
Returns whether a meta-data element with the given key exists or not.
virtual void setName(const QString &name)
Sets object name.
void showNormalVector(bool state)
Show normal vector.
virtual ccGenericPrimitive * clone() const override
Clones primitive.
static ccPlane * Fit(cloudViewer::GenericIndexedCloudPersist *cloud, double *rms=0)
Fits a plane primitive on a cloud.
CCVector3 getCenter() const
Returns the center.
CCVector3 getNormal() const override
Returns the entity normal.
A generic 3D point cloud with index-based and presistent access to points.