Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Loads a PLY file. More...
#include <ioPLY.hpp>
Classes | |
class | PlyElement |
Used by PlyLoader. More... | |
class | PlyPropertyAbstract |
Used by PlyLoader. More... | |
class | PlyScalar |
Used by PlyLoader. More... | |
class | PlyScalarList |
Used by PlyLoader. More... | |
Public Types | |
enum | EType { PlyError, PlyChar, PlyUChar, PlyShort, PlyUShort, PlyInt, PlyUInt, PlyFloat, PlyDouble } |
Public Member Functions | |
PlyLoader () | |
Constructor. More... | |
ref< ResourceDatabase > | loadPly (VirtualFile *file) |
Loads a PLY file. More... | |
const std::vector< ref< PlyElement > > & | elements () const |
std::vector< ref< PlyElement > > & | elements () |
bool | binary () const |
bool | littleEndian () const |
void | readElements (VirtualFile *file) |
void | readElements (TextStream *text) |
void | newElement (PlyElement *el) |
EType | translateType (const String &type) |
void | analyzeHeader () |
bool | readHeader (TextStream *line_reader) |
Protected Attributes | |
std::vector< ref< PlyElement > > | mElements |
ref< ArrayFloat3 > | mVerts |
ref< ArrayFloat3 > | mNormals |
ref< ArrayUByte4 > | mColors |
std::vector< unsigned int > | mIndices |
int | mVertexIndex |
bool | mBinary |
bool | mLittleEndian |
enum vl::PlyLoader::EType |
void PlyLoader::analyzeHeader | ( | ) |
Definition at line 272 of file ioPLY.cpp.
References elements(), vl::Log::error(), mColors, mNormals, mVerts, and vl::PlyLoader::PlyPropertyAbstract::name().
Referenced by readHeader().
|
inline |
|
inline |
Definition at line 242 of file ioPLY.hpp.
Referenced by analyzeHeader(), and readHeader().
|
inline |
|
inline |
Definition at line 245 of file ioPLY.hpp.
Referenced by readElements().
ref< ResourceDatabase > PlyLoader::loadPly | ( | VirtualFile * | file | ) |
Loads a PLY file.
Definition at line 393 of file ioPLY.cpp.
References binary(), vl::VirtualFile::close(), vl::Geometry::drawCalls(), vl::EN_DEPTH_TEST, vl::EN_LIGHTING, vl::Shader::enable(), vl::ref< T >::get(), vl::DrawElements< arr_type >::indexBuffer(), mColors, mIndices, mNormals, mVerts, NULL, vl::PT_TRIANGLES, vl::ArrayAbstract::ptr(), readElements(), readHeader(), vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::resize(), vl::ResourceDatabase::resources(), vl::Geometry::setColorArray(), vl::BufferedStream< Element_Type, Chunk_Size >::setInputFile(), vl::Geometry::setNormalArray(), vl::Geometry::setVertexArray(), and vl::Effect::shader().
Referenced by vl::loadPLY().
void PlyLoader::newElement | ( | PlyElement * | el | ) |
Definition at line 212 of file ioPLY.cpp.
References vl::PlyLoader::PlyElement::getColor(), vl::PlyLoader::PlyElement::getNormal(), vl::PlyLoader::PlyElement::getVertex(), mColors, mIndices, mNormals, mVertexIndex, mVerts, vl::PlyLoader::PlyPropertyAbstract::name(), vl::PlyLoader::PlyElement::name(), vl::PlyLoader::PlyElement::properties(), vl::PlyLoader::PlyScalarList::scalars(), and VL_CHECK.
Referenced by readElements().
void PlyLoader::readElements | ( | VirtualFile * | file | ) |
Definition at line 178 of file ioPLY.cpp.
References littleEndian(), mElements, newElement(), vl::VirtualFile::readUInt8(), and vl::VirtualFile::seekSet().
Referenced by loadPly().
void PlyLoader::readElements | ( | TextStream * | text | ) |
Definition at line 203 of file ioPLY.cpp.
References mElements, and newElement().
bool PlyLoader::readHeader | ( | TextStream * | line_reader | ) |
Definition at line 306 of file ioPLY.cpp.
References analyzeHeader(), elements(), vl::String::empty(), vl::Log::error(), vl::String::field(), mBinary, mColors, mIndices, mLittleEndian, mNormals, mVertexIndex, mVerts, vl::PlyLoader::PlyPropertyAbstract::name(), NULL, vl::PlyLoader::PlyScalar::PlyScalar(), vl::TextStream::readLineLF(), vl::String::startsWith(), vl::String::toInt(), translateType(), and vl::String::trim().
Referenced by loadPly().
PlyLoader::EType PlyLoader::translateType | ( | const String & | type | ) |
|
protected |
Definition at line 259 of file ioPLY.hpp.
Referenced by readHeader().
|
protected |
Definition at line 256 of file ioPLY.hpp.
Referenced by analyzeHeader(), loadPly(), newElement(), and readHeader().
|
protected |
Definition at line 253 of file ioPLY.hpp.
Referenced by readElements().
|
protected |
Definition at line 257 of file ioPLY.hpp.
Referenced by loadPly(), newElement(), and readHeader().
|
protected |
Definition at line 260 of file ioPLY.hpp.
Referenced by readHeader().
|
protected |
Definition at line 255 of file ioPLY.hpp.
Referenced by analyzeHeader(), loadPly(), newElement(), and readHeader().
|
protected |
Definition at line 258 of file ioPLY.hpp.
Referenced by newElement(), and readHeader().
|
protected |
Definition at line 254 of file ioPLY.hpp.
Referenced by analyzeHeader(), loadPly(), newElement(), and readHeader().
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:10.
© Copyright Michele Bosi. All rights reserved.