39 class OrientedBoundingBox;
40 class AxisAlignedBoundingBox;
59 const std::vector<Eigen::Vector2i> &lines)
70 Eigen::Vector3d
GetCenter()
const override;
75 bool relative =
true)
override;
76 LineSet &
Scale(
const double scale,
const Eigen::Vector3d ¢er)
override;
78 const Eigen::Vector3d ¢er)
override;
120 const std::vector<std::pair<int, int>> &correspondences);
std::vector< Eigen::Vector2i > lines_
Lines denoted by the index of points forming the line.
Definition: LineSet.h:150
The base geometry class.
Definition: Geometry.h:37
A bounding box that is aligned along the coordinate axes.
Definition: BoundingVolume.h:164
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:44
A point cloud consists of point coordinates, and optionally point colors and point normals...
Definition: PointCloud.h:54
static std::shared_ptr< LineSet > CreateFromAxisAlignedBoundingBox(const AxisAlignedBoundingBox &box)
Factory function to create a LineSet from an AxisAlignedBoundingBox.
Definition: LineSetFactory.cpp:104
LineSet & Clear() override
Clear all elements in the geometry.
Definition: LineSet.cpp:35
bool HasColors() const
Returns true if the objects lines contains colors.
Definition: LineSet.h:90
LineSet & Scale(const double scale, const Eigen::Vector3d ¢er) override
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is tr...
Definition: LineSet.cpp:72
static std::shared_ptr< LineSet > CreateFromTriangleMesh(const TriangleMesh &mesh)
Definition: LineSetFactory.cpp:60
LineSet & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
Definition: LineSet.cpp:67
std::vector< Eigen::Vector3d > points_
Points coordinates.
Definition: LineSet.h:148
~LineSet() override
Definition: LineSet.h:63
std::vector< Eigen::Vector3d > colors_
RGB colors of lines.
Definition: LineSet.h:152
math::float4 color
Definition: LineSetBuffers.cpp:46
std::pair< Eigen::Vector3d, Eigen::Vector3d > GetLineCoordinate(size_t line_index) const
Returns the coordinates of the line at the given index.
Definition: LineSet.h:97
The base geometry class for 3D geometries.
Definition: Geometry3D.h:46
LineSet & operator+=(const LineSet &lineset)
Definition: LineSet.cpp:83
Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
Definition: LineSet.cpp:48
OrientedBoundingBox GetOrientedBoundingBox() const override
Returns an oriented bounding box of the geometry.
Definition: LineSet.cpp:58
Tetra mesh contains vertices and tetrahedra represented by the indices to the vertices.
Definition: TetraMesh.h:48
static std::shared_ptr< LineSet > CreateFromPointCloudCorrespondences(const PointCloud &cloud0, const PointCloud &cloud1, const std::vector< std::pair< int, int >> &correspondences)
Factory function to create a LineSet from two PointClouds (cloud0, cloud1) and a correspondence set...
Definition: LineSetFactory.cpp:38
LineSet(const std::vector< Eigen::Vector3d > &points, const std::vector< Eigen::Vector2i > &lines)
Parameterized Constructor.
Definition: LineSet.h:58
Eigen::Vector3d GetCenter() const override
Returns the center of the geometry coordinates.
Definition: LineSet.cpp:52
LineSet & Rotate(const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) override
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center ...
Definition: LineSet.cpp:77
int points
Definition: FilePCD.cpp:71
Definition: Open3DViewer.h:29
GeometryType
Specifies possible geometry types.
Definition: Geometry.h:42
static std::shared_ptr< LineSet > CreateFromOrientedBoundingBox(const OrientedBoundingBox &box)
Factory function to create a LineSet from an OrientedBoundingBox.
Definition: LineSetFactory.cpp:84
LineSet & PaintUniformColor(const Eigen::Vector3d &color)
Assigns each line in the LineSet the same color.
Definition: LineSet.h:106
bool HasPoints() const
Returns true if the object contains points.
Definition: LineSet.h:84
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: LineSet.cpp:42
LineSet()
Default Constructor.
Definition: LineSet.h:51
void ResizeAndPaintUniformColor(std::vector< Eigen::Vector3d > &colors, const size_t size, const Eigen::Vector3d &color) const
Resizes the colors vector and paints a uniform color.
Definition: Geometry3D.cpp:71
AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const override
Returns an axis-aligned bounding box of the geometry.
Definition: LineSet.cpp:54
bool HasLines() const
Returns true if the object contains lines.
Definition: LineSet.h:87
Triangle mesh contains vertices and triangles represented by the indices to the vertices.
Definition: TriangleMesh.h:54
LineSet define a sets of lines in 3D. A typical application is to display the point cloud corresponde...
Definition: LineSet.h:48
Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
Definition: LineSet.cpp:44
LineSet operator+(const LineSet &lineset) const
Definition: LineSet.cpp:113
static std::shared_ptr< LineSet > CreateFromTetraMesh(const TetraMesh &mesh)
Definition: LineSetFactory.cpp:124
long line_index
Definition: FilePLY.cpp:217
LineSet & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
Definition: LineSet.cpp:62