40 const std::vector<Eigen::Vector2i> &lines,
41 const char *
name =
"LineSet")
53 virtual ccBBox getOwnBB(
bool withGLFeatures =
false)
override;
61 inline virtual bool IsEmpty()
const override {
return !HasPoints(); }
62 virtual Eigen::Vector3d GetMinBound()
const override;
63 virtual Eigen::Vector3d GetMaxBound()
const override;
64 virtual Eigen::Vector3d GetCenter()
const override;
65 virtual ccBBox GetAxisAlignedBoundingBox()
const override;
68 virtual LineSet &Translate(
const Eigen::Vector3d &translation,
69 bool relative =
true)
override;
70 virtual LineSet &Scale(
const double s,
71 const Eigen::Vector3d ¢er)
override;
72 virtual LineSet &Rotate(
const Eigen::Matrix3d &R,
73 const Eigen::Vector3d ¢er)
override;
79 bool HasPoints()
const {
return points_.size() > 0; }
82 bool HasLines()
const {
return HasPoints() && lines_.size() > 0; }
86 return HasLines() && colors_.size() == lines_.size();
102 ResizeAndPaintUniformColor(colors_, lines_.size(),
color);
112 static std::shared_ptr<LineSet> CreateFromPointCloudCorrespondences(
115 const std::vector<std::pair<int, int>> &correspondences);
120 static std::shared_ptr<LineSet> CreateFromOrientedBoundingBox(
127 static std::shared_ptr<LineSet> CreateFromAxisAlignedBoundingBox(
133 static std::shared_ptr<LineSet> CreateFromTriangleMesh(
const ccMesh &mesh);
138 static std::shared_ptr<LineSet> CreateFromTetraMesh(
const TetraMesh &mesh);
147 static std::shared_ptr<LineSet> CreateCameraVisualization(
150 const Eigen::Matrix3d &intrinsic,
151 const Eigen::Matrix4d &extrinsic,
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
const QCPVector2D operator+(const QCPVector2D &vec1, const QCPVector2D &vec2)
Hierarchical CLOUDVIEWER Object.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
LineSet define a sets of lines in 3D. A typical application is to display the point cloud corresponde...
bool HasColors() const
Returns true if the objects lines contains colors.
std::pair< Eigen::Vector3d, Eigen::Vector3d > GetLineCoordinate(size_t line_index) const
Returns the coordinates of the line at the given index.
virtual bool IsEmpty() const override
virtual bool isSerializable() const override
Returns whether object is serializable of not.
std::vector< Eigen::Vector3d > points_
Points coordinates.
std::vector< Eigen::Vector3d > colors_
RGB colors of lines.
LineSet(const char *name="LineSet")
Default Constructor.
bool HasLines() const
Returns true if the object contains lines.
virtual CV_CLASS_ENUM getClassID() const override
Returns unique class ID.
std::vector< Eigen::Vector2i > lines_
Lines denoted by the index of points forming the line.
LineSet(const std::vector< Eigen::Vector3d > &points, const std::vector< Eigen::Vector2i > &lines, const char *name="LineSet")
Parameterized Constructor.
LineSet & PaintUniformColor(const Eigen::Vector3d &color)
Assigns each line in the LineSet the same color.
bool HasPoints() const
Returns true if the object contains points.
Tetra mesh contains vertices and tetrahedra represented by the indices to the vertices.
CLOUDVIEWER_HOST_DEVICE Pair< First, Second > make_pair(const First &_first, const Second &_second)
void Transform(benchmark::State &state, const core::Device &device)
void operator+=(MiniVec< T, N > &a, const MiniVec< T, N > &b)
Generic file read and write utility for python interface.