[Verse-dev] Method parameter weirdness

Emil Brink verse-dev@blender.org
Thu, 29 Apr 2004 10:45:27 +0200 (MEST)


Eskil,

Why is it that the VVNOParamType has these types for vectors and
matrices:

	VN_O_METHOD_PTYPE_2_VECTOR32,
	VN_O_METHOD_PTYPE_3_VECTOR32,
	VN_O_METHOD_PTYPE_4_VECTOR32,

	VN_O_METHOD_PTYPE_2_VECTOR64,
	VN_O_METHOD_PTYPE_3_VECTOR64,
	VN_O_METHOD_PTYPE_4_VECTOR64,

	VN_O_METHOD_PTYPE_4_MATRIX32,
	VN_O_METHOD_PTYPE_9_MATRIX32,
	VN_O_METHOD_PTYPE_16_MATRIX32,

	VN_O_METHOD_PTYPE_4_MATRIX64,
	VN_O_METHOD_PTYPE_9_MATRIX64,
	VN_O_METHOD_PTYPE_16_MATRIX64

(I don't like the names of these either, btw, since they sort wrong.
I would have used e.g. VN_O_METHOD_PTYPE_VECTOR32_2 and so on)

but the actual union VNOParam only has these:

	real32		vector32[4];
	real64		vector64[4];
	real32		matrix32[16];
	real64		matrix64[16];

?

It feels either broken, or just weird. I think there should be a
strict one-to-one mapping of declared types and defined ones in the
union, for simplicty if nothing else.

Also, to resolve the problem with name collisions, how about
prefixing the values with an "a"? As in "int32 aint32;" ? It's crude
and not proper English, but it makes the problem go away and is at
least a bit readable/mnemonic.

Regards,

/Emil