21 QVariantMap* map =
new QVariantMap();
24 map->insert(
"ccCompassType",
"Thickness");
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;
77 float length = (s - e).norm();
79 map->insert(
"Sx", s.
x);
80 map->insert(
"Sy", s.
y);
81 map->insert(
"Sz", s.
z);
82 map->insert(
"Ex", e.
x);
83 map->insert(
"Ey", e.
y);
84 map->insert(
"Ez", e.
z);
85 map->insert(
"Trend", trend);
86 map->insert(
"Plunge", plunge);
87 map->insert(
"Length",
length);
103 return object->getMetaData(
"ccCompassType")
105 .contains(
"Thickness");
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 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.)
ccThickness(ccPointCloud *associatedCloud)
void updateMetadata() override
static bool isThickness(ccHObject *obj)
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)