27#ifndef EASY3D_FILEIO_POINT_CLOUD_IO_VG_H
28#define EASY3D_FILEIO_POINT_CLOUD_IO_VG_H
34#include <easy3d/core/types.h>
137 class VertexGroup :
public std::vector<int>
140 explicit VertexGroup(
int type = UNKNOWN)
141 : primitive_type_(type)
142 , primitive_index_(-1)
144 , color_(0.3f, 0.6f, 1.0f)
147 ~VertexGroup() =
default;
163 int primitive_index_;
167 std::vector<VertexGroup> children_;
171 static void read_ascii_group(std::istream& input, VertexGroup& g);
172 static void write_ascii_group(std::ostream& output,
const VertexGroup& g);
174 static void read_binary_group(std::istream& input, VertexGroup& g);
175 static void write_binary_group(std::ostream& output,
const VertexGroup& g);
177 static int num_group_parameters(
int type);
179 static std::vector<float> get_group_parameters(
const VertexGroup& g);
180 static void assign_group_parameters(VertexGroup& g, std::vector<float>& para);
182 static void collect_groups(
const PointCloud* cloud, std::vector<VertexGroup>& groups);
A data structure for point clouds.
Definition: point_cloud.h:45
Implementation of file input/output operations for vertex group (VG) format PointCloud.
Definition: point_cloud_io_vg.h:94
static bool save_bvg(const std::string &file_name, const PointCloud *cloud)
Saves a point_cloud to a binary file.
Definition: point_cloud_io_vg.cpp:475
static bool save_vg(const std::string &file_name, const PointCloud *cloud)
Saves a point_cloud to an ASCII file.
Definition: point_cloud_io_vg.cpp:85
static bool load_bvg(const std::string &file_name, PointCloud *cloud)
Reads a point cloud from a binary file.
Definition: point_cloud_io_vg.cpp:378
static bool load_vg(const std::string &file_name, PointCloud *cloud)
Reads a point cloud from an ASCII file.
Definition: point_cloud_io_vg.cpp:178
Definition: collider.cpp:182