[#18678] Swizzle properties for Mathutils.Vector
patch from Alex Fraser (z0r) eg. - vec.xyz = vec.zyx - vec.xy = vec.zw - vec.xxy = vec.wzz - vec.yzyz = vec.yxyx See http://en.wikipedia.org/wiki/Swizzling_(computer_graphics) made some minor modifications to this patch. tested access times and adding 336 attributes to vectors doesn't make a noticeable differences to speed of existing axis attributes (x,y,z,w) - thanks to python dict lookups.
This commit is contained in:
@@ -43,6 +43,10 @@ typedef struct {
|
||||
short wrapped; /* is wrapped data? */
|
||||
} VectorObject;
|
||||
|
||||
void Vector_Free(void);
|
||||
int Vector_Init(void);
|
||||
|
||||
|
||||
/*prototypes*/
|
||||
PyObject *Vector_Zero( VectorObject * self );
|
||||
PyObject *Vector_Normalize( VectorObject * self );
|
||||
|
||||
Reference in New Issue
Block a user