15#include <Common/primitive_type.h>
23namespace ph {
class IInputStream; }
147 float64
get(std::size_t index)
const;
148 void set(std::size_t index, float64 value);
149 std::size_t
size()
const;
150 operator bool ()
const;
156 std::byte* rawBuffer,
157 std::size_t strideSize,
158 std::size_t numElements,
161 std::size_t getBufferOffset(std::size_t index)
const;
163 std::byte* m_rawBuffer;
164 std::size_t m_strideSize;
165 std::size_t m_numElements;
176 float64
get(std::size_t listIndex, std::size_t listElementIndex)
const;
177 void set(std::size_t listIndex, std::size_t listElementIndex, float64 value);
181 std::size_t
size()
const;
185 std::size_t
listSize(std::size_t listIndex)
const;
189 operator bool ()
const;
195 std::byte* rawBuffer,
196 std::size_t* listSizesPrefixSum,
197 std::size_t numLists,
201 std::size_t getBufferOffset(std::size_t listIndex, std::size_t listElementIndex)
const;
203 std::byte* m_rawBuffer;
204 std::size_t* m_listSizesPrefixSum;
205 std::size_t m_numLists;
206 std::size_t m_fixedListSize;
212 static_assert(
sizeof(std::byte) * CHAR_BIT == 8,
213 "The file explicitly depends on the fact that std::byte contains 8 bits.");
240 std::string_view
getComment(std::size_t commentIndex)
const;
263 void loadAsciiElementBuffer(
269 void loadBinaryElementBuffer(
275 void loadNonListBinaryElementBuffer(
280 void loadSingleBinaryPlyDataToBuffer(
283 std::byte* out_buffer);
286 void compactBuffer();
289 void reserveBuffer();
296 std::vector<std::string> m_comments;
297 std::vector<PlyElement> m_elements;
General path representation. Does not check whether the target actually exists (e....
Definition Path.h:21
std::size_t numComments() const
Access to comments in the file. There will be no comments if PlyIOConfig::bIgnoreComments is set.
Definition PlyFile.cpp:723
void setOutputFormat(EPlyDataFormat format)
Definition PlyFile.cpp:757
std::string_view getComment(std::size_t commentIndex) const
Definition PlyFile.cpp:728
EPlyDataFormat getOutputFormat() const
Definition PlyFile.cpp:752
void setInputFormat(EPlyDataFormat format)
Definition PlyFile.cpp:747
void loadFile(const Path &plyFilePath, const PlyIOConfig &config)
Load and append file content to existing data.
Definition PlyFile.cpp:831
PlyFile()
Definition PlyFile.cpp:659
std::size_t numElements() const
Definition PlyFile.cpp:718
PlyElement * findElement(std::string_view name)
Definition PlyFile.cpp:706
EPlyDataFormat getInputFormat() const
Definition PlyFile.cpp:742
SemanticVersion getVersion() const
Definition PlyFile.cpp:826
void clearBuffer()
Clear all data storages for the elements.
Definition PlyFile.cpp:762
A convenient PLY list property accessor.
Definition PlyFile.h:172
std::size_t listSize(std::size_t listIndex) const
Size of the list on index listIndex.
Definition PlyFile.cpp:632
float64 get(std::size_t listIndex, std::size_t listElementIndex) const
Definition PlyFile.cpp:610
void set(std::size_t listIndex, std::size_t listElementIndex, float64 value)
Definition PlyFile.cpp:618
bool isFixedSizeList() const
Definition PlyFile.cpp:643
std::size_t fixedListSize() const
Definition PlyFile.cpp:648
std::size_t size() const
Number of lists in this property.
Definition PlyFile.cpp:627
A convenient PLY property accessor.
Definition PlyFile.h:143
void set(std::size_t index, float64 value)
Definition PlyFile.cpp:550
std::size_t size() const
Definition PlyFile.cpp:559
float64 get(std::size_t index) const
Definition PlyFile.cpp:542
Convenient software version handling routines. See https://semver.org/ for a detailed explaination of...
Definition SemanticVersion.h:16
constexpr std::size_t MiB
Definition constant.h:80
constexpr std::size_t GiB
Definition constant.h:81
The root for all renderer implementations.
Definition EEngineProject.h:6
EPlyDataType
Definition PlyFile.h:38
EPlyDataFormat
Definition PlyFile.h:29
PLY element storage.
Definition PlyFile.h:115
PlyPropertyListValues listPropertyValues(PlyProperty *prop)
Definition PlyFile.cpp:492
std::vector< std::byte > rawBuffer
Definition PlyFile.h:129
std::string name
Definition PlyFile.h:116
PlyPropertyValues propertyValues(PlyProperty *prop)
Definition PlyFile.cpp:471
bool isLoaded() const
Definition PlyFile.cpp:424
PlyElement()
Definition PlyFile.cpp:416
std::vector< PlyProperty > properties
Definition PlyFile.h:118
bool containsList() const
Definition PlyFile.cpp:446
std::size_t strideSize
Definition PlyFile.h:119
PlyProperty * findProperty(std::string_view name)
Definition PlyFile.cpp:459
std::size_t numElements
Definition PlyFile.h:117
bool bPreloadIntoMemory
Definition PlyFile.h:74
std::size_t preloadMemoryThreshold
Definition PlyFile.h:77
bool bIgnoreComments
Definition PlyFile.h:71
std::size_t reduceStorageMemoryThreshold
Definition PlyFile.h:80
PLY property storage.
Definition PlyFile.h:89
std::vector< std::byte > rawListBuffer
Definition PlyFile.h:99
std::size_t fixedListSize
Definition PlyFile.h:94
bool isList() const
Definition PlyFile.cpp:406
EPlyDataType dataType
Definition PlyFile.h:91
PlyProperty()
Definition PlyFile.cpp:396
std::size_t strideOffset
Definition PlyFile.h:93
EPlyDataType listSizeType
Definition PlyFile.h:92
bool isFixedSizeList() const
Definition PlyFile.cpp:411
std::vector< std::size_t > listSizesPrefixSum
Definition PlyFile.h:104
std::string name
Definition PlyFile.h:90