30 #include <unordered_set> 45 void Clear()
override;
49 void Transform(
const Eigen::Matrix4d &transformation)
override;
118 for (
size_t i = 0; i <
vertices_.size(); i++) {
136 const TriangleMesh &input,
const std::vector<size_t> &indices);
143 const Eigen::Vector3d &min_bound,
144 const Eigen::Vector3d &max_bound);
160 int resolution = 20);
190 std::shared_ptr<TriangleMesh>
CreateMeshArrow(
double cylinder_radius = 1.0,
191 double cone_radius = 1.5,
192 double cylinder_height = 5.0,
193 double cone_height = 4.0,
195 int cylinder_split = 4,
204 const Eigen::Vector3d &origin = Eigen::Vector3d(0.0, 0.0, 0.0));
std::shared_ptr< TriangleMesh > CreateMeshSphere(double radius=1.0, int resolution=20)
Definition: TriangleMeshFactory.cpp:60
void ComputeVertexNormals(bool normalized=true)
Function to compute vertex normals, usually called before rendering.
Definition: TriangleMesh.cpp:180
std::vector< Eigen::Vector3d > vertex_colors_
Definition: TriangleMesh.h:126
std::vector< Eigen::Vector3i > triangles_
Definition: TriangleMesh.h:127
virtual void RemoveDuplicatedVertices()
Definition: TriangleMesh.cpp:216
Eigen::Vector3d GetMaxBound() const override
Definition: TriangleMesh.cpp:72
void PaintUniformColor(const Eigen::Vector3d &color)
Definition: TriangleMesh.h:116
std::shared_ptr< TriangleMesh > CropTriangleMesh(const TriangleMesh &input, const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound)
Definition: DownSample.cpp:488
Definition: Geometry.h:32
void ComputeTriangleNormals(bool normalized=true)
Function to compute triangle normals, usually called before rendering.
Definition: TriangleMesh.cpp:167
std::shared_ptr< TriangleMesh > CreateMeshArrow(double cylinder_radius=1.0, double cone_radius=1.5, double cylinder_height=5.0, double cone_height=4.0, int resolution=20, int cylinder_split=4, int cone_split=1)
Definition: TriangleMeshFactory.cpp:188
void Clear() override
Definition: TriangleMesh.cpp:39
virtual void RemoveDuplicatedTriangles()
Definition: TriangleMesh.cpp:258
std::vector< Eigen::Vector3d > vertices_
Definition: TriangleMesh.h:124
void Transform(const Eigen::Matrix4d &transformation) override
Definition: TriangleMesh.cpp:94
TriangleMesh()
Definition: TriangleMesh.h:41
bool HasVertices() const
Definition: TriangleMesh.h:76
bool IsEmpty() const override
Definition: TriangleMesh.cpp:48
std::shared_ptr< TriangleMesh > CreateMeshCone(double radius=1.0, double height=2.0, int resolution=20, int split=1)
Definition: TriangleMeshFactory.cpp:144
TriangleMesh & operator+=(const TriangleMesh &mesh)
Definition: TriangleMesh.cpp:117
int size
Definition: FilePCD.cpp:55
void NormalizeNormals()
Definition: TriangleMesh.h:101
std::shared_ptr< PointCloud > SelectDownSample(const PointCloud &input, const std::vector< size_t > &indices, bool invert)
Definition: DownSample.cpp:145
Definition: Geometry3D.h:35
std::shared_ptr< TriangleMesh > CreateMeshCylinder(double radius=1.0, double height=2.0, int resolution=20, int split=4)
Definition: TriangleMeshFactory.cpp:102
std::vector< Eigen::Vector3d > vertex_normals_
Definition: TriangleMesh.h:125
bool HasTriangles() const
Definition: TriangleMesh.h:78
TriangleMesh operator+(const TriangleMesh &mesh) const
Definition: TriangleMesh.cpp:163
std::shared_ptr< TriangleMesh > CreateMeshBox(double width=1.0, double height=1.0, double depth=1.0)
Definition: TriangleMeshFactory.cpp:32
void Purge()
Function to remove duplicated and non-manifold vertices/triangles.
Definition: TriangleMesh.cpp:209
char type
Definition: FilePCD.cpp:56
virtual void RemoveNonManifoldVertices()
Definition: TriangleMesh.cpp:303
virtual void RemoveNonManifoldTriangles()
Definition: TriangleMesh.cpp:346
bool HasAdjacencyList() const
Definition: TriangleMesh.h:96
std::shared_ptr< TriangleMesh > CreateMeshCoordinateFrame(double size=1.0, const Eigen::Vector3d &origin=Eigen::Vector3d(0.0, 0.0, 0.0))
Definition: TriangleMeshFactory.cpp:209
Definition: PinholeCameraIntrinsic.cpp:33
GeometryType
Definition: Geometry.h:34
~TriangleMesh() override
Definition: TriangleMesh.h:42
int height
Definition: FilePCD.cpp:68
std::vector< std::unordered_set< int > > adjacency_list_
Definition: TriangleMesh.h:129
std::vector< Eigen::Vector3d > triangle_normals_
Definition: TriangleMesh.h:128
bool HasVertexColors() const
Definition: TriangleMesh.h:87
bool HasVertexNormals() const
Definition: TriangleMesh.h:82
TriangleMesh(Geometry::GeometryType type)
Definition: TriangleMesh.h:69
Eigen::Vector3d GetMinBound() const override
Definition: TriangleMesh.cpp:50
bool HasTriangleNormals() const
Definition: TriangleMesh.h:92
Definition: TriangleMesh.h:39
void ComputeAdjacencyList()
Function to compute adjacency list, call before adjacency list is needed.
Definition: TriangleMesh.cpp:196
int width
Definition: FilePCD.cpp:67