As you can see, there are two ifif
branches that are the same. Essentially they create a generic class using floatfloat
and intint
type.
The class ArrayBufferObjectArrayBufferObject
is the base of ArrayBufferObject<T>ArrayBufferObject<T>
, but only the latter implements an indexer (strongly typed). It is implemented as following:
The source of the assigned item comes from a ColladaArrayColladaArray
class, that is an abstract class wrapping an array of values. To resolve the data accessor I've defined in it a generic numeric accessor like the following:
How would you suggest to remove the GetAccessorArrayGetAccessorArray
routine redundancies? Help! Soon it will grow up with all possible numeric types!