|
![](/i/fill.gif) |
Ron Parker wrote:
> ...Opinions on this, especially
> from people who are using the rather bizarre current semantics,
> are welcome.
Since "=" is a float operator, and since float operations are
operated over each element of a vector (for example,
<1, 2, 3> * 4), the current implementation makes sense.
Better than the vlength solution may be the direct approach :
#macro IsZeroVector(V)
( (V.x=0) & (V.y=0) & (V.z=0) )
#end
#if (IsZeroVector(mynormal))
....
#end
>
> >2) I'd like to have an option of specifying the length of
> >the trace vector and have trace() return 0 (no intersection) when this length
> >is exceeded.
>
> Again, this requires an additional parameter
You asked for opinions, so....
Again, this seems an application where macros would prove
quite useful. The burden of proof should be against modifying core
code when macros can serve similar functionality without substantial
overhead. But if the test is one which will be performed often
(and the obvious collision detection application may well provide
such a case), then perhaps the encoding is justified.
Dan
--
http://www.flash.net/~djconnel/
Post a reply to this message
|
![](/i/fill.gif) |