|
 |
In light of the fact that I was able to solve the scalar / vector typing
problem, I wanted to do a test of the macro with a full complement of vectors
that are composed of all permutations of negative, zero, and positive values, so
that I can test anything that might trigger some edge case and cause the macro
to fail and misidentify an argument.
To do that, I wrote a macro to generate all of the permutations for any given
vector size, however it quickly became apparent that actually outputting vectors
of any given size is a challenge.
There's no way to really assign a value to the individual vector component
Vector.z, so I'm coming up against an interesting limitation of SDL. It's not a
trivial task to take an array of values and convert it to a vector.
Nor can I (that I know) diminish the size of a vector from 5 to 3.
(Can we have 1-component vectors?)
I don't want to use ParseString () to generate 4,000 vectors.
I also don't want to individually verify every test case, so I'll probably make
the output of the macro a scalar/vector plus the type (1, 2, 3, 4, 5) and have
the identification macro compare, and sum any errors.
Can anyone suggest a robust method for composing vectors of sizes 2 through 5
with a single, general purpose macro?
Thanks
- BE
Post a reply to this message
|
 |