glTF-SDK
glTF-SDK copied to clipboard
Direct access to buffers and accessors
Hello,
I am working on a project where direct access to buffers and accessors is needed. I am proposing adding the following two functions.
Affected file: GLTFSDK/Inc/GLTFSDK/BufferBuilder.h
85: ResourceWriter& GetResourceWriter();
86: const ResourceWriter& GetResourceWriter() const;
87: +
88: + Buffer getBuffer ( size_t index ) {
89: + assert ( index < m_buffers.Size() );
90: + return m_buffers [ index ];
91: + }
92: +
93: + Accessor getAccessor ( size_t index ) {
94: + assert ( index < m_accessors.Size() );
95: + return m_accessors [ index ];
96: + }
Affected file: GLTFSDK/Inc/GLTFSDK/IndexedContainer.h 35: class IndexedContainer<const T, true> 36: { 37: public: 38: + const size_t size() const 39: + { 40: + return m_elements.size(); 41: + } 42: + ... 206: public: 207: + size_t size() 208: + { 209: + return (IndexedContainer<const T>::size()); 210: + } 211: + ... 271: // accessible (the mutable versions replace rather than complement them) 272: + using IndexedContainer<const T>::size; 273: using IndexedContainer<const T>::Front;
If you need more information, do not hesitate to contact me.
Thank you !
Christian