You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Javacpp accesses C arrays via pointers, e.g. model.materials().position(1).maps().position(2)
This is weird for a Java programmer because it isn't just an accessor; it modifies the position field of the object, and is obviously highly unsafe. It would be better if we could convert the C arrays into Java arrays, or at least wrap a List interface around them.
We could perhaps make a class like ArrayWrapper(Pointer p, int size) with methods such as get(index) and set(index) which will handle the requests carefully using the C style pointers, but the user would not need to be aware of it.
Activity
MerujSargsyan commentedon Oct 1, 2024
We could perhaps make a class like ArrayWrapper(Pointer p, int size) with methods such as get(index) and set(index) which will handle the requests carefully using the C style pointers, but the user would not need to be aware of it.