Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/dracoenc/src/draco/io/point_cloud_io.cc
| Context not available. | |||||
| if (extension == ".ply") { | if (extension == ".ply") { | ||||
| // Wavefront PLY file format. | // Wavefront PLY file format. | ||||
| PlyDecoder ply_decoder; | PlyDecoder ply_decoder; | ||||
| if (!ply_decoder.DecodeFromFile(file_name, pc.get())) | DRACO_RETURN_IF_ERROR(ply_decoder.DecodeFromFile(file_name, pc.get())); | ||||
| return Status(Status::ERROR, "Unknown error."); | |||||
| return std::move(pc); | return std::move(pc); | ||||
| } | } | ||||
| Context not available. | |||||
| // draco encoding methods. | // draco encoding methods. | ||||
| std::ifstream is(file_name.c_str(), std::ios::binary); | std::ifstream is(file_name.c_str(), std::ios::binary); | ||||
| if (!is) | if (!is) | ||||
| return Status(Status::ERROR, "Invalid input stream."); | return Status(Status::DRACO_ERROR, "Invalid input stream."); | ||||
| if (!ReadPointCloudFromStream(&pc, is).good()) | if (!ReadPointCloudFromStream(&pc, is).good()) | ||||
| return Status(Status::ERROR, | return Status(Status::DRACO_ERROR, | ||||
| "Unknown error."); // Error reading the stream. | "Unknown error."); // Error reading the stream. | ||||
| return std::move(pc); | return std::move(pc); | ||||
| } | } | ||||
| Context not available. | |||||