 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
13 #include <unordered_map>
14 #include <unordered_set>
52 virtual ccBBox getOwnBB(
bool withGLFeatures =
false)
override;
56 inline virtual unsigned size()
const override {
57 return static_cast<unsigned>(vertices_.size());
68 virtual bool IsEmpty()
const override;
69 virtual Eigen::Vector3d GetMinBound()
const override;
70 virtual Eigen::Vector3d GetMaxBound()
const override;
71 virtual Eigen::Vector3d GetCenter()
const override;
72 virtual ccBBox GetAxisAlignedBoundingBox()
const override;
75 const Eigen::Matrix4d &transformation)
override;
76 virtual ecvMeshBase &Translate(
const Eigen::Vector3d &translation,
77 bool relative =
true)
override;
79 const Eigen::Vector3d ¢er)
override;
80 virtual ecvMeshBase &Rotate(
const Eigen::Matrix3d &R,
81 const Eigen::Vector3d ¢er)
override;
91 return vertices_.size() > 0 &&
92 vertex_normals_.size() == vertices_.size();
97 return vertices_.size() > 0 &&
98 vertex_colors_.size() == vertices_.size();
103 for (
size_t i = 0; i < vertex_normals_.size(); i++) {
104 vertex_normals_[i].normalize();
105 if (std::isnan(vertex_normals_[i](0))) {
106 vertex_normals_[i] = Eigen::Vector3d(0.0, 0.0, 1.0);
116 ResizeAndPaintUniformColor(vertex_colors_, vertices_.size(),
color);
121 std::tuple<std::shared_ptr<ccMesh>, std::vector<size_t>> ComputeConvexHull()
127 const char *
name =
"ecvMeshBase")
virtual bool isSerializable() const override
Returns whether object is serializable of not.
Definition: ecvMeshBase.h:48
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
bool HasVertexNormals() const
Returns True if the mesh contains vertex normals.
Definition: ecvMeshBase.h:90
void Transform(benchmark::State &state, const core::Device &device)
Definition: PointCloud.cpp:127
bool HasVertexColors() const
Returns True if the mesh contains vertex colors.
Definition: ecvMeshBase.h:96
std::function< void(GenericTriangle &)> genericTriangleAction
Generic function to apply to a triangle (used by foreach)
Definition: GenericMesh.h:53
std::vector< Eigen::Vector3d > vertex_colors_
RGB colors of vertices.
Definition: ecvMeshBase.h:136
virtual void placeIteratorAtBeginning() override
Places the mesh iterator at the beginning.
Definition: ecvMeshBase.h:60
Bounding box structure.
Definition: ecvBBox.h:25
ecvMeshBase(const std::vector< Eigen::Vector3d > &vertices, const char *name="ecvMeshBase")
Definition: ecvMeshBase.h:126
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
math::float4 color
Definition: LineSetBuffers.cpp:46
bool HasVertices() const
Returns True if the mesh contains vertices.
Definition: ecvMeshBase.h:87
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Definition: CVTypes.h:97
std::vector< Eigen::Vector3d > vertices_
Vertex coordinates.
Definition: ecvMeshBase.h:132
std::vector< Eigen::Vector3d > vertex_normals_
Vertex normals.
Definition: ecvMeshBase.h:134
virtual cloudViewer::GenericTriangle * _getNextTriangle() override
Returns the next triangle (relatively to the global iterator position)
Definition: ecvMeshBase.h:62
Tensor operator+(T scalar_lhs, const Tensor &rhs)
Definition: Tensor.h:1417
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
Definition: ecvMeshBase.h:49
Definition: GenericMesh.h:21
ecvMeshBase & PaintUniformColor(const Eigen::Vector3d &color)
Assigns each vertex in the TriangleMesh the same color.
Definition: ecvMeshBase.h:115
ecvMeshBash Class.
Definition: ecvMeshBase.h:40
virtual unsigned size() const override
Returns the number of triangles.
Definition: ecvMeshBase.h:56
FN_SPECIFIERS void operator+=(MiniVec< T, N > &a, const MiniVec< T, N > &b)
Definition: MiniVec.h:150
ecvMeshBase & NormalizeNormals()
Normalize vertex normals to length 1.
Definition: ecvMeshBase.h:102
Triangular mesh.
Definition: ecvMesh.h:35
Definition: ecvOrientedBBox.h:29
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
@ MESH_BASE
Definition: CVTypes.h:148
#define CV_DB_LIB_API
Definition: CV_db.h:15
~ecvMeshBase() override
Definition: ecvMeshBase.h:45
A generic triangle interface.
Definition: GenericTriangle.h:18
ecvMeshBase(const char *name="ecvMeshBase")
Default Constructor.
Definition: ecvMeshBase.h:44
virtual void forEach(genericTriangleAction action) override
Fast iteration mechanism.
Definition: ecvMeshBase.h:61
std::string name
Definition: FileIOFactory.cpp:129