21 QVariantMap* map =
new QVariantMap();
24 map->insert(
"ccCompassType",
"Lineation");
34 if (dir.
x + dir.
y + dir.
z == 0)
38 }
else if (dir.
z > 0.9999999 ||
54 plunge = std::acos(dir.
dot(hzComp)) *
68 trend = std::atan2(det,
dot) *
71 if (trend < 0) trend += 360;
78 float length = (s - e).norm();
80 map->insert(
"Sx", s.
x);
81 map->insert(
"Sy", s.
y);
82 map->insert(
"Sz", s.
z);
83 map->insert(
"Ex", e.
x);
84 map->insert(
"Ey", e.
y);
85 map->insert(
"Ez", e.
z);
86 map->insert(
"Trend", trend);
87 map->insert(
"Plunge", plunge);
94 QString lengthstr = QString(
"").asprintf(
"%.1f on ",
length);
95 QString trendAndPlungeStr = QString(
"%2->%3")
96 .arg((
int)plunge, 2, 10, QChar(
'0'))
97 .arg((
int)trend, 3, 10, QChar(
'0'));
98 QString namestr = lengthstr + trendAndPlungeStr;
106 return object->getMetaData(
"ccCompassType")
108 .contains(
"Lineation");
Vector3Tpl< float > CCVector3f
Float 3D Vector.
void normalize()
Sets vector norm to unity.
Type dot(const Vector3Tpl &v) const
Dot product.
Vector3Tpl cross(const Vector3Tpl &v) const
Cross product.
Hierarchical CLOUDVIEWER Object.
void updateMetadata() override
ccLineation(ccPointCloud *associatedCloud)
static bool isLineation(ccHObject *obj)
void setMetaData(const QString &key, const QVariant &data)
Sets a meta-data element.
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.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
CCVector3d toGlobal3d(const Vector3Tpl< T > &Plocal) const
Returns the point back-projected into the original coordinates system.
virtual double getGlobalScale() const
Returns the scale applied to original coordinates.
unsigned size() const override
Returns the number of points.
const CCVector3 * getPoint(unsigned index) const override
Returns the ith point.
__host__ __device__ float length(float2 v)
__host__ __device__ float dot(float2 a, float2 b)