fix: general optimization, lazy cooking, transform caching, fix geometry copying

This commit is contained in:
parker
2025-08-02 23:02:14 +01:00
parent 92bfc8ff26
commit 48ad8909cc
12 changed files with 104 additions and 62 deletions

View File

@@ -29,6 +29,32 @@ ga::Attribute::Attribute(std::string name, ga::AttributeType type)
}
ga::Attribute::Attribute(const Attribute& other)
{
type_ = other.type_;
private_= other.private_;
hidden_ = other.hidden_;
readOnly_ = other.readOnly_;
name_ = other.name_;
switch(type_)
{
case(AttrType::intT):
intStore_=std::make_shared<std::vector<int>>(*other.intStore_);
break;
case(AttrType::floatT):
floatStore_=std::make_shared<std::vector<float>>(*other.floatStore_);
break;
case(AttrType::vectorT):
vector3Store_=std::make_shared<std::vector<enzo::bt::Vector3>>(*other.vector3Store_);
break;
default:
throw std::runtime_error("Type " + std::to_string(static_cast<int>(type_)) + " was not properly accounted for");
}
}
ga::AttributeType ga::Attribute::getType()
{
return type_;