Util

collada.util.toUnitVec Converts the given vector to a unit vector
collada.util.checkSource Check if a source objects complies with the needed components and has the needed length
collada.util.normalize_v3 Normalize a numpy array of 3 component vectors with shape (N,3)
collada.util.IndexedList Class that combines a list and a dict into a single class - Written by Hugh Bothwell (http://stackoverflow.com/users/33258/hugh-bothwell) - Original source available at: http://stackoverflow.com/questions/5332841/python-list-dict-property-best-practice/5334686#5334686 - Modifications by Jeff Terrace Given an object, obj, that has a property x, this allows you to create an IndexedList like so: L = IndexedList([], (‘x’)) o = obj() o.x = ‘test’ L.append(o) L[0] # = o L[‘test’] # = o