Skip to content

Commit

Permalink
add constructors used in Lumix
Browse files Browse the repository at this point in the history
  • Loading branch information
nem0 committed May 6, 2024
1 parent 8e26404 commit 365f52c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ofbx.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ struct Vec2Attributes {
const int* indices = nullptr;
int count = 0;

Vec2Attributes() {}
Vec2Attributes(const Vec2* v, const int* i, int c) : values(v), indices(i), count(c) {}

Vec2 get(int i) const { return indices ? values[indices[i]] : values[i]; }
Expand All @@ -507,6 +508,7 @@ struct Vec3Attributes {
int count = 0;
int values_count = 0;

Vec3Attributes() {}
Vec3Attributes(const Vec3* v, const int* i, int c, int vc) : values(v), indices(i), count(c), values_count(vc) {}

Vec3 get(int i) const { return indices ? values[indices[i]] : values[i]; }
Expand All @@ -517,6 +519,7 @@ struct Vec4Attributes {
const int* indices = nullptr;
int count = 0;

Vec4Attributes() {}
Vec4Attributes(const Vec4* v, const int* i, int c) : values(v), indices(i), count(c) {}

Vec4 get(int i) const { return indices ? values[indices[i]] : values[i]; }
Expand Down

0 comments on commit 365f52c

Please sign in to comment.