feat: render open and closed faces/lines
This commit is contained in:
@@ -14,16 +14,19 @@ ga::Attribute::Attribute(std::string name, ga::AttributeType type)
|
||||
switch(type_)
|
||||
{
|
||||
case(AttrType::intT):
|
||||
intStore_=std::make_shared<std::vector<int>>();
|
||||
intStore_=std::make_shared<std::vector<bt::intT>>();
|
||||
break;
|
||||
case(AttrType::floatT):
|
||||
floatStore_=std::make_shared<std::vector<float>>();
|
||||
floatStore_=std::make_shared<std::vector<bt::floatT>>();
|
||||
break;
|
||||
case(AttrType::vectorT):
|
||||
vector3Store_=std::make_shared<std::vector<enzo::bt::Vector3>>();
|
||||
break;
|
||||
case(AttrType::boolT):
|
||||
boolStore_=std::make_shared<std::vector<enzo::bt::boolT>>();
|
||||
break;
|
||||
default:
|
||||
throw std::runtime_error("Type " + std::to_string(static_cast<int>(type_)) + " was not properly accounted for");
|
||||
throw std::runtime_error("Type " + std::to_string(static_cast<int>(type_)) + " was not properly accounted for in Attribute constructor");
|
||||
|
||||
}
|
||||
|
||||
@@ -40,16 +43,19 @@ ga::Attribute::Attribute(const Attribute& other)
|
||||
switch(type_)
|
||||
{
|
||||
case(AttrType::intT):
|
||||
intStore_=std::make_shared<std::vector<int>>(*other.intStore_);
|
||||
intStore_=std::make_shared<std::vector<bt::intT>>(*other.intStore_);
|
||||
break;
|
||||
case(AttrType::floatT):
|
||||
floatStore_=std::make_shared<std::vector<float>>(*other.floatStore_);
|
||||
floatStore_=std::make_shared<std::vector<bt::floatT>>(*other.floatStore_);
|
||||
break;
|
||||
case(AttrType::vectorT):
|
||||
vector3Store_=std::make_shared<std::vector<enzo::bt::Vector3>>(*other.vector3Store_);
|
||||
break;
|
||||
case(AttrType::boolT):
|
||||
boolStore_=std::make_shared<std::vector<enzo::bt::boolT>>(*other.boolStore_);
|
||||
break;
|
||||
default:
|
||||
throw std::runtime_error("Type " + std::to_string(static_cast<int>(type_)) + " was not properly accounted for");
|
||||
throw std::runtime_error("Type " + std::to_string(static_cast<int>(type_)) + " was not properly accounted for in Attribute copy constructor");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user