SpiecsEngine
 
Loading...
Searching...
No Matches

◆ GltfSamplers()

Spices::GltfSamplers::GltfSamplers ( const Json & data)
inlineexplicit

Constructor Function.

Parameters
[in]dataSpecific Json element.

Definition at line 37 of file GltfSamplers.h.

38 : GltfObject(data)
39 {
41
42 m_SamplersData.resize(data.size());
43
44 for (int i = 0; i < data.size(); i++)
45 {
46 Item& item = m_SamplersData[i];
47 const Json& json = data[i];
48
49 item.magFilter = GltfHelper::GetElementInt(json, "magFilter", -1);
50 item.minFilter = GltfHelper::GetElementInt(json, "minFilter", -1);
51 item.wrapS = GltfHelper::GetElementInt(json, "wrapS", -1);
52 item.wrapT = GltfHelper::GetElementInt(json, "wrapT", -1);
53 }
54 }
#define SPICES_PROFILE_ZONE
static int GetElementInt(const Json::object_t &root, const char *path, int pDefault)
Get int value in Json::object_t.
GltfObject(const Json &data)
Constructor Function.
Definition GltfObject.h:33
nlohmann::json Json
using Json insteadd of nlohmann::json
Definition GltfObject.h:25
std::vector< Item > m_SamplersData
Data of Gltf Json Samplers.

References GltfSamplers().

Referenced by GltfSamplers().