Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/dracoenc/src/draco/io/ply_reader.h
| Context not available. | |||||
| #include "draco/core/decoder_buffer.h" | #include "draco/core/decoder_buffer.h" | ||||
| #include "draco/core/draco_types.h" | #include "draco/core/draco_types.h" | ||||
| #include "draco/core/status.h" | |||||
| #include "draco/core/status_or.h" | |||||
| namespace draco { | namespace draco { | ||||
| Context not available. | |||||
| class PlyReader { | class PlyReader { | ||||
| public: | public: | ||||
| PlyReader(); | PlyReader(); | ||||
| bool Read(DecoderBuffer *buffer); | Status Read(DecoderBuffer *buffer); | ||||
| const PlyElement *GetElementByName(const std::string &name) const { | const PlyElement *GetElementByName(const std::string &name) const { | ||||
| const auto it = element_index_.find(name); | const auto it = element_index_.find(name); | ||||
| Context not available. | |||||
| private: | private: | ||||
| enum Format { kLittleEndian = 0, kAscii }; | enum Format { kLittleEndian = 0, kAscii }; | ||||
| bool ParseHeader(DecoderBuffer *buffer); | Status ParseHeader(DecoderBuffer *buffer); | ||||
| bool ParseEndHeader(DecoderBuffer *buffer); | StatusOr<bool> ParseEndHeader(DecoderBuffer *buffer); | ||||
| bool ParseElement(DecoderBuffer *buffer); | bool ParseElement(DecoderBuffer *buffer); | ||||
| bool ParseProperty(DecoderBuffer *buffer); | StatusOr<bool> ParseProperty(DecoderBuffer *buffer); | ||||
| bool ParsePropertiesData(DecoderBuffer *buffer); | bool ParsePropertiesData(DecoderBuffer *buffer); | ||||
| bool ParseElementData(DecoderBuffer *buffer, int element_index); | bool ParseElementData(DecoderBuffer *buffer, int element_index); | ||||
| bool ParseElementDataAscii(DecoderBuffer *buffer, int element_index); | bool ParseElementDataAscii(DecoderBuffer *buffer, int element_index); | ||||
| Context not available. | |||||
| DataType GetDataTypeFromString(const std::string &name) const; | DataType GetDataTypeFromString(const std::string &name) const; | ||||
| std::vector<PlyElement> elements_; | std::vector<PlyElement> elements_; | ||||
| std::string error_message_; | |||||
| std::map<std::string, int> element_index_; | std::map<std::string, int> element_index_; | ||||
| Format format_; | Format format_; | ||||
| }; | }; | ||||
| Context not available. | |||||