Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct access to buffers and accessors #61

Open
tulvanchristian opened this issue Sep 22, 2020 · 0 comments
Open

Direct access to buffers and accessors #61

tulvanchristian opened this issue Sep 22, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tulvanchristian
Copy link

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::size());
210: + }
211: +
...
271: // accessible (the mutable versions replace rather than complement them)
272: + using IndexedContainer::size;
273: using IndexedContainer::Front;

If you need more information, do not hesitate to contact me.

Thank you !

Christian

@bghgary bghgary added enhancement New feature or request help wanted Extra attention is needed triaged labels Dec 7, 2023
@thomlucc thomlucc removed the triaged label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants