1#include <IO/deprecated/OFFFileManager.hpp>
33bool OFFFileManager::importData(
std::istream& file, Geometry::TriangleMesh& data ) {
37 addLogErrorEntry(
"HEADER IS NOT CORRECT." );
43 file >> v_size >> f_size >> e_size;
45 Geometry::TriangleMesh::PointAttribHandle::Container vertices;
46 Geometry::TriangleMesh::IndexContainerType indices;
47 vertices.resize( v_size );
48 indices.resize( f_size );
51 for ( uint i = 0; i < v_size; ++i ) {
53 file >> v[0] >> v[1] >> v[2];
58 for ( uint i = 0; i < e_size; ++i ) {
63 for ( uint i = 0; i < f_size; ++i ) {
68 file >> f[0] >> f[1] >> f[2];
69 indices.push_back( f );
78bool OFFFileManager::exportData(
std::ostream& file,
const Geometry::TriangleMesh& data ) {
80 const uint v_size = data.vertices().
size();
81 const uint f_size = data.getIndices().size();
82 const uint e_size = 0;
85 addLogErrorEntry(
"NO VERTICES PRESENT." );
94 for (
const auto& v : data.vertices() ) {
100 for (
const auto& f : data.getIndices() ) {
void setVertices(PointAttribHandle::Container &&vertices)
Set vertices.
void setIndices(IndexContainerType &&indices)
void clear() override
Erases all data, making the AttribArrayGeometry empty.
OFFFileManager()
CONSTRUCTOR.
std::string fileExtension() const override
INTERFACE.
~OFFFileManager() override
DESTRUCTOR.
std::string header() const
HEADER.
@ Geometry
"Geometry" render objects are those loaded using Radium::IO and generated by GeometrySystem
hepler function to manage enum as underlying types in VariableSet