[ODE] Why is dVector3 defined as dReal[4] ???
Royce Mitchell III
Royce Mitchell III <royce3 at ev1.net>
Thu Feb 13 05:56:02 2003
> struct dVector3{
> dReal x, y, z;
> dReal _pad;
> #ifdef __cplusplus
> dReal &operator[](int);
> #endif
> };
> (Here, the clear advantage is using C++, because C users won't have
> array-access operator[], which works now with the array concept.)
Personally, I prefer C++, but lets not needlessly outcast C users. You
can always use a union to give C users the array operator. In fact,
just doing it that way will give uniformity to both C & C++.
--
Peace favor your sword,
Royce3