mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-16 16:05:57 +08:00
added sparse structure to accessors
This commit is contained in:
parent
bf9c2f4abd
commit
1ccb4ff580
16
tiny_gltf.h
16
tiny_gltf.h
@ -575,7 +575,19 @@ struct Accessor {
|
|||||||
std::vector<double> minValues; // optional
|
std::vector<double> minValues; // optional
|
||||||
std::vector<double> maxValues; // optional
|
std::vector<double> maxValues; // optional
|
||||||
|
|
||||||
// TODO(syoyo): "sparse"
|
struct {
|
||||||
|
int count;
|
||||||
|
bool isSparse;
|
||||||
|
struct {
|
||||||
|
int byteOffset;
|
||||||
|
int bufferView;
|
||||||
|
int component_type; // a TINYGLTF_COMPONENT_TYPE_ value
|
||||||
|
} indices;
|
||||||
|
struct {
|
||||||
|
int bufferView;
|
||||||
|
int byteOffset;
|
||||||
|
} values;
|
||||||
|
} sparse;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Utility function to compute byteStride for a given bufferView object.
|
/// Utility function to compute byteStride for a given bufferView object.
|
||||||
@ -614,7 +626,7 @@ struct Accessor {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessor() { bufferView = -1; }
|
Accessor() { bufferView = -1; sparse.isSparse = false }
|
||||||
bool operator==(const tinygltf::Accessor &) const;
|
bool operator==(const tinygltf::Accessor &) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user