feat: add obj reader
This commit is contained in:
@@ -60,7 +60,6 @@ enzo::nt::NetworkManager& enzo::nt::NetworkManager::getInstance()
|
||||
|
||||
enzo::nt::GeometryOperator& enzo::nt::NetworkManager::getGeoOperator(nt::OpId opId)
|
||||
{
|
||||
std::cout << "gop size middle getter: " << gopStore_.size() <<"\n"; // <- size 0
|
||||
auto it = gopStore_.find(opId);
|
||||
if(it == gopStore_.end())
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include <oneapi/tbb/concurrent_vector.h>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
@@ -9,6 +10,8 @@
|
||||
|
||||
namespace enzo{
|
||||
namespace ga{
|
||||
template <typename T>
|
||||
using StoreContainer = std::vector<T>;
|
||||
|
||||
template <typename T>
|
||||
class AttributeHandle;
|
||||
@@ -41,11 +44,10 @@ namespace enzo{
|
||||
|
||||
void* data_;
|
||||
|
||||
|
||||
// data stores
|
||||
std::shared_ptr<std::vector<int>> intStore_;
|
||||
std::shared_ptr<std::vector<float>> floatStore_;
|
||||
std::shared_ptr<std::vector<enzo::bt::Vector3>> vector3Store_;
|
||||
std::shared_ptr<StoreContainer<int>> intStore_;
|
||||
std::shared_ptr<StoreContainer<float>> floatStore_;
|
||||
std::shared_ptr<StoreContainer<enzo::bt::Vector3>> vector3Store_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <vector>
|
||||
#include "Engine/Operator/Attribute.h"
|
||||
#include "Engine/Types.h"
|
||||
#include "tbb/concurrent_vector.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -54,9 +55,10 @@ public:
|
||||
data_->push_back(value);
|
||||
}
|
||||
|
||||
// TODO: replace with iterator
|
||||
std::vector<T> getAllValues() const
|
||||
{
|
||||
return *data_;
|
||||
return {data_->begin(), data_->end()};
|
||||
}
|
||||
|
||||
size_t getSize()
|
||||
@@ -96,7 +98,7 @@ private:
|
||||
|
||||
std::string name_="";
|
||||
|
||||
std::shared_ptr<std::vector<T>> data_;
|
||||
std::shared_ptr<StoreContainer<T>> data_;
|
||||
|
||||
// int typeID_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user