diff --git a/include/libgltf/libgltf.h b/include/libgltf/libgltf.h index 14f650d..c5780a6 100644 --- a/include/libgltf/libgltf.h +++ b/include/libgltf/libgltf.h @@ -8,7 +8,7 @@ #define LIBGLTF_MAJOR_VERSION 0 #define LIBGLTF_MINOR_VERSION 1 -#define LIBGLTF_PATCH_VERSION 1 +#define LIBGLTF_PATCH_VERSION 2 #if defined(UNICODE) typedef std::wstring GLTFString; @@ -35,7 +35,7 @@ namespace libgltf SGlTFProperty(); // Check valid - virtual operator bool() const; + operator bool() const; std::shared_ptr extras; std::shared_ptr extensions; @@ -49,7 +49,7 @@ namespace libgltf SGlTFChildofRootProperty(); // Check valid - virtual operator bool() const; + operator bool() const; // The user-defined name of this object. GLTFString name; @@ -64,7 +64,7 @@ namespace libgltf SMaterial(); // Check valid - virtual operator bool() const; + operator bool() const; // The alpha cutoff value of the material. float alphaCutoff; @@ -93,7 +93,7 @@ namespace libgltf SAsset(); // Check valid - virtual operator bool() const; + operator bool() const; // The minimum glTF version that this asset targets. GLTFString minVersion; @@ -114,7 +114,7 @@ namespace libgltf SSampler(); // Check valid - virtual operator bool() const; + operator bool() const; // s wrapping mode. int32_t wrapS; @@ -135,7 +135,7 @@ namespace libgltf SAnimationSampler(); // Check valid - virtual operator bool() const; + operator bool() const; // The index of an accessor containing keyframe input values, e.g., time. std::shared_ptr input; @@ -154,7 +154,7 @@ namespace libgltf SExtras(); // Check valid - virtual operator bool() const; + operator bool() const; }; /*! @@ -166,7 +166,7 @@ namespace libgltf SScene(); // Check valid - virtual operator bool() const; + operator bool() const; // The indices of each root node. std::vector> nodes; @@ -181,7 +181,7 @@ namespace libgltf SCameraPerspective(); // Check valid - virtual operator bool() const; + operator bool() const; // The floating-point aspect ratio of the field of view. float aspectRatio; @@ -202,7 +202,7 @@ namespace libgltf SBufferView(); // Check valid - virtual operator bool() const; + operator bool() const; // The length of the bufferView in bytes. int32_t byteLength; @@ -225,7 +225,7 @@ namespace libgltf STextureInfo(); // Check valid - virtual operator bool() const; + operator bool() const; // The index of the texture. std::shared_ptr index; @@ -241,7 +241,7 @@ namespace libgltf SMaterialNormalTextureInfo(); // Check valid - virtual operator bool() const; + operator bool() const; // The scalar multiplier applied to each normal vector of the normal texture. float scale; @@ -255,7 +255,7 @@ namespace libgltf SMaterialOcclusionTextureInfo(); // Check valid - virtual operator bool() const; + operator bool() const; // A scalar multiplier controlling the amount of occlusion applied. float strength; @@ -270,7 +270,7 @@ namespace libgltf SAccessorSparseValues(); // Check valid - virtual operator bool() const; + operator bool() const; // The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target. std::shared_ptr bufferView; @@ -287,7 +287,7 @@ namespace libgltf SAnimationChannelTarget(); // Check valid - virtual operator bool() const; + operator bool() const; // The index of the node to target. std::shared_ptr node; @@ -304,7 +304,7 @@ namespace libgltf SMesh(); // Check valid - virtual operator bool() const; + operator bool() const; // An array of primitives, each defining geometry to be rendered with a material. std::vector> primitives; @@ -321,7 +321,7 @@ namespace libgltf SAccessorSparse(); // Check valid - virtual operator bool() const; + operator bool() const; // Number of entries stored in the sparse array. int32_t count; @@ -340,7 +340,7 @@ namespace libgltf SMeshPrimitive(); // Check valid - virtual operator bool() const; + operator bool() const; // The index of the accessor that contains the indices. std::shared_ptr indices; @@ -363,7 +363,7 @@ namespace libgltf SKHR_materials_pbrSpecularGlossinessglTFextension(); // Check valid - virtual operator bool() const; + operator bool() const; // The specular RGB color of the material. std::vector specularFactor; @@ -386,7 +386,7 @@ namespace libgltf SExtension(); // Check valid - virtual operator bool() const; + operator bool() const; // Manual code lines std::map> properties; @@ -401,7 +401,7 @@ namespace libgltf SAnimationChannel(); // Check valid - virtual operator bool() const; + operator bool() const; // The index of the node and TRS property to target. std::shared_ptr target; @@ -417,7 +417,7 @@ namespace libgltf SGlTFId(); // Check valid - virtual operator bool() const; + operator bool() const; operator int32_t() const; @@ -433,7 +433,7 @@ namespace libgltf SAccessorSparseIndices(); // Check valid - virtual operator bool() const; + operator bool() const; // The indices data type. int32_t componentType; @@ -452,7 +452,7 @@ namespace libgltf SNode(); // Check valid - virtual operator bool() const; + operator bool() const; // The node's non-uniform scale, given as the scaling factors along the x, y, and z axes. std::vector scale; @@ -483,7 +483,7 @@ namespace libgltf SAnimation(); // Check valid - virtual operator bool() const; + operator bool() const; // An array of channels, each of which targets an animation's sampler at a node's property. Different channels of the same animation can't have equal targets. std::vector> channels; @@ -500,7 +500,7 @@ namespace libgltf SSkin(); // Check valid - virtual operator bool() const; + operator bool() const; // Indices of skeleton nodes, used as joints in this skin. std::vector> joints; @@ -519,7 +519,7 @@ namespace libgltf SMaterialPBRMetallicRoughness(); // Check valid - virtual operator bool() const; + operator bool() const; // The roughness of the material. float roughnessFactor; @@ -541,7 +541,7 @@ namespace libgltf SKHR_draco_mesh_compressionextension(); // Check valid - virtual operator bool() const; + operator bool() const; // A dictionary object, where each key corresponds to an attribute and its unique attribute id stored in the compressed geometry. std::map> attributes; @@ -558,7 +558,7 @@ namespace libgltf SCamera(); // Check valid - virtual operator bool() const; + operator bool() const; // Specifies if the camera uses a perspective or orthographic projection. GLTFString type; @@ -577,7 +577,7 @@ namespace libgltf SImage(); // Check valid - virtual operator bool() const; + operator bool() const; // The image's MIME type. GLTFString mimeType; @@ -596,7 +596,7 @@ namespace libgltf STexture(); // Check valid - virtual operator bool() const; + operator bool() const; // The index of the image used by this texture. std::shared_ptr source; @@ -613,7 +613,7 @@ namespace libgltf SCameraOrthographic(); // Check valid - virtual operator bool() const; + operator bool() const; // The floating-point horizontal magnification of the view. Must not be zero. float xmag; @@ -634,7 +634,7 @@ namespace libgltf SBuffer(); // Check valid - virtual operator bool() const; + operator bool() const; // The length of the buffer in bytes. int32_t byteLength; @@ -651,7 +651,7 @@ namespace libgltf SAccessor(); // Check valid - virtual operator bool() const; + operator bool() const; // The number of attributes referenced by this accessor. int32_t count; @@ -682,7 +682,7 @@ namespace libgltf SGlTF(); // Check valid - virtual operator bool() const; + operator bool() const; // An array of textures. std::vector> textures; diff --git a/tools/batch/glTF_2.0_schema.ini b/tools/batch/glTF_2.0_schema.ini index 82dc7ef..cdd1bed 100644 --- a/tools/batch/glTF_2.0_schema.ini +++ b/tools/batch/glTF_2.0_schema.ini @@ -6,7 +6,7 @@ extensions_schema_directories= %(CD)s/../../external/glTF/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/schema major_version=0 minor_version=1 -patch_version=1 +patch_version=2 [code.headers] extension.schema.json=%(CD)s/codes/extension.schema.json.h diff --git a/tools/jsonschematoc11/c11types/c11typestruct.py b/tools/jsonschematoc11/c11types/c11typestruct.py index c3b7b56..e65cf8d 100644 --- a/tools/jsonschematoc11/c11types/c11typestruct.py +++ b/tools/jsonschematoc11/c11types/c11typestruct.py @@ -132,7 +132,7 @@ def codeHeader(self, codeTypeNames): codeLines.append(u' %s();' % self.codeTypeName()) codeLines.append(u'') codeLines.append(u' // Check valid') - codeLines.append(u' virtual operator bool() const;') + codeLines.append(u' operator bool() const;') if self.c11Type != None: codeLines.append(u'')